diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dac8da6a2..e7622d9ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: lint: timeout-minutes: 15 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: @@ -45,7 +45,7 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: @@ -88,7 +88,7 @@ jobs: test: timeout-minutes: 15 name: test - runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a24ae611f..b4da64f27 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.131.0" + ".": "0.132.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 189b2dd2a..d756b60c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9e397c65ffb81e2928b8ecf979769a79131ae6058b6fb373a5e930dc8a168732.yml -openapi_spec_hash: 93aea3855d2d1c390107d223762aa818 -config_hash: 5bb913c05ebeb301ec925b16e75bb251 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-1381b3b73a231682a3509b67b1e4504c3ba3d904ec054e634f9682dfa9e09d44.yml +openapi_spec_hash: 0be6a45814d5c3acd8cfe1dabb59e322 +config_hash: 337a99d8cc30006358b7bc2531401669 diff --git a/CHANGELOG.md b/CHANGELOG.md index 98d31de2f..2c9b51a16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.132.0 (2026-07-29) + +Full Changelog: [v0.131.0...v0.132.0](https://github.com/lithic-com/lithic-java/compare/v0.131.0...v0.132.0) + +### Features + +* **api:** add dispositionReasons to queues, change resolution type in cases ([c8be7a9](https://github.com/lithic-com/lithic-java/commit/c8be7a9763106979fb321279d305a10bf66a007f)) +* **api:** add embed webhook event types ([6b438b7](https://github.com/lithic-com/lithic-java/commit/6b438b70afa7efc9b556f664177ab168a6fff71b)) +* **api:** add Optional parameter overloads to transaction response builders ([5b5091a](https://github.com/lithic-com/lithic-java/commit/5b5091a6f565bb93817401f30e37590e7f532623)) +* **api:** add PAYMENT category to book transfers ([a362749](https://github.com/lithic-com/lithic-java/commit/a3627495919ac3272de3403e3b4e5a50155dd434)) +* **api:** add PROGRAM_TRANSFER enum values to account/book_transfer/payment/statement types ([0ef7114](https://github.com/lithic-com/lithic-java/commit/0ef7114609e355b3dfc6d193df85fded7a69300e)) +* **api:** add recipient_name field to Payment ACH method attributes ([143f55b](https://github.com/lithic-com/lithic-java/commit/143f55bf5f783aa9ab8b40d81f2ab6bb5a3fa1b1)) +* **api:** add REVERSED status value to payment list parameters ([108f733](https://github.com/lithic-com/lithic-java/commit/108f7333b40ea70fff815cdc2a00a14464bbb5a4)) +* **api:** add stablecoin category and events to account activity/payment/statement types ([2263c5c](https://github.com/lithic-com/lithic-java/commit/2263c5c70828c5f27a047aba3fa9a4cabe145cf1)) +* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([d0f208a](https://github.com/lithic-com/lithic-java/commit/d0f208a821f93589ce4a79baf636430386ad7a27)) + + +### Documentation + +* **api:** clarify dispute event type descriptions ([20fcf6f](https://github.com/lithic-com/lithic-java/commit/20fcf6fe25934101174fada2170592df451bd5ec)) +* **api:** clarify lastTransactionEventToken behavior in financial account balance list ([6a3be38](https://github.com/lithic-com/lithic-java/commit/6a3be383c299cfbc8293044c7b88d0887c64edee)) +* **api:** clarify simulateClearing supports multiple calls ([326d02d](https://github.com/lithic-com/lithic-java/commit/326d02d42d76d0f79391d693a9bdd4068e784b94)) +* **api:** update category parameter description in external_payment list ([7afdd50](https://github.com/lithic-com/lithic-java/commit/7afdd50d02a66cc8e5fa76133d333c5ffbccab38)) +* **api:** update VelocityLimitPeriod duration maximum from 31 to 90 days ([6038ae0](https://github.com/lithic-com/lithic-java/commit/6038ae0656608deb7fa01b8d0aa2865467b637a3)) + ## 0.131.0 (2026-06-29) Full Changelog: [v0.130.0...v0.131.0](https://github.com/lithic-com/lithic-java/compare/v0.130.0...v0.131.0) diff --git a/README.md b/README.md index 2a94f696a..e0cf94193 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.131.0) -[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.131.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.131.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.132.0) +[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.132.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.132.0) @@ -22,7 +22,7 @@ Use the Lithic MCP Server to enable AI assistants to interact with this API, all -The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.131.0). +The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.132.0). @@ -33,7 +33,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic ### Gradle ```kotlin -implementation("com.lithic.api:lithic-java:0.131.0") +implementation("com.lithic.api:lithic-java:0.132.0") ``` ### Maven @@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.131.0") com.lithic.api lithic-java - 0.131.0 + 0.132.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 2bed69f41..3f9804eaf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.lithic.api" - version = "0.131.0" // x-release-please-version + version = "0.132.0" // x-release-please-version } subprojects { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt index 037acc597..0dec1db34 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt @@ -390,6 +390,8 @@ private constructor( @JvmField val WIRE = of("WIRE") + @JvmField val STABLECOIN = of("STABLECOIN") + @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") @JvmField val FEE = of("FEE") @@ -430,6 +432,8 @@ private constructor( @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val PROGRAM_TRANSFER = of("PROGRAM_TRANSFER") + @JvmStatic fun of(value: String) = TransactionCategory(JsonField.of(value)) } @@ -437,6 +441,7 @@ private constructor( enum class Known { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -457,6 +462,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -471,6 +477,7 @@ private constructor( enum class Value { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -491,6 +498,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an unknown * value. @@ -509,6 +517,7 @@ private constructor( when (this) { ACH -> Value.ACH WIRE -> Value.WIRE + STABLECOIN -> Value.STABLECOIN BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING FEE -> Value.FEE REWARD -> Value.REWARD @@ -529,6 +538,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -545,6 +555,7 @@ private constructor( when (this) { ACH -> Known.ACH WIRE -> Known.WIRE + STABLECOIN -> Known.STABLECOIN BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING FEE -> Known.FEE REWARD -> Known.REWARD @@ -565,6 +576,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Known.MANAGEMENT_DISBURSEMENT HOLD -> Known.HOLD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Known.PROGRAM_TRANSFER else -> throw LithicInvalidDataException("Unknown TransactionCategory: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt index 022943a3b..e5bff9e4c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt @@ -1112,6 +1112,8 @@ private constructor( @JvmField val WIRE = of("WIRE") + @JvmField val STABLECOIN = of("STABLECOIN") + @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") @JvmField val FEE = of("FEE") @@ -1152,6 +1154,8 @@ private constructor( @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val PROGRAM_TRANSFER = of("PROGRAM_TRANSFER") + @JvmStatic fun of(value: String) = TransactionCategory(JsonField.of(value)) } @@ -1159,6 +1163,7 @@ private constructor( enum class Known { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -1179,6 +1184,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -1195,6 +1201,7 @@ private constructor( enum class Value { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -1215,6 +1222,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an * unknown value. @@ -1233,6 +1241,7 @@ private constructor( when (this) { ACH -> Value.ACH WIRE -> Value.WIRE + STABLECOIN -> Value.STABLECOIN BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING FEE -> Value.FEE REWARD -> Value.REWARD @@ -1253,6 +1262,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1269,6 +1279,7 @@ private constructor( when (this) { ACH -> Known.ACH WIRE -> Known.WIRE + STABLECOIN -> Known.STABLECOIN BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING FEE -> Known.FEE REWARD -> Known.REWARD @@ -1289,6 +1300,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Known.MANAGEMENT_DISBURSEMENT HOLD -> Known.HOLD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Known.PROGRAM_TRANSFER else -> throw LithicInvalidDataException("Unknown TransactionCategory: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt index 44cdf66df..7630a2e1e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt @@ -1134,6 +1134,8 @@ private constructor( @JvmField val WIRE = of("WIRE") + @JvmField val STABLECOIN = of("STABLECOIN") + @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") @JvmField val FEE = of("FEE") @@ -1174,6 +1176,8 @@ private constructor( @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val PROGRAM_TRANSFER = of("PROGRAM_TRANSFER") + @JvmStatic fun of(value: String) = TransactionCategory(JsonField.of(value)) } @@ -1181,6 +1185,7 @@ private constructor( enum class Known { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -1201,6 +1206,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -1217,6 +1223,7 @@ private constructor( enum class Value { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -1237,6 +1244,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an * unknown value. @@ -1255,6 +1263,7 @@ private constructor( when (this) { ACH -> Value.ACH WIRE -> Value.WIRE + STABLECOIN -> Value.STABLECOIN BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING FEE -> Value.FEE REWARD -> Value.REWARD @@ -1275,6 +1284,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1291,6 +1301,7 @@ private constructor( when (this) { ACH -> Known.ACH WIRE -> Known.WIRE + STABLECOIN -> Known.STABLECOIN BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING FEE -> Known.FEE REWARD -> Known.REWARD @@ -1311,6 +1322,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Known.MANAGEMENT_DISBURSEMENT HOLD -> Known.HOLD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Known.PROGRAM_TRANSFER else -> throw LithicInvalidDataException("Unknown TransactionCategory: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt index 6272f8821..e6bf1c30d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt @@ -1198,6 +1198,8 @@ private constructor( @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val PROGRAM_TRANSFER = of("PROGRAM_TRANSFER") + @JvmField val TRANSFER = of("TRANSFER") @JvmStatic fun of(value: String) = BookTransferCategory(JsonField.of(value)) @@ -1213,6 +1215,7 @@ private constructor( INTERNAL, REWARD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, TRANSFER, } @@ -1235,6 +1238,7 @@ private constructor( INTERNAL, REWARD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, TRANSFER, /** * An enum member indicating that [BookTransferCategory] was instantiated with an @@ -1260,6 +1264,7 @@ private constructor( INTERNAL -> Value.INTERNAL REWARD -> Value.REWARD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER TRANSFER -> Value.TRANSFER else -> Value._UNKNOWN } @@ -1283,6 +1288,7 @@ private constructor( INTERNAL -> Known.INTERNAL REWARD -> Known.REWARD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Known.PROGRAM_TRANSFER TRANSFER -> Known.TRANSFER else -> throw LithicInvalidDataException("Unknown BookTransferCategory: $value") } @@ -1404,6 +1410,8 @@ private constructor( @JvmField val BILL_PAYMENT = of("BILL_PAYMENT") + @JvmField val PAYMENT_FEE = of("PAYMENT_FEE") + @JvmField val CASH_BACK = of("CASH_BACK") @JvmField val ACCOUNT_TO_ACCOUNT = of("ACCOUNT_TO_ACCOUNT") @@ -1434,6 +1442,10 @@ private constructor( @JvmField val COLLECTION = of("COLLECTION") + @JvmField val LITHIC_PROGRAM_TRANSFER = of("LITHIC_PROGRAM_TRANSFER") + + @JvmField val BANK_PROGRAM_TRANSFER = of("BANK_PROGRAM_TRANSFER") + @JvmStatic fun of(value: String) = BookTransferType(JsonField.of(value)) } @@ -1459,6 +1471,7 @@ private constructor( INTEREST, LATE_PAYMENT, BILL_PAYMENT, + PAYMENT_FEE, CASH_BACK, ACCOUNT_TO_ACCOUNT, CARD_TO_CARD, @@ -1474,6 +1487,8 @@ private constructor( SERVICE, TRANSFER, COLLECTION, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, } /** @@ -1506,6 +1521,7 @@ private constructor( INTEREST, LATE_PAYMENT, BILL_PAYMENT, + PAYMENT_FEE, CASH_BACK, ACCOUNT_TO_ACCOUNT, CARD_TO_CARD, @@ -1521,6 +1537,8 @@ private constructor( SERVICE, TRANSFER, COLLECTION, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, /** * An enum member indicating that [BookTransferType] was instantiated with an unknown * value. @@ -1557,6 +1575,7 @@ private constructor( INTEREST -> Value.INTEREST LATE_PAYMENT -> Value.LATE_PAYMENT BILL_PAYMENT -> Value.BILL_PAYMENT + PAYMENT_FEE -> Value.PAYMENT_FEE CASH_BACK -> Value.CASH_BACK ACCOUNT_TO_ACCOUNT -> Value.ACCOUNT_TO_ACCOUNT CARD_TO_CARD -> Value.CARD_TO_CARD @@ -1572,6 +1591,8 @@ private constructor( SERVICE -> Value.SERVICE TRANSFER -> Value.TRANSFER COLLECTION -> Value.COLLECTION + LITHIC_PROGRAM_TRANSFER -> Value.LITHIC_PROGRAM_TRANSFER + BANK_PROGRAM_TRANSFER -> Value.BANK_PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1606,6 +1627,7 @@ private constructor( INTEREST -> Known.INTEREST LATE_PAYMENT -> Known.LATE_PAYMENT BILL_PAYMENT -> Known.BILL_PAYMENT + PAYMENT_FEE -> Known.PAYMENT_FEE CASH_BACK -> Known.CASH_BACK ACCOUNT_TO_ACCOUNT -> Known.ACCOUNT_TO_ACCOUNT CARD_TO_CARD -> Known.CARD_TO_CARD @@ -1621,6 +1643,8 @@ private constructor( SERVICE -> Known.SERVICE TRANSFER -> Known.TRANSFER COLLECTION -> Known.COLLECTION + LITHIC_PROGRAM_TRANSFER -> Known.LITHIC_PROGRAM_TRANSFER + BANK_PROGRAM_TRANSFER -> Known.BANK_PROGRAM_TRANSFER else -> throw LithicInvalidDataException("Unknown BookTransferType: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt index ae97f9ae4..198125fa1 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt @@ -402,6 +402,8 @@ private constructor( @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val PROGRAM_TRANSFER = of("PROGRAM_TRANSFER") + @JvmField val TRANSFER = of("TRANSFER") @JvmStatic fun of(value: String) = BookTransferCategory(JsonField.of(value)) @@ -417,6 +419,7 @@ private constructor( INTERNAL, REWARD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, TRANSFER, } @@ -439,6 +442,7 @@ private constructor( INTERNAL, REWARD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, TRANSFER, /** * An enum member indicating that [BookTransferCategory] was instantiated with an @@ -464,6 +468,7 @@ private constructor( INTERNAL -> Value.INTERNAL REWARD -> Value.REWARD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER TRANSFER -> Value.TRANSFER else -> Value._UNKNOWN } @@ -487,6 +492,7 @@ private constructor( INTERNAL -> Known.INTERNAL REWARD -> Known.REWARD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Known.PROGRAM_TRANSFER TRANSFER -> Known.TRANSFER else -> throw LithicInvalidDataException("Unknown BookTransferCategory: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt index d69299aa8..27a002371 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt @@ -858,6 +858,8 @@ private constructor( @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val PROGRAM_TRANSFER = of("PROGRAM_TRANSFER") + @JvmField val TRANSFER = of("TRANSFER") @JvmStatic fun of(value: String) = BookTransferCategory(JsonField.of(value)) @@ -873,6 +875,7 @@ private constructor( INTERNAL, REWARD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, TRANSFER, } @@ -895,6 +898,7 @@ private constructor( INTERNAL, REWARD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, TRANSFER, /** * An enum member indicating that [BookTransferCategory] was instantiated with an @@ -920,6 +924,7 @@ private constructor( INTERNAL -> Value.INTERNAL REWARD -> Value.REWARD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER TRANSFER -> Value.TRANSFER else -> Value._UNKNOWN } @@ -943,6 +948,7 @@ private constructor( INTERNAL -> Known.INTERNAL REWARD -> Known.REWARD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Known.PROGRAM_TRANSFER TRANSFER -> Known.TRANSFER else -> throw LithicInvalidDataException("Unknown BookTransferCategory: $value") } @@ -1801,6 +1807,8 @@ private constructor( @JvmField val BILL_PAYMENT = of("BILL_PAYMENT") + @JvmField val PAYMENT_FEE = of("PAYMENT_FEE") + @JvmField val CASH_BACK = of("CASH_BACK") @JvmField val ACCOUNT_TO_ACCOUNT = of("ACCOUNT_TO_ACCOUNT") @@ -1831,6 +1839,10 @@ private constructor( @JvmField val COLLECTION = of("COLLECTION") + @JvmField val LITHIC_PROGRAM_TRANSFER = of("LITHIC_PROGRAM_TRANSFER") + + @JvmField val BANK_PROGRAM_TRANSFER = of("BANK_PROGRAM_TRANSFER") + @JvmStatic fun of(value: String) = BookTransferType(JsonField.of(value)) } @@ -1856,6 +1868,7 @@ private constructor( INTEREST, LATE_PAYMENT, BILL_PAYMENT, + PAYMENT_FEE, CASH_BACK, ACCOUNT_TO_ACCOUNT, CARD_TO_CARD, @@ -1871,6 +1884,8 @@ private constructor( SERVICE, TRANSFER, COLLECTION, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, } /** @@ -1904,6 +1919,7 @@ private constructor( INTEREST, LATE_PAYMENT, BILL_PAYMENT, + PAYMENT_FEE, CASH_BACK, ACCOUNT_TO_ACCOUNT, CARD_TO_CARD, @@ -1919,6 +1935,8 @@ private constructor( SERVICE, TRANSFER, COLLECTION, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, /** * An enum member indicating that [BookTransferType] was instantiated with an * unknown value. @@ -1955,6 +1973,7 @@ private constructor( INTEREST -> Value.INTEREST LATE_PAYMENT -> Value.LATE_PAYMENT BILL_PAYMENT -> Value.BILL_PAYMENT + PAYMENT_FEE -> Value.PAYMENT_FEE CASH_BACK -> Value.CASH_BACK ACCOUNT_TO_ACCOUNT -> Value.ACCOUNT_TO_ACCOUNT CARD_TO_CARD -> Value.CARD_TO_CARD @@ -1970,6 +1989,8 @@ private constructor( SERVICE -> Value.SERVICE TRANSFER -> Value.TRANSFER COLLECTION -> Value.COLLECTION + LITHIC_PROGRAM_TRANSFER -> Value.LITHIC_PROGRAM_TRANSFER + BANK_PROGRAM_TRANSFER -> Value.BANK_PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -2004,6 +2025,7 @@ private constructor( INTEREST -> Known.INTEREST LATE_PAYMENT -> Known.LATE_PAYMENT BILL_PAYMENT -> Known.BILL_PAYMENT + PAYMENT_FEE -> Known.PAYMENT_FEE CASH_BACK -> Known.CASH_BACK ACCOUNT_TO_ACCOUNT -> Known.ACCOUNT_TO_ACCOUNT CARD_TO_CARD -> Known.CARD_TO_CARD @@ -2019,6 +2041,8 @@ private constructor( SERVICE -> Known.SERVICE TRANSFER -> Known.TRANSFER COLLECTION -> Known.COLLECTION + LITHIC_PROGRAM_TRANSFER -> Known.LITHIC_PROGRAM_TRANSFER + BANK_PROGRAM_TRANSFER -> Known.BANK_PROGRAM_TRANSFER else -> throw LithicInvalidDataException("Unknown BookTransferType: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationChallengeResponseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationChallengeResponseParams.kt index 15b907cd8..a4d55a8b2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationChallengeResponseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationChallengeResponseParams.kt @@ -24,7 +24,7 @@ import kotlin.jvm.optionals.getOrNull /** * Card program's response to Authorization Challenge. Programs that have Authorization Challenges * configured as Out of Band receive a - * [card_authorization.challenge](https://docs.lithic.com/reference/post_card-authorization-challenge) + * [card_authorization.challenge](https://docs.lithic.com/reference/cardauthorizationchallengewebhook) * webhook when an authorization attempt triggers a challenge. The card program should respond using * this endpoint after the cardholder completes the challenge. */ diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt index 18393bab0..c0aaf22f8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt @@ -9,6 +9,9 @@ import com.lithic.api.core.http.QueryParams import java.util.Objects /** + * **Deprecated.** Use the modern embedded card flow instead: create a session with `POST + * /v1/cards/{card_token}/embed` and render it via `GET /v1/embed`. + * * Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry * Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by * leveraging our embedded card UI solution documented below. @@ -30,6 +33,7 @@ import java.util.Objects * iframe) on the server or make an ajax call from your front end code, but **do not ever embed your * API key into front end code, as doing so introduces a serious security vulnerability**. */ +@Deprecated("deprecated") class CardEmbedParams private constructor( private val embedRequest: String, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EmbedSessionGeneratedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EmbedSessionGeneratedWebhookEvent.kt new file mode 100644 index 000000000..a62c75da3 --- /dev/null +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EmbedSessionGeneratedWebhookEvent.kt @@ -0,0 +1,853 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.lithic.api.models + +import com.fasterxml.jackson.annotation.JsonAnyGetter +import com.fasterxml.jackson.annotation.JsonAnySetter +import com.fasterxml.jackson.annotation.JsonCreator +import com.fasterxml.jackson.annotation.JsonProperty +import com.lithic.api.core.Enum +import com.lithic.api.core.ExcludeMissing +import com.lithic.api.core.JsonField +import com.lithic.api.core.JsonMissing +import com.lithic.api.core.JsonValue +import com.lithic.api.core.checkRequired +import com.lithic.api.errors.LithicInvalidDataException +import java.util.Collections +import java.util.Objects +import kotlin.jvm.optionals.getOrNull + +class EmbedSessionGeneratedWebhookEvent +@JsonCreator(mode = JsonCreator.Mode.DISABLED) +private constructor( + private val accountToken: JsonField, + private val cardToken: JsonField, + private val deviceDetails: JsonField, + private val eventType: JsonField, + private val sessionId: JsonField, + private val sessionType: JsonField, + private val additionalProperties: MutableMap, +) { + + @JsonCreator + private constructor( + @JsonProperty("account_token") + @ExcludeMissing + accountToken: JsonField = JsonMissing.of(), + @JsonProperty("card_token") @ExcludeMissing cardToken: JsonField = JsonMissing.of(), + @JsonProperty("device_details") + @ExcludeMissing + deviceDetails: JsonField = JsonMissing.of(), + @JsonProperty("event_type") + @ExcludeMissing + eventType: JsonField = JsonMissing.of(), + @JsonProperty("session_id") @ExcludeMissing sessionId: JsonField = JsonMissing.of(), + @JsonProperty("session_type") + @ExcludeMissing + sessionType: JsonField = JsonMissing.of(), + ) : this( + accountToken, + cardToken, + deviceDetails, + eventType, + sessionId, + sessionType, + mutableMapOf(), + ) + + /** + * The token of the account associated with the card + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun accountToken(): String = accountToken.getRequired("account_token") + + /** + * The token of the card associated with the embed session + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun cardToken(): String = cardToken.getRequired("card_token") + + /** + * Details about the request that generated the embed session + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun deviceDetails(): EmbedDeviceDetails = deviceDetails.getRequired("device_details") + + /** + * The type of event + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun eventType(): EventType = eventType.getRequired("event_type") + + /** + * The identifier shared by webhook events for the same embed session. + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun sessionId(): String = sessionId.getRequired("session_id") + + /** + * The type of embed session that was generated + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun sessionType(): SessionType = sessionType.getRequired("session_type") + + /** + * Returns the raw JSON value of [accountToken]. + * + * Unlike [accountToken], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("account_token") + @ExcludeMissing + fun _accountToken(): JsonField = accountToken + + /** + * Returns the raw JSON value of [cardToken]. + * + * Unlike [cardToken], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("card_token") @ExcludeMissing fun _cardToken(): JsonField = cardToken + + /** + * Returns the raw JSON value of [deviceDetails]. + * + * Unlike [deviceDetails], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("device_details") + @ExcludeMissing + fun _deviceDetails(): JsonField = deviceDetails + + /** + * Returns the raw JSON value of [eventType]. + * + * Unlike [eventType], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("event_type") @ExcludeMissing fun _eventType(): JsonField = eventType + + /** + * Returns the raw JSON value of [sessionId]. + * + * Unlike [sessionId], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("session_id") @ExcludeMissing fun _sessionId(): JsonField = sessionId + + /** + * Returns the raw JSON value of [sessionType]. + * + * Unlike [sessionType], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("session_type") + @ExcludeMissing + fun _sessionType(): JsonField = sessionType + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of + * [EmbedSessionGeneratedWebhookEvent]. + * + * The following fields are required: + * ```java + * .accountToken() + * .cardToken() + * .deviceDetails() + * .eventType() + * .sessionId() + * .sessionType() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [EmbedSessionGeneratedWebhookEvent]. */ + class Builder internal constructor() { + + private var accountToken: JsonField? = null + private var cardToken: JsonField? = null + private var deviceDetails: JsonField? = null + private var eventType: JsonField? = null + private var sessionId: JsonField? = null + private var sessionType: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(embedSessionGeneratedWebhookEvent: EmbedSessionGeneratedWebhookEvent) = + apply { + accountToken = embedSessionGeneratedWebhookEvent.accountToken + cardToken = embedSessionGeneratedWebhookEvent.cardToken + deviceDetails = embedSessionGeneratedWebhookEvent.deviceDetails + eventType = embedSessionGeneratedWebhookEvent.eventType + sessionId = embedSessionGeneratedWebhookEvent.sessionId + sessionType = embedSessionGeneratedWebhookEvent.sessionType + additionalProperties = + embedSessionGeneratedWebhookEvent.additionalProperties.toMutableMap() + } + + /** The token of the account associated with the card */ + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) + + /** + * Sets [Builder.accountToken] to an arbitrary JSON value. + * + * You should usually call [Builder.accountToken] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } + + /** The token of the card associated with the embed session */ + fun cardToken(cardToken: String) = cardToken(JsonField.of(cardToken)) + + /** + * Sets [Builder.cardToken] to an arbitrary JSON value. + * + * You should usually call [Builder.cardToken] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun cardToken(cardToken: JsonField) = apply { this.cardToken = cardToken } + + /** Details about the request that generated the embed session */ + fun deviceDetails(deviceDetails: EmbedDeviceDetails) = + deviceDetails(JsonField.of(deviceDetails)) + + /** + * Sets [Builder.deviceDetails] to an arbitrary JSON value. + * + * You should usually call [Builder.deviceDetails] with a well-typed [EmbedDeviceDetails] + * value instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun deviceDetails(deviceDetails: JsonField) = apply { + this.deviceDetails = deviceDetails + } + + /** The type of event */ + fun eventType(eventType: EventType) = eventType(JsonField.of(eventType)) + + /** + * Sets [Builder.eventType] to an arbitrary JSON value. + * + * You should usually call [Builder.eventType] with a well-typed [EventType] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun eventType(eventType: JsonField) = apply { this.eventType = eventType } + + /** The identifier shared by webhook events for the same embed session. */ + fun sessionId(sessionId: String) = sessionId(JsonField.of(sessionId)) + + /** + * Sets [Builder.sessionId] to an arbitrary JSON value. + * + * You should usually call [Builder.sessionId] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun sessionId(sessionId: JsonField) = apply { this.sessionId = sessionId } + + /** The type of embed session that was generated */ + fun sessionType(sessionType: SessionType) = sessionType(JsonField.of(sessionType)) + + /** + * Sets [Builder.sessionType] to an arbitrary JSON value. + * + * You should usually call [Builder.sessionType] with a well-typed [SessionType] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun sessionType(sessionType: JsonField) = apply { + this.sessionType = sessionType + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [EmbedSessionGeneratedWebhookEvent]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .accountToken() + * .cardToken() + * .deviceDetails() + * .eventType() + * .sessionId() + * .sessionType() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): EmbedSessionGeneratedWebhookEvent = + EmbedSessionGeneratedWebhookEvent( + checkRequired("accountToken", accountToken), + checkRequired("cardToken", cardToken), + checkRequired("deviceDetails", deviceDetails), + checkRequired("eventType", eventType), + checkRequired("sessionId", sessionId), + checkRequired("sessionType", sessionType), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LithicInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): EmbedSessionGeneratedWebhookEvent = apply { + if (validated) { + return@apply + } + + accountToken() + cardToken() + deviceDetails().validate() + eventType().validate() + sessionId() + sessionType().validate() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (accountToken.asKnown().isPresent) 1 else 0) + + (if (cardToken.asKnown().isPresent) 1 else 0) + + (deviceDetails.asKnown().getOrNull()?.validity() ?: 0) + + (eventType.asKnown().getOrNull()?.validity() ?: 0) + + (if (sessionId.asKnown().isPresent) 1 else 0) + + (sessionType.asKnown().getOrNull()?.validity() ?: 0) + + /** Details about the request that generated the embed session */ + class EmbedDeviceDetails + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val ipAddress: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("ip_address") + @ExcludeMissing + ipAddress: JsonField = JsonMissing.of() + ) : this(ipAddress, mutableMapOf()) + + /** + * The IP address recorded for the request that generated the event + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun ipAddress(): String = ipAddress.getRequired("ip_address") + + /** + * Returns the raw JSON value of [ipAddress]. + * + * Unlike [ipAddress], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("ip_address") @ExcludeMissing fun _ipAddress(): JsonField = ipAddress + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [EmbedDeviceDetails]. + * + * The following fields are required: + * ```java + * .ipAddress() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [EmbedDeviceDetails]. */ + class Builder internal constructor() { + + private var ipAddress: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(embedDeviceDetails: EmbedDeviceDetails) = apply { + ipAddress = embedDeviceDetails.ipAddress + additionalProperties = embedDeviceDetails.additionalProperties.toMutableMap() + } + + /** The IP address recorded for the request that generated the event */ + fun ipAddress(ipAddress: String) = ipAddress(JsonField.of(ipAddress)) + + /** + * Sets [Builder.ipAddress] to an arbitrary JSON value. + * + * You should usually call [Builder.ipAddress] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun ipAddress(ipAddress: JsonField) = apply { this.ipAddress = ipAddress } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [EmbedDeviceDetails]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .ipAddress() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): EmbedDeviceDetails = + EmbedDeviceDetails( + checkRequired("ipAddress", ipAddress), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LithicInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): EmbedDeviceDetails = apply { + if (validated) { + return@apply + } + + ipAddress() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = (if (ipAddress.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is EmbedDeviceDetails && + ipAddress == other.ipAddress && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(ipAddress, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "EmbedDeviceDetails{ipAddress=$ipAddress, additionalProperties=$additionalProperties}" + } + + /** The type of event */ + class EventType @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is on an + * older version than the API, then the API may respond with new members that the SDK is + * unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val EMBED_SESSION_GENERATED = of("embed.session_generated") + + @JvmStatic fun of(value: String) = EventType(JsonField.of(value)) + } + + /** An enum containing [EventType]'s known values. */ + enum class Known { + EMBED_SESSION_GENERATED + } + + /** + * An enum containing [EventType]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [EventType] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + EMBED_SESSION_GENERATED, + /** + * An enum member indicating that [EventType] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + EMBED_SESSION_GENERATED -> Value.EMBED_SESSION_GENERATED + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws LithicInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + EMBED_SESSION_GENERATED -> Known.EMBED_SESSION_GENERATED + else -> throw LithicInvalidDataException("Unknown EventType: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LithicInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): EventType = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is EventType && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The type of embed session that was generated */ + class SessionType @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is on an + * older version than the API, then the API may respond with new members that the SDK is + * unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val CARD_EMBED = of("CARD_EMBED") + + @JvmField val PIN_SETTING_EMBED = of("PIN_SETTING_EMBED") + + @JvmStatic fun of(value: String) = SessionType(JsonField.of(value)) + } + + /** An enum containing [SessionType]'s known values. */ + enum class Known { + CARD_EMBED, + PIN_SETTING_EMBED, + } + + /** + * An enum containing [SessionType]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [SessionType] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + CARD_EMBED, + PIN_SETTING_EMBED, + /** + * An enum member indicating that [SessionType] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + CARD_EMBED -> Value.CARD_EMBED + PIN_SETTING_EMBED -> Value.PIN_SETTING_EMBED + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws LithicInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + CARD_EMBED -> Known.CARD_EMBED + PIN_SETTING_EMBED -> Known.PIN_SETTING_EMBED + else -> throw LithicInvalidDataException("Unknown SessionType: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LithicInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): SessionType = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is SessionType && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is EmbedSessionGeneratedWebhookEvent && + accountToken == other.accountToken && + cardToken == other.cardToken && + deviceDetails == other.deviceDetails && + eventType == other.eventType && + sessionId == other.sessionId && + sessionType == other.sessionType && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash( + accountToken, + cardToken, + deviceDetails, + eventType, + sessionId, + sessionType, + additionalProperties, + ) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "EmbedSessionGeneratedWebhookEvent{accountToken=$accountToken, cardToken=$cardToken, deviceDetails=$deviceDetails, eventType=$eventType, sessionId=$sessionId, sessionType=$sessionType, additionalProperties=$additionalProperties}" +} diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EmbedViewedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EmbedViewedWebhookEvent.kt new file mode 100644 index 000000000..f0eb2759d --- /dev/null +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EmbedViewedWebhookEvent.kt @@ -0,0 +1,857 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.lithic.api.models + +import com.fasterxml.jackson.annotation.JsonAnyGetter +import com.fasterxml.jackson.annotation.JsonAnySetter +import com.fasterxml.jackson.annotation.JsonCreator +import com.fasterxml.jackson.annotation.JsonProperty +import com.lithic.api.core.Enum +import com.lithic.api.core.ExcludeMissing +import com.lithic.api.core.JsonField +import com.lithic.api.core.JsonMissing +import com.lithic.api.core.JsonValue +import com.lithic.api.core.checkRequired +import com.lithic.api.errors.LithicInvalidDataException +import java.util.Collections +import java.util.Objects +import kotlin.jvm.optionals.getOrNull + +class EmbedViewedWebhookEvent +@JsonCreator(mode = JsonCreator.Mode.DISABLED) +private constructor( + private val accountToken: JsonField, + private val cardToken: JsonField, + private val deviceDetails: JsonField, + private val embedType: JsonField, + private val eventType: JsonField, + private val sessionId: JsonField, + private val additionalProperties: MutableMap, +) { + + @JsonCreator + private constructor( + @JsonProperty("account_token") + @ExcludeMissing + accountToken: JsonField = JsonMissing.of(), + @JsonProperty("card_token") @ExcludeMissing cardToken: JsonField = JsonMissing.of(), + @JsonProperty("device_details") + @ExcludeMissing + deviceDetails: JsonField = JsonMissing.of(), + @JsonProperty("embed_type") + @ExcludeMissing + embedType: JsonField = JsonMissing.of(), + @JsonProperty("event_type") + @ExcludeMissing + eventType: JsonField = JsonMissing.of(), + @JsonProperty("session_id") @ExcludeMissing sessionId: JsonField = JsonMissing.of(), + ) : this( + accountToken, + cardToken, + deviceDetails, + embedType, + eventType, + sessionId, + mutableMapOf(), + ) + + /** + * The token of the account associated with the card + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun accountToken(): String = accountToken.getRequired("account_token") + + /** + * The token of the card whose details were revealed + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun cardToken(): String = cardToken.getRequired("card_token") + + /** + * Details about the request that revealed the card detail + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun deviceDetails(): EmbedDeviceDetails = deviceDetails.getRequired("device_details") + + /** + * The type of card detail that was revealed + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun embedType(): EmbedType = embedType.getRequired("embed_type") + + /** + * The type of event + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun eventType(): EventType = eventType.getRequired("event_type") + + /** + * The identifier shared by webhook events for the same embed session. + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun sessionId(): String = sessionId.getRequired("session_id") + + /** + * Returns the raw JSON value of [accountToken]. + * + * Unlike [accountToken], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("account_token") + @ExcludeMissing + fun _accountToken(): JsonField = accountToken + + /** + * Returns the raw JSON value of [cardToken]. + * + * Unlike [cardToken], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("card_token") @ExcludeMissing fun _cardToken(): JsonField = cardToken + + /** + * Returns the raw JSON value of [deviceDetails]. + * + * Unlike [deviceDetails], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("device_details") + @ExcludeMissing + fun _deviceDetails(): JsonField = deviceDetails + + /** + * Returns the raw JSON value of [embedType]. + * + * Unlike [embedType], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("embed_type") @ExcludeMissing fun _embedType(): JsonField = embedType + + /** + * Returns the raw JSON value of [eventType]. + * + * Unlike [eventType], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("event_type") @ExcludeMissing fun _eventType(): JsonField = eventType + + /** + * Returns the raw JSON value of [sessionId]. + * + * Unlike [sessionId], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("session_id") @ExcludeMissing fun _sessionId(): JsonField = sessionId + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [EmbedViewedWebhookEvent]. + * + * The following fields are required: + * ```java + * .accountToken() + * .cardToken() + * .deviceDetails() + * .embedType() + * .eventType() + * .sessionId() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [EmbedViewedWebhookEvent]. */ + class Builder internal constructor() { + + private var accountToken: JsonField? = null + private var cardToken: JsonField? = null + private var deviceDetails: JsonField? = null + private var embedType: JsonField? = null + private var eventType: JsonField? = null + private var sessionId: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(embedViewedWebhookEvent: EmbedViewedWebhookEvent) = apply { + accountToken = embedViewedWebhookEvent.accountToken + cardToken = embedViewedWebhookEvent.cardToken + deviceDetails = embedViewedWebhookEvent.deviceDetails + embedType = embedViewedWebhookEvent.embedType + eventType = embedViewedWebhookEvent.eventType + sessionId = embedViewedWebhookEvent.sessionId + additionalProperties = embedViewedWebhookEvent.additionalProperties.toMutableMap() + } + + /** The token of the account associated with the card */ + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) + + /** + * Sets [Builder.accountToken] to an arbitrary JSON value. + * + * You should usually call [Builder.accountToken] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } + + /** The token of the card whose details were revealed */ + fun cardToken(cardToken: String) = cardToken(JsonField.of(cardToken)) + + /** + * Sets [Builder.cardToken] to an arbitrary JSON value. + * + * You should usually call [Builder.cardToken] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun cardToken(cardToken: JsonField) = apply { this.cardToken = cardToken } + + /** Details about the request that revealed the card detail */ + fun deviceDetails(deviceDetails: EmbedDeviceDetails) = + deviceDetails(JsonField.of(deviceDetails)) + + /** + * Sets [Builder.deviceDetails] to an arbitrary JSON value. + * + * You should usually call [Builder.deviceDetails] with a well-typed [EmbedDeviceDetails] + * value instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun deviceDetails(deviceDetails: JsonField) = apply { + this.deviceDetails = deviceDetails + } + + /** The type of card detail that was revealed */ + fun embedType(embedType: EmbedType) = embedType(JsonField.of(embedType)) + + /** + * Sets [Builder.embedType] to an arbitrary JSON value. + * + * You should usually call [Builder.embedType] with a well-typed [EmbedType] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun embedType(embedType: JsonField) = apply { this.embedType = embedType } + + /** The type of event */ + fun eventType(eventType: EventType) = eventType(JsonField.of(eventType)) + + /** + * Sets [Builder.eventType] to an arbitrary JSON value. + * + * You should usually call [Builder.eventType] with a well-typed [EventType] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun eventType(eventType: JsonField) = apply { this.eventType = eventType } + + /** The identifier shared by webhook events for the same embed session. */ + fun sessionId(sessionId: String) = sessionId(JsonField.of(sessionId)) + + /** + * Sets [Builder.sessionId] to an arbitrary JSON value. + * + * You should usually call [Builder.sessionId] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun sessionId(sessionId: JsonField) = apply { this.sessionId = sessionId } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [EmbedViewedWebhookEvent]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .accountToken() + * .cardToken() + * .deviceDetails() + * .embedType() + * .eventType() + * .sessionId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): EmbedViewedWebhookEvent = + EmbedViewedWebhookEvent( + checkRequired("accountToken", accountToken), + checkRequired("cardToken", cardToken), + checkRequired("deviceDetails", deviceDetails), + checkRequired("embedType", embedType), + checkRequired("eventType", eventType), + checkRequired("sessionId", sessionId), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LithicInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): EmbedViewedWebhookEvent = apply { + if (validated) { + return@apply + } + + accountToken() + cardToken() + deviceDetails().validate() + embedType().validate() + eventType().validate() + sessionId() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (accountToken.asKnown().isPresent) 1 else 0) + + (if (cardToken.asKnown().isPresent) 1 else 0) + + (deviceDetails.asKnown().getOrNull()?.validity() ?: 0) + + (embedType.asKnown().getOrNull()?.validity() ?: 0) + + (eventType.asKnown().getOrNull()?.validity() ?: 0) + + (if (sessionId.asKnown().isPresent) 1 else 0) + + /** Details about the request that revealed the card detail */ + class EmbedDeviceDetails + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val ipAddress: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("ip_address") + @ExcludeMissing + ipAddress: JsonField = JsonMissing.of() + ) : this(ipAddress, mutableMapOf()) + + /** + * The IP address recorded for the request that generated the event + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun ipAddress(): String = ipAddress.getRequired("ip_address") + + /** + * Returns the raw JSON value of [ipAddress]. + * + * Unlike [ipAddress], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("ip_address") @ExcludeMissing fun _ipAddress(): JsonField = ipAddress + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [EmbedDeviceDetails]. + * + * The following fields are required: + * ```java + * .ipAddress() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [EmbedDeviceDetails]. */ + class Builder internal constructor() { + + private var ipAddress: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(embedDeviceDetails: EmbedDeviceDetails) = apply { + ipAddress = embedDeviceDetails.ipAddress + additionalProperties = embedDeviceDetails.additionalProperties.toMutableMap() + } + + /** The IP address recorded for the request that generated the event */ + fun ipAddress(ipAddress: String) = ipAddress(JsonField.of(ipAddress)) + + /** + * Sets [Builder.ipAddress] to an arbitrary JSON value. + * + * You should usually call [Builder.ipAddress] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun ipAddress(ipAddress: JsonField) = apply { this.ipAddress = ipAddress } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [EmbedDeviceDetails]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .ipAddress() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): EmbedDeviceDetails = + EmbedDeviceDetails( + checkRequired("ipAddress", ipAddress), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LithicInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): EmbedDeviceDetails = apply { + if (validated) { + return@apply + } + + ipAddress() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = (if (ipAddress.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is EmbedDeviceDetails && + ipAddress == other.ipAddress && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(ipAddress, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "EmbedDeviceDetails{ipAddress=$ipAddress, additionalProperties=$additionalProperties}" + } + + /** The type of card detail that was revealed */ + class EmbedType @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is on an + * older version than the API, then the API may respond with new members that the SDK is + * unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val PAN = of("PAN") + + @JvmField val CVV = of("CVV") + + @JvmField val EXP_MONTH = of("EXP_MONTH") + + @JvmField val EXP_YEAR = of("EXP_YEAR") + + @JvmStatic fun of(value: String) = EmbedType(JsonField.of(value)) + } + + /** An enum containing [EmbedType]'s known values. */ + enum class Known { + PAN, + CVV, + EXP_MONTH, + EXP_YEAR, + } + + /** + * An enum containing [EmbedType]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [EmbedType] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + PAN, + CVV, + EXP_MONTH, + EXP_YEAR, + /** + * An enum member indicating that [EmbedType] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + PAN -> Value.PAN + CVV -> Value.CVV + EXP_MONTH -> Value.EXP_MONTH + EXP_YEAR -> Value.EXP_YEAR + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws LithicInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + PAN -> Known.PAN + CVV -> Known.CVV + EXP_MONTH -> Known.EXP_MONTH + EXP_YEAR -> Known.EXP_YEAR + else -> throw LithicInvalidDataException("Unknown EmbedType: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LithicInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): EmbedType = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is EmbedType && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The type of event */ + class EventType @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is on an + * older version than the API, then the API may respond with new members that the SDK is + * unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val EMBED_VIEWED = of("embed.viewed") + + @JvmStatic fun of(value: String) = EventType(JsonField.of(value)) + } + + /** An enum containing [EventType]'s known values. */ + enum class Known { + EMBED_VIEWED + } + + /** + * An enum containing [EventType]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [EventType] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + EMBED_VIEWED, + /** + * An enum member indicating that [EventType] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + EMBED_VIEWED -> Value.EMBED_VIEWED + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws LithicInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + EMBED_VIEWED -> Known.EMBED_VIEWED + else -> throw LithicInvalidDataException("Unknown EventType: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LithicInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): EventType = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is EventType && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is EmbedViewedWebhookEvent && + accountToken == other.accountToken && + cardToken == other.cardToken && + deviceDetails == other.deviceDetails && + embedType == other.embedType && + eventType == other.eventType && + sessionId == other.sessionId && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash( + accountToken, + cardToken, + deviceDetails, + embedType, + eventType, + sessionId, + additionalProperties, + ) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "EmbedViewedWebhookEvent{accountToken=$accountToken, cardToken=$cardToken, deviceDetails=$deviceDetails, embedType=$embedType, eventType=$eventType, sessionId=$sessionId, additionalProperties=$additionalProperties}" +} diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt index 9aed3f5d2..fb5a6891b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt @@ -63,7 +63,7 @@ private constructor( /** * The type of event that occurred. Possible values: * - account_holder_document.updated: Occurs when an account holder's document upload status has - * been updated + * been updated. * - account_holder.created: Occurs when a new account_holder is created. * - account_holder.updated: Occurs when an account_holder is updated. * - account_holder.verification: Occurs when an asynchronous account_holder's verification is @@ -113,10 +113,21 @@ private constructor( * * This event will be deprecated in the future. We recommend using `tokenization.updated` * instead. - * - dispute_evidence.upload_failed: Occurs when a dispute evidence upload fails. - * - dispute_transaction.created: Occurs when a new dispute transaction is created - * - dispute_transaction.updated: Occurs when a dispute transaction is updated - * - dispute.updated: Occurs when a dispute is updated. + * - dispute_evidence.upload_failed: Occurs when an evidence upload fails for a dispute filed + * through the Chargebacks API (`/v1/disputes`). + * + * This event is not emitted for Managed Disputes. + * - dispute_transaction.created: Occurs when a new dispute transaction is created for a Managed + * Disputes case. + * - dispute_transaction.updated: Occurs when a dispute transaction for a Managed Disputes case + * is updated. + * - dispute.updated: Occurs when a dispute filed through the Chargebacks API (`/v1/disputes`) + * is created or updated. + * + * This event is not emitted for Managed Disputes. Use `dispute_transaction.created` and + * `dispute_transaction.updated` instead. + * - embed.session_generated: Occurs when a card embed session is successfully generated. + * - embed.viewed: Occurs when a card detail is successfully revealed through an embed. * - external_bank_account.created: Occurs when an external bank account is created. * - external_bank_account.updated: Occurs when an external bank account is updated. * - external_payment.created: Occurs when an external payment is created. @@ -135,12 +146,12 @@ private constructor( * - payment_transaction.created: Occurs when a payment transaction is created. * - payment_transaction.updated: Occurs when a payment transaction is updated. * - settlement_report.updated: Occurs when a settlement report is created or updated. - * - statements.created: Occurs when a statement has been created + * - statements.created: Occurs when a statement has been created. * - three_ds_authentication.challenge: The `three_ds_authentication.challenge` event. Upon * receiving this request, the Card Program should issue its own challenge to the cardholder. * After a cardholder challenge is successfully completed, the Card Program needs to respond * back to Lithic by call to - * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/post_v1-three-ds-decisioning-challenge-response). + * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/postthreedschallengeresponse). * Then the cardholder must navigate back to the merchant checkout flow to complete the * transaction. Some merchants will include an `app_requestor_url` for app-based purchases; * Lithic recommends triggering a redirect to that URL after the cardholder completes an @@ -271,7 +282,7 @@ private constructor( /** * The type of event that occurred. Possible values: * - account_holder_document.updated: Occurs when an account holder's document upload status - * has been updated + * has been updated. * - account_holder.created: Occurs when a new account_holder is created. * - account_holder.updated: Occurs when an account_holder is updated. * - account_holder.verification: Occurs when an asynchronous account_holder's verification @@ -325,10 +336,21 @@ private constructor( * * This event will be deprecated in the future. We recommend using `tokenization.updated` * instead. - * - dispute_evidence.upload_failed: Occurs when a dispute evidence upload fails. - * - dispute_transaction.created: Occurs when a new dispute transaction is created - * - dispute_transaction.updated: Occurs when a dispute transaction is updated - * - dispute.updated: Occurs when a dispute is updated. + * - dispute_evidence.upload_failed: Occurs when an evidence upload fails for a dispute + * filed through the Chargebacks API (`/v1/disputes`). + * + * This event is not emitted for Managed Disputes. + * - dispute_transaction.created: Occurs when a new dispute transaction is created for a + * Managed Disputes case. + * - dispute_transaction.updated: Occurs when a dispute transaction for a Managed Disputes + * case is updated. + * - dispute.updated: Occurs when a dispute filed through the Chargebacks API + * (`/v1/disputes`) is created or updated. + * + * This event is not emitted for Managed Disputes. Use `dispute_transaction.created` and + * `dispute_transaction.updated` instead. + * - embed.session_generated: Occurs when a card embed session is successfully generated. + * - embed.viewed: Occurs when a card detail is successfully revealed through an embed. * - external_bank_account.created: Occurs when an external bank account is created. * - external_bank_account.updated: Occurs when an external bank account is updated. * - external_payment.created: Occurs when an external payment is created. @@ -347,12 +369,12 @@ private constructor( * - payment_transaction.created: Occurs when a payment transaction is created. * - payment_transaction.updated: Occurs when a payment transaction is updated. * - settlement_report.updated: Occurs when a settlement report is created or updated. - * - statements.created: Occurs when a statement has been created + * - statements.created: Occurs when a statement has been created. * - three_ds_authentication.challenge: The `three_ds_authentication.challenge` event. Upon * receiving this request, the Card Program should issue its own challenge to the * cardholder. After a cardholder challenge is successfully completed, the Card Program * needs to respond back to Lithic by call to - * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/post_v1-three-ds-decisioning-challenge-response). + * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/postthreedschallengeresponse). * Then the cardholder must navigate back to the merchant checkout flow to complete the * transaction. Some merchants will include an `app_requestor_url` for app-based * purchases; Lithic recommends triggering a redirect to that URL after the cardholder @@ -478,7 +500,7 @@ private constructor( /** * The type of event that occurred. Possible values: * - account_holder_document.updated: Occurs when an account holder's document upload status has - * been updated + * been updated. * - account_holder.created: Occurs when a new account_holder is created. * - account_holder.updated: Occurs when an account_holder is updated. * - account_holder.verification: Occurs when an asynchronous account_holder's verification is @@ -528,10 +550,21 @@ private constructor( * * This event will be deprecated in the future. We recommend using `tokenization.updated` * instead. - * - dispute_evidence.upload_failed: Occurs when a dispute evidence upload fails. - * - dispute_transaction.created: Occurs when a new dispute transaction is created - * - dispute_transaction.updated: Occurs when a dispute transaction is updated - * - dispute.updated: Occurs when a dispute is updated. + * - dispute_evidence.upload_failed: Occurs when an evidence upload fails for a dispute filed + * through the Chargebacks API (`/v1/disputes`). + * + * This event is not emitted for Managed Disputes. + * - dispute_transaction.created: Occurs when a new dispute transaction is created for a Managed + * Disputes case. + * - dispute_transaction.updated: Occurs when a dispute transaction for a Managed Disputes case + * is updated. + * - dispute.updated: Occurs when a dispute filed through the Chargebacks API (`/v1/disputes`) + * is created or updated. + * + * This event is not emitted for Managed Disputes. Use `dispute_transaction.created` and + * `dispute_transaction.updated` instead. + * - embed.session_generated: Occurs when a card embed session is successfully generated. + * - embed.viewed: Occurs when a card detail is successfully revealed through an embed. * - external_bank_account.created: Occurs when an external bank account is created. * - external_bank_account.updated: Occurs when an external bank account is updated. * - external_payment.created: Occurs when an external payment is created. @@ -550,12 +583,12 @@ private constructor( * - payment_transaction.created: Occurs when a payment transaction is created. * - payment_transaction.updated: Occurs when a payment transaction is updated. * - settlement_report.updated: Occurs when a settlement report is created or updated. - * - statements.created: Occurs when a statement has been created + * - statements.created: Occurs when a statement has been created. * - three_ds_authentication.challenge: The `three_ds_authentication.challenge` event. Upon * receiving this request, the Card Program should issue its own challenge to the cardholder. * After a cardholder challenge is successfully completed, the Card Program needs to respond * back to Lithic by call to - * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/post_v1-three-ds-decisioning-challenge-response). + * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/postthreedschallengeresponse). * Then the cardholder must navigate back to the merchant checkout flow to complete the * transaction. Some merchants will include an `app_requestor_url` for app-based purchases; * Lithic recommends triggering a redirect to that URL after the cardholder completes an @@ -663,6 +696,10 @@ private constructor( @JvmField val DISPUTE_UPDATED = of("dispute.updated") + @JvmField val EMBED_SESSION_GENERATED = of("embed.session_generated") + + @JvmField val EMBED_VIEWED = of("embed.viewed") + @JvmField val EXTERNAL_BANK_ACCOUNT_CREATED = of("external_bank_account.created") @JvmField val EXTERNAL_BANK_ACCOUNT_UPDATED = of("external_bank_account.updated") @@ -759,6 +796,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -830,6 +869,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -908,6 +949,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Value.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Value.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Value.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Value.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Value.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Value.EXTERNAL_PAYMENT_CREATED @@ -987,6 +1030,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Known.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Known.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Known.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Known.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Known.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Known.EXTERNAL_PAYMENT_CREATED diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt index e4bed4337..3b0ffb8cf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt @@ -321,7 +321,7 @@ private constructor( /** * The type of event that occurred. Possible values: * - account_holder_document.updated: Occurs when an account holder's document upload status has - * been updated + * been updated. * - account_holder.created: Occurs when a new account_holder is created. * - account_holder.updated: Occurs when an account_holder is updated. * - account_holder.verification: Occurs when an asynchronous account_holder's verification is @@ -371,10 +371,21 @@ private constructor( * * This event will be deprecated in the future. We recommend using `tokenization.updated` * instead. - * - dispute_evidence.upload_failed: Occurs when a dispute evidence upload fails. - * - dispute_transaction.created: Occurs when a new dispute transaction is created - * - dispute_transaction.updated: Occurs when a dispute transaction is updated - * - dispute.updated: Occurs when a dispute is updated. + * - dispute_evidence.upload_failed: Occurs when an evidence upload fails for a dispute filed + * through the Chargebacks API (`/v1/disputes`). + * + * This event is not emitted for Managed Disputes. + * - dispute_transaction.created: Occurs when a new dispute transaction is created for a Managed + * Disputes case. + * - dispute_transaction.updated: Occurs when a dispute transaction for a Managed Disputes case + * is updated. + * - dispute.updated: Occurs when a dispute filed through the Chargebacks API (`/v1/disputes`) + * is created or updated. + * + * This event is not emitted for Managed Disputes. Use `dispute_transaction.created` and + * `dispute_transaction.updated` instead. + * - embed.session_generated: Occurs when a card embed session is successfully generated. + * - embed.viewed: Occurs when a card detail is successfully revealed through an embed. * - external_bank_account.created: Occurs when an external bank account is created. * - external_bank_account.updated: Occurs when an external bank account is updated. * - external_payment.created: Occurs when an external payment is created. @@ -393,12 +404,12 @@ private constructor( * - payment_transaction.created: Occurs when a payment transaction is created. * - payment_transaction.updated: Occurs when a payment transaction is updated. * - settlement_report.updated: Occurs when a settlement report is created or updated. - * - statements.created: Occurs when a statement has been created + * - statements.created: Occurs when a statement has been created. * - three_ds_authentication.challenge: The `three_ds_authentication.challenge` event. Upon * receiving this request, the Card Program should issue its own challenge to the cardholder. * After a cardholder challenge is successfully completed, the Card Program needs to respond * back to Lithic by call to - * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/post_v1-three-ds-decisioning-challenge-response). + * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/postthreedschallengeresponse). * Then the cardholder must navigate back to the merchant checkout flow to complete the * transaction. Some merchants will include an `app_requestor_url` for app-based purchases; * Lithic recommends triggering a redirect to that URL after the cardholder completes an @@ -506,6 +517,10 @@ private constructor( @JvmField val DISPUTE_UPDATED = of("dispute.updated") + @JvmField val EMBED_SESSION_GENERATED = of("embed.session_generated") + + @JvmField val EMBED_VIEWED = of("embed.viewed") + @JvmField val EXTERNAL_BANK_ACCOUNT_CREATED = of("external_bank_account.created") @JvmField val EXTERNAL_BANK_ACCOUNT_UPDATED = of("external_bank_account.updated") @@ -602,6 +617,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -673,6 +690,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -751,6 +770,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Value.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Value.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Value.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Value.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Value.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Value.EXTERNAL_PAYMENT_CREATED @@ -830,6 +851,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Known.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Known.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Known.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Known.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Known.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Known.EXTERNAL_PAYMENT_CREATED diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt index d71b5c602..1ac9217f3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt @@ -331,7 +331,7 @@ private constructor( /** * The type of event that occurred. Possible values: * - account_holder_document.updated: Occurs when an account holder's document upload status has - * been updated + * been updated. * - account_holder.created: Occurs when a new account_holder is created. * - account_holder.updated: Occurs when an account_holder is updated. * - account_holder.verification: Occurs when an asynchronous account_holder's verification is @@ -381,10 +381,21 @@ private constructor( * * This event will be deprecated in the future. We recommend using `tokenization.updated` * instead. - * - dispute_evidence.upload_failed: Occurs when a dispute evidence upload fails. - * - dispute_transaction.created: Occurs when a new dispute transaction is created - * - dispute_transaction.updated: Occurs when a dispute transaction is updated - * - dispute.updated: Occurs when a dispute is updated. + * - dispute_evidence.upload_failed: Occurs when an evidence upload fails for a dispute filed + * through the Chargebacks API (`/v1/disputes`). + * + * This event is not emitted for Managed Disputes. + * - dispute_transaction.created: Occurs when a new dispute transaction is created for a Managed + * Disputes case. + * - dispute_transaction.updated: Occurs when a dispute transaction for a Managed Disputes case + * is updated. + * - dispute.updated: Occurs when a dispute filed through the Chargebacks API (`/v1/disputes`) + * is created or updated. + * + * This event is not emitted for Managed Disputes. Use `dispute_transaction.created` and + * `dispute_transaction.updated` instead. + * - embed.session_generated: Occurs when a card embed session is successfully generated. + * - embed.viewed: Occurs when a card detail is successfully revealed through an embed. * - external_bank_account.created: Occurs when an external bank account is created. * - external_bank_account.updated: Occurs when an external bank account is updated. * - external_payment.created: Occurs when an external payment is created. @@ -403,12 +414,12 @@ private constructor( * - payment_transaction.created: Occurs when a payment transaction is created. * - payment_transaction.updated: Occurs when a payment transaction is updated. * - settlement_report.updated: Occurs when a settlement report is created or updated. - * - statements.created: Occurs when a statement has been created + * - statements.created: Occurs when a statement has been created. * - three_ds_authentication.challenge: The `three_ds_authentication.challenge` event. Upon * receiving this request, the Card Program should issue its own challenge to the cardholder. * After a cardholder challenge is successfully completed, the Card Program needs to respond * back to Lithic by call to - * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/post_v1-three-ds-decisioning-challenge-response). + * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/postthreedschallengeresponse). * Then the cardholder must navigate back to the merchant checkout flow to complete the * transaction. Some merchants will include an `app_requestor_url` for app-based purchases; * Lithic recommends triggering a redirect to that URL after the cardholder completes an @@ -516,6 +527,10 @@ private constructor( @JvmField val DISPUTE_UPDATED = of("dispute.updated") + @JvmField val EMBED_SESSION_GENERATED = of("embed.session_generated") + + @JvmField val EMBED_VIEWED = of("embed.viewed") + @JvmField val EXTERNAL_BANK_ACCOUNT_CREATED = of("external_bank_account.created") @JvmField val EXTERNAL_BANK_ACCOUNT_UPDATED = of("external_bank_account.updated") @@ -612,6 +627,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -683,6 +700,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -761,6 +780,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Value.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Value.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Value.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Value.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Value.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Value.EXTERNAL_PAYMENT_CREATED @@ -840,6 +861,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Known.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Known.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Known.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Known.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Known.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Known.EXTERNAL_PAYMENT_CREATED diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt index 2d6c6594a..120a4e9c0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt @@ -654,7 +654,7 @@ private constructor( /** * The type of event that occurred. Possible values: * - account_holder_document.updated: Occurs when an account holder's document upload status has - * been updated + * been updated. * - account_holder.created: Occurs when a new account_holder is created. * - account_holder.updated: Occurs when an account_holder is updated. * - account_holder.verification: Occurs when an asynchronous account_holder's verification is @@ -704,10 +704,21 @@ private constructor( * * This event will be deprecated in the future. We recommend using `tokenization.updated` * instead. - * - dispute_evidence.upload_failed: Occurs when a dispute evidence upload fails. - * - dispute_transaction.created: Occurs when a new dispute transaction is created - * - dispute_transaction.updated: Occurs when a dispute transaction is updated - * - dispute.updated: Occurs when a dispute is updated. + * - dispute_evidence.upload_failed: Occurs when an evidence upload fails for a dispute filed + * through the Chargebacks API (`/v1/disputes`). + * + * This event is not emitted for Managed Disputes. + * - dispute_transaction.created: Occurs when a new dispute transaction is created for a Managed + * Disputes case. + * - dispute_transaction.updated: Occurs when a dispute transaction for a Managed Disputes case + * is updated. + * - dispute.updated: Occurs when a dispute filed through the Chargebacks API (`/v1/disputes`) + * is created or updated. + * + * This event is not emitted for Managed Disputes. Use `dispute_transaction.created` and + * `dispute_transaction.updated` instead. + * - embed.session_generated: Occurs when a card embed session is successfully generated. + * - embed.viewed: Occurs when a card detail is successfully revealed through an embed. * - external_bank_account.created: Occurs when an external bank account is created. * - external_bank_account.updated: Occurs when an external bank account is updated. * - external_payment.created: Occurs when an external payment is created. @@ -726,12 +737,12 @@ private constructor( * - payment_transaction.created: Occurs when a payment transaction is created. * - payment_transaction.updated: Occurs when a payment transaction is updated. * - settlement_report.updated: Occurs when a settlement report is created or updated. - * - statements.created: Occurs when a statement has been created + * - statements.created: Occurs when a statement has been created. * - three_ds_authentication.challenge: The `three_ds_authentication.challenge` event. Upon * receiving this request, the Card Program should issue its own challenge to the cardholder. * After a cardholder challenge is successfully completed, the Card Program needs to respond * back to Lithic by call to - * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/post_v1-three-ds-decisioning-challenge-response). + * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/postthreedschallengeresponse). * Then the cardholder must navigate back to the merchant checkout flow to complete the * transaction. Some merchants will include an `app_requestor_url` for app-based purchases; * Lithic recommends triggering a redirect to that URL after the cardholder completes an @@ -839,6 +850,10 @@ private constructor( @JvmField val DISPUTE_UPDATED = of("dispute.updated") + @JvmField val EMBED_SESSION_GENERATED = of("embed.session_generated") + + @JvmField val EMBED_VIEWED = of("embed.viewed") + @JvmField val EXTERNAL_BANK_ACCOUNT_CREATED = of("external_bank_account.created") @JvmField val EXTERNAL_BANK_ACCOUNT_UPDATED = of("external_bank_account.updated") @@ -935,6 +950,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -1006,6 +1023,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -1084,6 +1103,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Value.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Value.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Value.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Value.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Value.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Value.EXTERNAL_PAYMENT_CREATED @@ -1163,6 +1184,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Known.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Known.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Known.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Known.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Known.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Known.EXTERNAL_PAYMENT_CREATED diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt index 91b9d23b7..0bee59c6c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt @@ -511,6 +511,10 @@ private constructor( @JvmField val DISPUTE_UPDATED = of("dispute.updated") + @JvmField val EMBED_SESSION_GENERATED = of("embed.session_generated") + + @JvmField val EMBED_VIEWED = of("embed.viewed") + @JvmField val EXTERNAL_BANK_ACCOUNT_CREATED = of("external_bank_account.created") @JvmField val EXTERNAL_BANK_ACCOUNT_UPDATED = of("external_bank_account.updated") @@ -607,6 +611,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -678,6 +684,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -756,6 +764,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Value.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Value.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Value.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Value.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Value.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Value.EXTERNAL_PAYMENT_CREATED @@ -835,6 +845,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Known.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Known.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Known.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Known.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Known.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Known.EXTERNAL_PAYMENT_CREATED diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt index cef49defd..91de84e1c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt @@ -677,7 +677,7 @@ private constructor( /** * The type of event that occurred. Possible values: * - account_holder_document.updated: Occurs when an account holder's document upload status has - * been updated + * been updated. * - account_holder.created: Occurs when a new account_holder is created. * - account_holder.updated: Occurs when an account_holder is updated. * - account_holder.verification: Occurs when an asynchronous account_holder's verification is @@ -727,10 +727,21 @@ private constructor( * * This event will be deprecated in the future. We recommend using `tokenization.updated` * instead. - * - dispute_evidence.upload_failed: Occurs when a dispute evidence upload fails. - * - dispute_transaction.created: Occurs when a new dispute transaction is created - * - dispute_transaction.updated: Occurs when a dispute transaction is updated - * - dispute.updated: Occurs when a dispute is updated. + * - dispute_evidence.upload_failed: Occurs when an evidence upload fails for a dispute filed + * through the Chargebacks API (`/v1/disputes`). + * + * This event is not emitted for Managed Disputes. + * - dispute_transaction.created: Occurs when a new dispute transaction is created for a Managed + * Disputes case. + * - dispute_transaction.updated: Occurs when a dispute transaction for a Managed Disputes case + * is updated. + * - dispute.updated: Occurs when a dispute filed through the Chargebacks API (`/v1/disputes`) + * is created or updated. + * + * This event is not emitted for Managed Disputes. Use `dispute_transaction.created` and + * `dispute_transaction.updated` instead. + * - embed.session_generated: Occurs when a card embed session is successfully generated. + * - embed.viewed: Occurs when a card detail is successfully revealed through an embed. * - external_bank_account.created: Occurs when an external bank account is created. * - external_bank_account.updated: Occurs when an external bank account is updated. * - external_payment.created: Occurs when an external payment is created. @@ -749,12 +760,12 @@ private constructor( * - payment_transaction.created: Occurs when a payment transaction is created. * - payment_transaction.updated: Occurs when a payment transaction is updated. * - settlement_report.updated: Occurs when a settlement report is created or updated. - * - statements.created: Occurs when a statement has been created + * - statements.created: Occurs when a statement has been created. * - three_ds_authentication.challenge: The `three_ds_authentication.challenge` event. Upon * receiving this request, the Card Program should issue its own challenge to the cardholder. * After a cardholder challenge is successfully completed, the Card Program needs to respond * back to Lithic by call to - * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/post_v1-three-ds-decisioning-challenge-response). + * [/v1/three_ds_decisioning/challenge_response](https://docs.lithic.com/reference/postthreedschallengeresponse). * Then the cardholder must navigate back to the merchant checkout flow to complete the * transaction. Some merchants will include an `app_requestor_url` for app-based purchases; * Lithic recommends triggering a redirect to that URL after the cardholder completes an @@ -862,6 +873,10 @@ private constructor( @JvmField val DISPUTE_UPDATED = of("dispute.updated") + @JvmField val EMBED_SESSION_GENERATED = of("embed.session_generated") + + @JvmField val EMBED_VIEWED = of("embed.viewed") + @JvmField val EXTERNAL_BANK_ACCOUNT_CREATED = of("external_bank_account.created") @JvmField val EXTERNAL_BANK_ACCOUNT_UPDATED = of("external_bank_account.updated") @@ -958,6 +973,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -1029,6 +1046,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED, DISPUTE_TRANSACTION_UPDATED, DISPUTE_UPDATED, + EMBED_SESSION_GENERATED, + EMBED_VIEWED, EXTERNAL_BANK_ACCOUNT_CREATED, EXTERNAL_BANK_ACCOUNT_UPDATED, EXTERNAL_PAYMENT_CREATED, @@ -1107,6 +1126,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Value.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Value.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Value.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Value.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Value.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Value.EXTERNAL_PAYMENT_CREATED @@ -1186,6 +1207,8 @@ private constructor( DISPUTE_TRANSACTION_CREATED -> Known.DISPUTE_TRANSACTION_CREATED DISPUTE_TRANSACTION_UPDATED -> Known.DISPUTE_TRANSACTION_UPDATED DISPUTE_UPDATED -> Known.DISPUTE_UPDATED + EMBED_SESSION_GENERATED -> Known.EMBED_SESSION_GENERATED + EMBED_VIEWED -> Known.EMBED_VIEWED EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED EXTERNAL_PAYMENT_CREATED -> Known.EXTERNAL_PAYMENT_CREATED diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt index 6bed53d3c..c4a356486 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt @@ -40,7 +40,7 @@ private constructor( fun businessAccountToken(): Optional = Optional.ofNullable(businessAccountToken) - /** External Payment category to be returned. */ + /** The external rail the funds moved on */ fun category(): Optional = Optional.ofNullable(category) /** @@ -146,7 +146,7 @@ private constructor( fun businessAccountToken(businessAccountToken: Optional) = businessAccountToken(businessAccountToken.getOrNull()) - /** External Payment category to be returned. */ + /** The external rail the funds moved on */ fun category(category: ExternalPaymentCategory?) = apply { this.category = category } /** Alias for calling [Builder.category] with `category.orElse(null)`. */ @@ -359,7 +359,7 @@ private constructor( } .build() - /** External Payment category to be returned. */ + /** The external rail the funds moved on */ class ExternalPaymentCategory @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt index 11c7c61b2..b1d767e79 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt @@ -27,8 +27,9 @@ private constructor( fun balanceDate(): Optional = Optional.ofNullable(balanceDate) /** - * Balance after a given financial event occured. For example, passing the event_token of a $5 - * CARD_CLEARING financial event will return a balance decreased by $5 + * Balance after a given financial event occured. Note: if an account receives multiple events + * around the same time whose financial impacts cancel out, a balance lookup by one of those + * event tokens may return 404, since their combined impact on the account is zero. */ fun lastTransactionEventToken(): Optional = Optional.ofNullable(lastTransactionEventToken) @@ -92,8 +93,9 @@ private constructor( balanceDate(balanceDate.getOrNull()) /** - * Balance after a given financial event occured. For example, passing the event_token of a - * $5 CARD_CLEARING financial event will return a balance decreased by $5 + * Balance after a given financial event occured. Note: if an account receives multiple + * events around the same time whose financial impacts cancel out, a balance lookup by one + * of those event tokens may return 404, since their combined impact on the account is zero. */ fun lastTransactionEventToken(lastTransactionEventToken: String?) = apply { this.lastTransactionEventToken = lastTransactionEventToken diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt index 4361e278b..02efa0c00 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt @@ -611,6 +611,10 @@ private constructor( @JvmField val LITHIC_NETWORK_PAYMENT = of("LITHIC_NETWORK_PAYMENT") + @JvmField val LITHIC_PROGRAM_TRANSFER = of("LITHIC_PROGRAM_TRANSFER") + + @JvmField val BANK_PROGRAM_TRANSFER = of("BANK_PROGRAM_TRANSFER") + @JvmField val ANNUAL = of("ANNUAL") @JvmField val ANNUAL_REVERSAL = of("ANNUAL_REVERSAL") @@ -625,6 +629,12 @@ private constructor( @JvmField val ACCOUNT_TO_ACCOUNT = of("ACCOUNT_TO_ACCOUNT") + @JvmField val STABLECOIN_RECEIVED = of("STABLECOIN_RECEIVED") + + @JvmField val STABLECOIN_REVIEWED = of("STABLECOIN_REVIEWED") + + @JvmField val STABLECOIN_SETTLED = of("STABLECOIN_SETTLED") + @JvmStatic fun of(value: String) = FinancialEventType(JsonField.of(value)) } @@ -711,6 +721,8 @@ private constructor( RETURNED_PAYMENT, RETURNED_PAYMENT_REVERSAL, LITHIC_NETWORK_PAYMENT, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, ANNUAL, ANNUAL_REVERSAL, QUARTERLY, @@ -718,6 +730,9 @@ private constructor( MONTHLY, MONTHLY_REVERSAL, ACCOUNT_TO_ACCOUNT, + STABLECOIN_RECEIVED, + STABLECOIN_REVIEWED, + STABLECOIN_SETTLED, } /** @@ -811,6 +826,8 @@ private constructor( RETURNED_PAYMENT, RETURNED_PAYMENT_REVERSAL, LITHIC_NETWORK_PAYMENT, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, ANNUAL, ANNUAL_REVERSAL, QUARTERLY, @@ -818,6 +835,9 @@ private constructor( MONTHLY, MONTHLY_REVERSAL, ACCOUNT_TO_ACCOUNT, + STABLECOIN_RECEIVED, + STABLECOIN_REVIEWED, + STABLECOIN_SETTLED, /** * An enum member indicating that [FinancialEventType] was instantiated with an unknown * value. @@ -915,6 +935,8 @@ private constructor( RETURNED_PAYMENT -> Value.RETURNED_PAYMENT RETURNED_PAYMENT_REVERSAL -> Value.RETURNED_PAYMENT_REVERSAL LITHIC_NETWORK_PAYMENT -> Value.LITHIC_NETWORK_PAYMENT + LITHIC_PROGRAM_TRANSFER -> Value.LITHIC_PROGRAM_TRANSFER + BANK_PROGRAM_TRANSFER -> Value.BANK_PROGRAM_TRANSFER ANNUAL -> Value.ANNUAL ANNUAL_REVERSAL -> Value.ANNUAL_REVERSAL QUARTERLY -> Value.QUARTERLY @@ -922,6 +944,9 @@ private constructor( MONTHLY -> Value.MONTHLY MONTHLY_REVERSAL -> Value.MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT -> Value.ACCOUNT_TO_ACCOUNT + STABLECOIN_RECEIVED -> Value.STABLECOIN_RECEIVED + STABLECOIN_REVIEWED -> Value.STABLECOIN_REVIEWED + STABLECOIN_SETTLED -> Value.STABLECOIN_SETTLED else -> Value._UNKNOWN } @@ -1017,6 +1042,8 @@ private constructor( RETURNED_PAYMENT -> Known.RETURNED_PAYMENT RETURNED_PAYMENT_REVERSAL -> Known.RETURNED_PAYMENT_REVERSAL LITHIC_NETWORK_PAYMENT -> Known.LITHIC_NETWORK_PAYMENT + LITHIC_PROGRAM_TRANSFER -> Known.LITHIC_PROGRAM_TRANSFER + BANK_PROGRAM_TRANSFER -> Known.BANK_PROGRAM_TRANSFER ANNUAL -> Known.ANNUAL ANNUAL_REVERSAL -> Known.ANNUAL_REVERSAL QUARTERLY -> Known.QUARTERLY @@ -1024,6 +1051,9 @@ private constructor( MONTHLY -> Known.MONTHLY MONTHLY_REVERSAL -> Known.MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT -> Known.ACCOUNT_TO_ACCOUNT + STABLECOIN_RECEIVED -> Known.STABLECOIN_RECEIVED + STABLECOIN_REVIEWED -> Known.STABLECOIN_REVIEWED + STABLECOIN_SETTLED -> Known.STABLECOIN_SETTLED else -> throw LithicInvalidDataException("Unknown FinancialEventType: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MonitoringCase.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MonitoringCase.kt index 79ee5a303..884e52260 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MonitoringCase.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MonitoringCase.kt @@ -31,7 +31,7 @@ private constructor( private val pendingTransactions: JsonField, private val priority: JsonField, private val queueToken: JsonField, - private val resolution: JsonField, + private val resolution: JsonField, private val resolutionNotes: JsonField, private val resolved: JsonField, private val ruleToken: JsonField, @@ -65,7 +65,7 @@ private constructor( queueToken: JsonField = JsonMissing.of(), @JsonProperty("resolution") @ExcludeMissing - resolution: JsonField = JsonMissing.of(), + resolution: JsonField = JsonMissing.of(), @JsonProperty("resolution_notes") @ExcludeMissing resolutionNotes: JsonField = JsonMissing.of(), @@ -169,17 +169,13 @@ private constructor( fun queueToken(): String = queueToken.getRequired("queue_token") /** - * Outcome recorded when a case is resolved: - * - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent - * - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud - * - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false positive - * - `NO_ACTION_REQUIRED` - No further action is required - * - `ESCALATED_EXTERNAL` - The case was escalated to an external party + * Outcome recorded when the case was resolved, from the `allowed_resolutions` configured on the + * case's queue * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ - fun resolution(): Optional = resolution.getOptional("resolution") + fun resolution(): Optional = resolution.getOptional("resolution") /** * Free-form notes describing the resolution @@ -318,9 +314,7 @@ private constructor( * * Unlike [resolution], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("resolution") - @ExcludeMissing - fun _resolution(): JsonField = resolution + @JsonProperty("resolution") @ExcludeMissing fun _resolution(): JsonField = resolution /** * Returns the raw JSON value of [resolutionNotes]. @@ -434,7 +428,7 @@ private constructor( private var pendingTransactions: JsonField? = null private var priority: JsonField? = null private var queueToken: JsonField? = null - private var resolution: JsonField? = null + private var resolution: JsonField? = null private var resolutionNotes: JsonField? = null private var resolved: JsonField? = null private var ruleToken: JsonField? = null @@ -578,29 +572,22 @@ private constructor( fun queueToken(queueToken: JsonField) = apply { this.queueToken = queueToken } /** - * Outcome recorded when a case is resolved: - * - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent - * - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud - * - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false positive - * - `NO_ACTION_REQUIRED` - No further action is required - * - `ESCALATED_EXTERNAL` - The case was escalated to an external party + * Outcome recorded when the case was resolved, from the `allowed_resolutions` configured on + * the case's queue */ - fun resolution(resolution: ResolutionOutcome?) = - resolution(JsonField.ofNullable(resolution)) + fun resolution(resolution: String?) = resolution(JsonField.ofNullable(resolution)) /** Alias for calling [Builder.resolution] with `resolution.orElse(null)`. */ - fun resolution(resolution: Optional) = resolution(resolution.getOrNull()) + fun resolution(resolution: Optional) = resolution(resolution.getOrNull()) /** * Sets [Builder.resolution] to an arbitrary JSON value. * - * You should usually call [Builder.resolution] with a well-typed [ResolutionOutcome] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * You should usually call [Builder.resolution] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. */ - fun resolution(resolution: JsonField) = apply { - this.resolution = resolution - } + fun resolution(resolution: JsonField) = apply { this.resolution = resolution } /** Free-form notes describing the resolution */ fun resolutionNotes(resolutionNotes: String?) = @@ -820,7 +807,7 @@ private constructor( pendingTransactions() priority().validate() queueToken() - resolution().ifPresent { it.validate() } + resolution() resolutionNotes() resolved() ruleToken() @@ -855,7 +842,7 @@ private constructor( (if (pendingTransactions.asKnown().isPresent) 1 else 0) + (priority.asKnown().getOrNull()?.validity() ?: 0) + (if (queueToken.asKnown().isPresent) 1 else 0) + - (resolution.asKnown().getOrNull()?.validity() ?: 0) + + (if (resolution.asKnown().isPresent) 1 else 0) + (if (resolutionNotes.asKnown().isPresent) 1 else 0) + (if (resolved.asKnown().isPresent) 1 else 0) + (if (ruleToken.asKnown().isPresent) 1 else 0) + diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ParsedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ParsedWebhookEvent.kt index b052da680..3bdbe366e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ParsedWebhookEvent.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ParsedWebhookEvent.kt @@ -86,6 +86,8 @@ private constructor( null, private val disputeUpdated: DisputeUpdatedWebhookEvent? = null, private val disputeEvidenceUploadFailed: DisputeEvidenceUploadFailedWebhookEvent? = null, + private val embedSessionGenerated: EmbedSessionGeneratedWebhookEvent? = null, + private val embedViewed: EmbedViewedWebhookEvent? = null, private val externalBankAccountCreated: ExternalBankAccountCreatedWebhookEvent? = null, private val externalBankAccountUpdated: ExternalBankAccountUpdatedWebhookEvent? = null, private val externalPaymentCreated: ExternalPaymentCreatedWebhookEvent? = null, @@ -235,6 +237,11 @@ private constructor( fun disputeEvidenceUploadFailed(): Optional = Optional.ofNullable(disputeEvidenceUploadFailed) + fun embedSessionGenerated(): Optional = + Optional.ofNullable(embedSessionGenerated) + + fun embedViewed(): Optional = Optional.ofNullable(embedViewed) + fun externalBankAccountCreated(): Optional = Optional.ofNullable(externalBankAccountCreated) @@ -406,6 +413,10 @@ private constructor( fun isDisputeEvidenceUploadFailed(): Boolean = disputeEvidenceUploadFailed != null + fun isEmbedSessionGenerated(): Boolean = embedSessionGenerated != null + + fun isEmbedViewed(): Boolean = embedViewed != null + fun isExternalBankAccountCreated(): Boolean = externalBankAccountCreated != null fun isExternalBankAccountUpdated(): Boolean = externalBankAccountUpdated != null @@ -582,6 +593,11 @@ private constructor( fun asDisputeEvidenceUploadFailed(): DisputeEvidenceUploadFailedWebhookEvent = disputeEvidenceUploadFailed.getOrThrow("disputeEvidenceUploadFailed") + fun asEmbedSessionGenerated(): EmbedSessionGeneratedWebhookEvent = + embedSessionGenerated.getOrThrow("embedSessionGenerated") + + fun asEmbedViewed(): EmbedViewedWebhookEvent = embedViewed.getOrThrow("embedViewed") + fun asExternalBankAccountCreated(): ExternalBankAccountCreatedWebhookEvent = externalBankAccountCreated.getOrThrow("externalBankAccountCreated") @@ -778,6 +794,9 @@ private constructor( disputeUpdated != null -> visitor.visitDisputeUpdated(disputeUpdated) disputeEvidenceUploadFailed != null -> visitor.visitDisputeEvidenceUploadFailed(disputeEvidenceUploadFailed) + embedSessionGenerated != null -> + visitor.visitEmbedSessionGenerated(embedSessionGenerated) + embedViewed != null -> visitor.visitEmbedViewed(embedViewed) externalBankAccountCreated != null -> visitor.visitExternalBankAccountCreated(externalBankAccountCreated) externalBankAccountUpdated != null -> @@ -1040,6 +1059,16 @@ private constructor( disputeEvidenceUploadFailed.validate() } + override fun visitEmbedSessionGenerated( + embedSessionGenerated: EmbedSessionGeneratedWebhookEvent + ) { + embedSessionGenerated.validate() + } + + override fun visitEmbedViewed(embedViewed: EmbedViewedWebhookEvent) { + embedViewed.validate() + } + override fun visitExternalBankAccountCreated( externalBankAccountCreated: ExternalBankAccountCreatedWebhookEvent ) { @@ -1367,6 +1396,13 @@ private constructor( disputeEvidenceUploadFailed: DisputeEvidenceUploadFailedWebhookEvent ) = disputeEvidenceUploadFailed.validity() + override fun visitEmbedSessionGenerated( + embedSessionGenerated: EmbedSessionGeneratedWebhookEvent + ) = embedSessionGenerated.validity() + + override fun visitEmbedViewed(embedViewed: EmbedViewedWebhookEvent) = + embedViewed.validity() + override fun visitExternalBankAccountCreated( externalBankAccountCreated: ExternalBankAccountCreatedWebhookEvent ) = externalBankAccountCreated.validity() @@ -1535,6 +1571,8 @@ private constructor( digitalWalletTokenizationUpdated == other.digitalWalletTokenizationUpdated && disputeUpdated == other.disputeUpdated && disputeEvidenceUploadFailed == other.disputeEvidenceUploadFailed && + embedSessionGenerated == other.embedSessionGenerated && + embedViewed == other.embedViewed && externalBankAccountCreated == other.externalBankAccountCreated && externalBankAccountUpdated == other.externalBankAccountUpdated && externalPaymentCreated == other.externalPaymentCreated && @@ -1605,6 +1643,8 @@ private constructor( digitalWalletTokenizationUpdated, disputeUpdated, disputeEvidenceUploadFailed, + embedSessionGenerated, + embedViewed, externalBankAccountCreated, externalBankAccountUpdated, externalPaymentCreated, @@ -1694,6 +1734,9 @@ private constructor( disputeUpdated != null -> "ParsedWebhookEvent{disputeUpdated=$disputeUpdated}" disputeEvidenceUploadFailed != null -> "ParsedWebhookEvent{disputeEvidenceUploadFailed=$disputeEvidenceUploadFailed}" + embedSessionGenerated != null -> + "ParsedWebhookEvent{embedSessionGenerated=$embedSessionGenerated}" + embedViewed != null -> "ParsedWebhookEvent{embedViewed=$embedViewed}" externalBankAccountCreated != null -> "ParsedWebhookEvent{externalBankAccountCreated=$externalBankAccountCreated}" externalBankAccountUpdated != null -> @@ -1946,6 +1989,14 @@ private constructor( disputeEvidenceUploadFailed: DisputeEvidenceUploadFailedWebhookEvent ) = ParsedWebhookEvent(disputeEvidenceUploadFailed = disputeEvidenceUploadFailed) + @JvmStatic + fun ofEmbedSessionGenerated(embedSessionGenerated: EmbedSessionGeneratedWebhookEvent) = + ParsedWebhookEvent(embedSessionGenerated = embedSessionGenerated) + + @JvmStatic + fun ofEmbedViewed(embedViewed: EmbedViewedWebhookEvent) = + ParsedWebhookEvent(embedViewed = embedViewed) + @JvmStatic fun ofExternalBankAccountCreated( externalBankAccountCreated: ExternalBankAccountCreatedWebhookEvent @@ -2233,6 +2284,10 @@ private constructor( disputeEvidenceUploadFailed: DisputeEvidenceUploadFailedWebhookEvent ): T + fun visitEmbedSessionGenerated(embedSessionGenerated: EmbedSessionGeneratedWebhookEvent): T + + fun visitEmbedViewed(embedViewed: EmbedViewedWebhookEvent): T + fun visitExternalBankAccountCreated( externalBankAccountCreated: ExternalBankAccountCreatedWebhookEvent ): T @@ -2571,6 +2626,11 @@ private constructor( ?.let { ParsedWebhookEvent(disputeEvidenceUploadFailed = it, _json = json) }, + tryDeserialize(node, jacksonTypeRef()) + ?.let { ParsedWebhookEvent(embedSessionGenerated = it, _json = json) }, + tryDeserialize(node, jacksonTypeRef())?.let { + ParsedWebhookEvent(embedViewed = it, _json = json) + }, tryDeserialize( node, jacksonTypeRef(), @@ -2824,6 +2884,9 @@ private constructor( value.disputeUpdated != null -> generator.writeObject(value.disputeUpdated) value.disputeEvidenceUploadFailed != null -> generator.writeObject(value.disputeEvidenceUploadFailed) + value.embedSessionGenerated != null -> + generator.writeObject(value.embedSessionGenerated) + value.embedViewed != null -> generator.writeObject(value.embedViewed) value.externalBankAccountCreated != null -> generator.writeObject(value.externalBankAccountCreated) value.externalBankAccountUpdated != null -> diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt index 70820adc3..78771264d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt @@ -1132,6 +1132,8 @@ private constructor( @JvmField val WIRE = of("WIRE") + @JvmField val STABLECOIN = of("STABLECOIN") + @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") @JvmField val FEE = of("FEE") @@ -1172,6 +1174,8 @@ private constructor( @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val PROGRAM_TRANSFER = of("PROGRAM_TRANSFER") + @JvmStatic fun of(value: String) = TransactionCategory(JsonField.of(value)) } @@ -1179,6 +1183,7 @@ private constructor( enum class Known { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -1199,6 +1204,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -1213,6 +1219,7 @@ private constructor( enum class Value { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -1233,6 +1240,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an unknown * value. @@ -1251,6 +1259,7 @@ private constructor( when (this) { ACH -> Value.ACH WIRE -> Value.WIRE + STABLECOIN -> Value.STABLECOIN BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING FEE -> Value.FEE REWARD -> Value.REWARD @@ -1271,6 +1280,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1287,6 +1297,7 @@ private constructor( when (this) { ACH -> Known.ACH WIRE -> Known.WIRE + STABLECOIN -> Known.STABLECOIN BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING FEE -> Known.FEE REWARD -> Known.REWARD @@ -1307,6 +1318,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Known.MANAGEMENT_DISBURSEMENT HOLD -> Known.HOLD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Known.PROGRAM_TRANSFER else -> throw LithicInvalidDataException("Unknown TransactionCategory: $value") } @@ -1630,6 +1642,12 @@ private constructor( * and funds returned to sender. * * `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal Reserve. * + * Stablecoin events: + * * `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending release to + * available balance. + * * `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. + * * `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ @@ -1863,6 +1881,12 @@ private constructor( * Reserve and funds returned to sender. * * `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal * Reserve. + * + * Stablecoin events: + * * `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending release to + * available balance. + * * `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. + * * `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. */ fun type(type: PaymentEventType) = type(JsonField.of(type)) @@ -2209,6 +2233,12 @@ private constructor( * * `WIRE_RETURN_OUTBOUND_SETTLED` - Outbound wire return accepted by the Federal Reserve * and funds returned to sender. * * `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal Reserve. + * + * Stablecoin events: + * * `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending release to + * available balance. + * * `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. + * * `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. */ class PaymentEventType @JsonCreator @@ -2270,6 +2300,12 @@ private constructor( @JvmField val WIRE_RETURN_OUTBOUND_REJECTED = of("WIRE_RETURN_OUTBOUND_REJECTED") + @JvmField val STABLECOIN_RECEIVED = of("STABLECOIN_RECEIVED") + + @JvmField val STABLECOIN_REVIEWED = of("STABLECOIN_REVIEWED") + + @JvmField val STABLECOIN_SETTLED = of("STABLECOIN_SETTLED") + @JvmStatic fun of(value: String) = PaymentEventType(JsonField.of(value)) } @@ -2297,6 +2333,9 @@ private constructor( WIRE_RETURN_OUTBOUND_SENT, WIRE_RETURN_OUTBOUND_SETTLED, WIRE_RETURN_OUTBOUND_REJECTED, + STABLECOIN_RECEIVED, + STABLECOIN_REVIEWED, + STABLECOIN_SETTLED, } /** @@ -2332,6 +2371,9 @@ private constructor( WIRE_RETURN_OUTBOUND_SENT, WIRE_RETURN_OUTBOUND_SETTLED, WIRE_RETURN_OUTBOUND_REJECTED, + STABLECOIN_RECEIVED, + STABLECOIN_REVIEWED, + STABLECOIN_SETTLED, /** * An enum member indicating that [PaymentEventType] was instantiated with an * unknown value. @@ -2370,6 +2412,9 @@ private constructor( WIRE_RETURN_OUTBOUND_SENT -> Value.WIRE_RETURN_OUTBOUND_SENT WIRE_RETURN_OUTBOUND_SETTLED -> Value.WIRE_RETURN_OUTBOUND_SETTLED WIRE_RETURN_OUTBOUND_REJECTED -> Value.WIRE_RETURN_OUTBOUND_REJECTED + STABLECOIN_RECEIVED -> Value.STABLECOIN_RECEIVED + STABLECOIN_REVIEWED -> Value.STABLECOIN_REVIEWED + STABLECOIN_SETTLED -> Value.STABLECOIN_SETTLED else -> Value._UNKNOWN } @@ -2406,6 +2451,9 @@ private constructor( WIRE_RETURN_OUTBOUND_SENT -> Known.WIRE_RETURN_OUTBOUND_SENT WIRE_RETURN_OUTBOUND_SETTLED -> Known.WIRE_RETURN_OUTBOUND_SETTLED WIRE_RETURN_OUTBOUND_REJECTED -> Known.WIRE_RETURN_OUTBOUND_REJECTED + STABLECOIN_RECEIVED -> Known.STABLECOIN_RECEIVED + STABLECOIN_REVIEWED -> Known.STABLECOIN_REVIEWED + STABLECOIN_SETTLED -> Known.STABLECOIN_SETTLED else -> throw LithicInvalidDataException("Unknown PaymentEventType: $value") } @@ -3172,6 +3220,7 @@ private constructor( private val companyId: JsonField, private val overrideCompanyName: JsonField, private val receiptRoutingNumber: JsonField, + private val recipientName: JsonField, private val retries: JsonField, private val returnReasonCode: JsonField, private val traceNumbers: JsonField>, @@ -3198,6 +3247,9 @@ private constructor( @JsonProperty("receipt_routing_number") @ExcludeMissing receiptRoutingNumber: JsonField = JsonMissing.of(), + @JsonProperty("recipient_name") + @ExcludeMissing + recipientName: JsonField = JsonMissing.of(), @JsonProperty("retries") @ExcludeMissing retries: JsonField = JsonMissing.of(), @@ -3214,6 +3266,7 @@ private constructor( companyId, overrideCompanyName, receiptRoutingNumber, + recipientName, retries, returnReasonCode, traceNumbers, @@ -3272,6 +3325,14 @@ private constructor( fun receiptRoutingNumber(): Optional = receiptRoutingNumber.getOptional("receipt_routing_number") + /** + * Name of the recipient on ACH receipts. Reflects the originating bank's record + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun recipientName(): Optional = recipientName.getOptional("recipient_name") + /** * Number of retries attempted * @@ -3351,6 +3412,16 @@ private constructor( @ExcludeMissing fun _receiptRoutingNumber(): JsonField = receiptRoutingNumber + /** + * Returns the raw JSON value of [recipientName]. + * + * Unlike [recipientName], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("recipient_name") + @ExcludeMissing + fun _recipientName(): JsonField = recipientName + /** * Returns the raw JSON value of [retries]. * @@ -3412,6 +3483,7 @@ private constructor( private var companyId: JsonField = JsonMissing.of() private var overrideCompanyName: JsonField = JsonMissing.of() private var receiptRoutingNumber: JsonField = JsonMissing.of() + private var recipientName: JsonField = JsonMissing.of() private var retries: JsonField = JsonMissing.of() private var returnReasonCode: JsonField = JsonMissing.of() private var traceNumbers: JsonField>? = null @@ -3425,6 +3497,7 @@ private constructor( companyId = achMethodAttributes.companyId overrideCompanyName = achMethodAttributes.overrideCompanyName receiptRoutingNumber = achMethodAttributes.receiptRoutingNumber + recipientName = achMethodAttributes.recipientName retries = achMethodAttributes.retries returnReasonCode = achMethodAttributes.returnReasonCode traceNumbers = achMethodAttributes.traceNumbers.map { it.toMutableList() } @@ -3546,6 +3619,25 @@ private constructor( this.receiptRoutingNumber = receiptRoutingNumber } + /** Name of the recipient on ACH receipts. Reflects the originating bank's record */ + fun recipientName(recipientName: String?) = + recipientName(JsonField.ofNullable(recipientName)) + + /** Alias for calling [Builder.recipientName] with `recipientName.orElse(null)`. */ + fun recipientName(recipientName: Optional) = + recipientName(recipientName.getOrNull()) + + /** + * Sets [Builder.recipientName] to an arbitrary JSON value. + * + * You should usually call [Builder.recipientName] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun recipientName(recipientName: JsonField) = apply { + this.recipientName = recipientName + } + /** Number of retries attempted */ fun retries(retries: Long?) = retries(JsonField.ofNullable(retries)) @@ -3659,6 +3751,7 @@ private constructor( companyId, overrideCompanyName, receiptRoutingNumber, + recipientName, retries, returnReasonCode, (traceNumbers ?: JsonMissing.of()).map { it.toImmutable() }, @@ -3689,6 +3782,7 @@ private constructor( companyId() overrideCompanyName() receiptRoutingNumber() + recipientName() retries() returnReasonCode() traceNumbers() @@ -3717,6 +3811,7 @@ private constructor( (if (companyId.asKnown().isPresent) 1 else 0) + (if (overrideCompanyName.asKnown().isPresent) 1 else 0) + (if (receiptRoutingNumber.asKnown().isPresent) 1 else 0) + + (if (recipientName.asKnown().isPresent) 1 else 0) + (if (retries.asKnown().isPresent) 1 else 0) + (if (returnReasonCode.asKnown().isPresent) 1 else 0) + (traceNumbers.asKnown().getOrNull()?.size ?: 0) @@ -3899,6 +3994,7 @@ private constructor( companyId == other.companyId && overrideCompanyName == other.overrideCompanyName && receiptRoutingNumber == other.receiptRoutingNumber && + recipientName == other.recipientName && retries == other.retries && returnReasonCode == other.returnReasonCode && traceNumbers == other.traceNumbers && @@ -3913,6 +4009,7 @@ private constructor( companyId, overrideCompanyName, receiptRoutingNumber, + recipientName, retries, returnReasonCode, traceNumbers, @@ -3923,7 +4020,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "AchMethodAttributes{secCode=$secCode, achHoldPeriod=$achHoldPeriod, addenda=$addenda, companyId=$companyId, overrideCompanyName=$overrideCompanyName, receiptRoutingNumber=$receiptRoutingNumber, retries=$retries, returnReasonCode=$returnReasonCode, traceNumbers=$traceNumbers, additionalProperties=$additionalProperties}" + "AchMethodAttributes{secCode=$secCode, achHoldPeriod=$achHoldPeriod, addenda=$addenda, companyId=$companyId, overrideCompanyName=$overrideCompanyName, receiptRoutingNumber=$receiptRoutingNumber, recipientName=$recipientName, retries=$retries, returnReasonCode=$returnReasonCode, traceNumbers=$traceNumbers, additionalProperties=$additionalProperties}" } class WireMethodAttributes diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt index 4c4a0518f..46abda514 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt @@ -637,6 +637,8 @@ private constructor( @JvmField val RETURNED = of("RETURNED") + @JvmField val REVERSED = of("REVERSED") + @JvmField val SETTLED = of("SETTLED") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) @@ -647,6 +649,7 @@ private constructor( DECLINED, PENDING, RETURNED, + REVERSED, SETTLED, } @@ -663,6 +666,7 @@ private constructor( DECLINED, PENDING, RETURNED, + REVERSED, SETTLED, /** An enum member indicating that [Status] was instantiated with an unknown value. */ _UNKNOWN, @@ -680,6 +684,7 @@ private constructor( DECLINED -> Value.DECLINED PENDING -> Value.PENDING RETURNED -> Value.RETURNED + REVERSED -> Value.REVERSED SETTLED -> Value.SETTLED else -> Value._UNKNOWN } @@ -698,6 +703,7 @@ private constructor( DECLINED -> Known.DECLINED PENDING -> Known.PENDING RETURNED -> Known.RETURNED + REVERSED -> Known.REVERSED SETTLED -> Known.SETTLED else -> throw LithicInvalidDataException("Unknown Status: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Queue.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Queue.kt index 7ec052e01..d3b495a52 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Queue.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Queue.kt @@ -10,7 +10,9 @@ import com.lithic.api.core.ExcludeMissing import com.lithic.api.core.JsonField import com.lithic.api.core.JsonMissing import com.lithic.api.core.JsonValue +import com.lithic.api.core.checkKnown import com.lithic.api.core.checkRequired +import com.lithic.api.core.toImmutable import com.lithic.api.errors.LithicInvalidDataException import java.time.OffsetDateTime import java.util.Collections @@ -23,6 +25,7 @@ class Queue @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val token: JsonField, + private val allowedResolutions: JsonField>, private val caseCounts: JsonField, private val created: JsonField, private val description: JsonField, @@ -34,6 +37,9 @@ private constructor( @JsonCreator private constructor( @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(), + @JsonProperty("allowed_resolutions") + @ExcludeMissing + allowedResolutions: JsonField> = JsonMissing.of(), @JsonProperty("case_counts") @ExcludeMissing caseCounts: JsonField = JsonMissing.of(), @@ -47,7 +53,16 @@ private constructor( @JsonProperty("updated") @ExcludeMissing updated: JsonField = JsonMissing.of(), - ) : this(token, caseCounts, created, description, name, updated, mutableMapOf()) + ) : this( + token, + allowedResolutions, + caseCounts, + created, + description, + name, + updated, + mutableMapOf(), + ) /** * Globally unique identifier for the queue @@ -57,6 +72,15 @@ private constructor( */ fun token(): String = token.getRequired("token") + /** + * Resolutions that can be recorded on cases in this queue. Always the effective list: the + * queue's own values when it defines them, otherwise the default list + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun allowedResolutions(): List = allowedResolutions.getRequired("allowed_resolutions") + /** * Number of cases in the queue, broken down by status. A status is omitted when the queue has * no cases in that status @@ -105,6 +129,16 @@ private constructor( */ @JsonProperty("token") @ExcludeMissing fun _token(): JsonField = token + /** + * Returns the raw JSON value of [allowedResolutions]. + * + * Unlike [allowedResolutions], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("allowed_resolutions") + @ExcludeMissing + fun _allowedResolutions(): JsonField> = allowedResolutions + /** * Returns the raw JSON value of [caseCounts]. * @@ -162,6 +196,7 @@ private constructor( * The following fields are required: * ```java * .token() + * .allowedResolutions() * .caseCounts() * .created() * .description() @@ -176,6 +211,7 @@ private constructor( class Builder internal constructor() { private var token: JsonField? = null + private var allowedResolutions: JsonField>? = null private var caseCounts: JsonField? = null private var created: JsonField? = null private var description: JsonField? = null @@ -186,6 +222,7 @@ private constructor( @JvmSynthetic internal fun from(queue: Queue) = apply { token = queue.token + allowedResolutions = queue.allowedResolutions.map { it.toMutableList() } caseCounts = queue.caseCounts created = queue.created description = queue.description @@ -205,6 +242,36 @@ private constructor( */ fun token(token: JsonField) = apply { this.token = token } + /** + * Resolutions that can be recorded on cases in this queue. Always the effective list: the + * queue's own values when it defines them, otherwise the default list + */ + fun allowedResolutions(allowedResolutions: List) = + allowedResolutions(JsonField.of(allowedResolutions)) + + /** + * Sets [Builder.allowedResolutions] to an arbitrary JSON value. + * + * You should usually call [Builder.allowedResolutions] with a well-typed `List` + * value instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun allowedResolutions(allowedResolutions: JsonField>) = apply { + this.allowedResolutions = allowedResolutions.map { it.toMutableList() } + } + + /** + * Adds a single [String] to [allowedResolutions]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addAllowedResolution(allowedResolution: String) = apply { + allowedResolutions = + (allowedResolutions ?: JsonField.of(mutableListOf())).also { + checkKnown("allowedResolutions", it).add(allowedResolution) + } + } + /** * Number of cases in the queue, broken down by status. A status is omitted when the queue * has no cases in that status @@ -297,6 +364,7 @@ private constructor( * The following fields are required: * ```java * .token() + * .allowedResolutions() * .caseCounts() * .created() * .description() @@ -309,6 +377,7 @@ private constructor( fun build(): Queue = Queue( checkRequired("token", token), + checkRequired("allowedResolutions", allowedResolutions).map { it.toImmutable() }, checkRequired("caseCounts", caseCounts), checkRequired("created", created), checkRequired("description", description), @@ -334,6 +403,7 @@ private constructor( } token() + allowedResolutions() caseCounts().validate() created() description() @@ -358,6 +428,7 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (if (token.asKnown().isPresent) 1 else 0) + + (allowedResolutions.asKnown().getOrNull()?.size ?: 0) + (caseCounts.asKnown().getOrNull()?.validity() ?: 0) + (if (created.asKnown().isPresent) 1 else 0) + (if (description.asKnown().isPresent) 1 else 0) + @@ -718,6 +789,7 @@ private constructor( return other is Queue && token == other.token && + allowedResolutions == other.allowedResolutions && caseCounts == other.caseCounts && created == other.created && description == other.description && @@ -727,11 +799,20 @@ private constructor( } private val hashCode: Int by lazy { - Objects.hash(token, caseCounts, created, description, name, updated, additionalProperties) + Objects.hash( + token, + allowedResolutions, + caseCounts, + created, + description, + name, + updated, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "Queue{token=$token, caseCounts=$caseCounts, created=$created, description=$description, name=$name, updated=$updated, additionalProperties=$additionalProperties}" + "Queue{token=$token, allowedResolutions=$allowedResolutions, caseCounts=$caseCounts, created=$created, description=$description, name=$name, updated=$updated, additionalProperties=$additionalProperties}" } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResolutionOutcome.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResolutionOutcome.kt deleted file mode 100644 index 164c697a4..000000000 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResolutionOutcome.kt +++ /dev/null @@ -1,168 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -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.errors.LithicInvalidDataException - -/** - * Outcome recorded when a case is resolved: - * - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent - * - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud - * - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false positive - * - `NO_ACTION_REQUIRED` - No further action is required - * - `ESCALATED_EXTERNAL` - The case was escalated to an external party - */ -class ResolutionOutcome @JsonCreator private constructor(private val value: JsonField) : - Enum { - - /** - * Returns this class instance's raw value. - * - * This is usually only useful if this instance was deserialized from data that doesn't match - * any known member, and you want to know that value. For example, if the SDK is on an older - * version than the API, then the API may respond with new members that the SDK is unaware of. - */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - - companion object { - - @JvmField val CONFIRMED_FRAUD = of("CONFIRMED_FRAUD") - - @JvmField val SUSPICIOUS_ACTIVITY = of("SUSPICIOUS_ACTIVITY") - - @JvmField val FALSE_POSITIVE = of("FALSE_POSITIVE") - - @JvmField val NO_ACTION_REQUIRED = of("NO_ACTION_REQUIRED") - - @JvmField val ESCALATED_EXTERNAL = of("ESCALATED_EXTERNAL") - - @JvmStatic fun of(value: String) = ResolutionOutcome(JsonField.of(value)) - } - - /** An enum containing [ResolutionOutcome]'s known values. */ - enum class Known { - CONFIRMED_FRAUD, - SUSPICIOUS_ACTIVITY, - FALSE_POSITIVE, - NO_ACTION_REQUIRED, - ESCALATED_EXTERNAL, - } - - /** - * An enum containing [ResolutionOutcome]'s known values, as well as an [_UNKNOWN] member. - * - * An instance of [ResolutionOutcome] can contain an unknown value in a couple of cases: - * - It was deserialized from data that doesn't match any known member. For example, if the SDK - * is on an older version than the API, then the API may respond with new members that the SDK - * is unaware of. - * - It was constructed with an arbitrary value using the [of] method. - */ - enum class Value { - CONFIRMED_FRAUD, - SUSPICIOUS_ACTIVITY, - FALSE_POSITIVE, - NO_ACTION_REQUIRED, - ESCALATED_EXTERNAL, - /** - * An enum member indicating that [ResolutionOutcome] was instantiated with an unknown - * value. - */ - _UNKNOWN, - } - - /** - * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] if - * the class was instantiated with an unknown value. - * - * Use the [known] method instead if you're certain the value is always known or if you want to - * throw for the unknown case. - */ - fun value(): Value = - when (this) { - CONFIRMED_FRAUD -> Value.CONFIRMED_FRAUD - SUSPICIOUS_ACTIVITY -> Value.SUSPICIOUS_ACTIVITY - FALSE_POSITIVE -> Value.FALSE_POSITIVE - NO_ACTION_REQUIRED -> Value.NO_ACTION_REQUIRED - ESCALATED_EXTERNAL -> Value.ESCALATED_EXTERNAL - else -> Value._UNKNOWN - } - - /** - * Returns an enum member corresponding to this class instance's value. - * - * Use the [value] method instead if you're uncertain the value is always known and don't want - * to throw for the unknown case. - * - * @throws LithicInvalidDataException if this class instance's value is a not a known member. - */ - fun known(): Known = - when (this) { - CONFIRMED_FRAUD -> Known.CONFIRMED_FRAUD - SUSPICIOUS_ACTIVITY -> Known.SUSPICIOUS_ACTIVITY - FALSE_POSITIVE -> Known.FALSE_POSITIVE - NO_ACTION_REQUIRED -> Known.NO_ACTION_REQUIRED - ESCALATED_EXTERNAL -> Known.ESCALATED_EXTERNAL - else -> throw LithicInvalidDataException("Unknown ResolutionOutcome: $value") - } - - /** - * Returns this class instance's primitive wire representation. - * - * This differs from the [toString] method because that method is primarily for debugging and - * generally doesn't throw. - * - * @throws LithicInvalidDataException if this class instance's value does not have the expected - * primitive type. - */ - fun asString(): String = - _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } - - private var validated: Boolean = false - - /** - * Validates that the types of all values in this object match their expected types recursively. - * - * This method is _not_ forwards compatible with new types from the API for existing fields. - * - * @throws LithicInvalidDataException if any value type in this object doesn't match its - * expected type. - */ - fun validate(): ResolutionOutcome = apply { - if (validated) { - return@apply - } - - known() - validated = true - } - - fun isValid(): Boolean = - try { - validate() - true - } catch (e: LithicInvalidDataException) { - false - } - - /** - * Returns a score indicating how many valid values are contained in this object recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is ResolutionOutcome && value == other.value - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() -} diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt index fad18d66f..4bce77220 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt @@ -955,6 +955,8 @@ private constructor( @JvmField val WIRE = of("WIRE") + @JvmField val STABLECOIN = of("STABLECOIN") + @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") @JvmField val FEE = of("FEE") @@ -995,6 +997,8 @@ private constructor( @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val PROGRAM_TRANSFER = of("PROGRAM_TRANSFER") + @JvmStatic fun of(value: String) = TransactionCategory(JsonField.of(value)) } @@ -1002,6 +1006,7 @@ private constructor( enum class Known { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -1022,6 +1027,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -1038,6 +1044,7 @@ private constructor( enum class Value { ACH, WIRE, + STABLECOIN, BALANCE_OR_FUNDING, FEE, REWARD, @@ -1058,6 +1065,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an * unknown value. @@ -1076,6 +1084,7 @@ private constructor( when (this) { ACH -> Value.ACH WIRE -> Value.WIRE + STABLECOIN -> Value.STABLECOIN BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING FEE -> Value.FEE REWARD -> Value.REWARD @@ -1096,6 +1105,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1112,6 +1122,7 @@ private constructor( when (this) { ACH -> Known.ACH WIRE -> Known.WIRE + STABLECOIN -> Known.STABLECOIN BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING FEE -> Known.FEE REWARD -> Known.REWARD @@ -1132,6 +1143,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Known.MANAGEMENT_DISBURSEMENT HOLD -> Known.HOLD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Known.PROGRAM_TRANSFER else -> throw LithicInvalidDataException("Unknown TransactionCategory: $value") } @@ -1377,6 +1389,10 @@ private constructor( @JvmField val LITHIC_NETWORK_PAYMENT = of("LITHIC_NETWORK_PAYMENT") + @JvmField val LITHIC_PROGRAM_TRANSFER = of("LITHIC_PROGRAM_TRANSFER") + + @JvmField val BANK_PROGRAM_TRANSFER = of("BANK_PROGRAM_TRANSFER") + @JvmField val ANNUAL = of("ANNUAL") @JvmField val ANNUAL_REVERSAL = of("ANNUAL_REVERSAL") @@ -1391,6 +1407,12 @@ private constructor( @JvmField val ACCOUNT_TO_ACCOUNT = of("ACCOUNT_TO_ACCOUNT") + @JvmField val STABLECOIN_RECEIVED = of("STABLECOIN_RECEIVED") + + @JvmField val STABLECOIN_REVIEWED = of("STABLECOIN_REVIEWED") + + @JvmField val STABLECOIN_SETTLED = of("STABLECOIN_SETTLED") + @JvmStatic fun of(value: String) = FinancialEventType(JsonField.of(value)) } @@ -1477,6 +1499,8 @@ private constructor( RETURNED_PAYMENT, RETURNED_PAYMENT_REVERSAL, LITHIC_NETWORK_PAYMENT, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, ANNUAL, ANNUAL_REVERSAL, QUARTERLY, @@ -1484,6 +1508,9 @@ private constructor( MONTHLY, MONTHLY_REVERSAL, ACCOUNT_TO_ACCOUNT, + STABLECOIN_RECEIVED, + STABLECOIN_REVIEWED, + STABLECOIN_SETTLED, } /** @@ -1579,6 +1606,8 @@ private constructor( RETURNED_PAYMENT, RETURNED_PAYMENT_REVERSAL, LITHIC_NETWORK_PAYMENT, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, ANNUAL, ANNUAL_REVERSAL, QUARTERLY, @@ -1586,6 +1615,9 @@ private constructor( MONTHLY, MONTHLY_REVERSAL, ACCOUNT_TO_ACCOUNT, + STABLECOIN_RECEIVED, + STABLECOIN_REVIEWED, + STABLECOIN_SETTLED, /** * An enum member indicating that [FinancialEventType] was instantiated with an * unknown value. @@ -1683,6 +1715,8 @@ private constructor( RETURNED_PAYMENT -> Value.RETURNED_PAYMENT RETURNED_PAYMENT_REVERSAL -> Value.RETURNED_PAYMENT_REVERSAL LITHIC_NETWORK_PAYMENT -> Value.LITHIC_NETWORK_PAYMENT + LITHIC_PROGRAM_TRANSFER -> Value.LITHIC_PROGRAM_TRANSFER + BANK_PROGRAM_TRANSFER -> Value.BANK_PROGRAM_TRANSFER ANNUAL -> Value.ANNUAL ANNUAL_REVERSAL -> Value.ANNUAL_REVERSAL QUARTERLY -> Value.QUARTERLY @@ -1690,6 +1724,9 @@ private constructor( MONTHLY -> Value.MONTHLY MONTHLY_REVERSAL -> Value.MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT -> Value.ACCOUNT_TO_ACCOUNT + STABLECOIN_RECEIVED -> Value.STABLECOIN_RECEIVED + STABLECOIN_REVIEWED -> Value.STABLECOIN_REVIEWED + STABLECOIN_SETTLED -> Value.STABLECOIN_SETTLED else -> Value._UNKNOWN } @@ -1785,6 +1822,8 @@ private constructor( RETURNED_PAYMENT -> Known.RETURNED_PAYMENT RETURNED_PAYMENT_REVERSAL -> Known.RETURNED_PAYMENT_REVERSAL LITHIC_NETWORK_PAYMENT -> Known.LITHIC_NETWORK_PAYMENT + LITHIC_PROGRAM_TRANSFER -> Known.LITHIC_PROGRAM_TRANSFER + BANK_PROGRAM_TRANSFER -> Known.BANK_PROGRAM_TRANSFER ANNUAL -> Known.ANNUAL ANNUAL_REVERSAL -> Known.ANNUAL_REVERSAL QUARTERLY -> Known.QUARTERLY @@ -1792,6 +1831,9 @@ private constructor( MONTHLY -> Known.MONTHLY MONTHLY_REVERSAL -> Known.MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT -> Known.ACCOUNT_TO_ACCOUNT + STABLECOIN_RECEIVED -> Known.STABLECOIN_RECEIVED + STABLECOIN_REVIEWED -> Known.STABLECOIN_REVIEWED + STABLECOIN_SETTLED -> Known.STABLECOIN_SETTLED else -> throw LithicInvalidDataException("Unknown FinancialEventType: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningChallengeResponseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningChallengeResponseParams.kt index 6862e5eca..4a8737c43 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningChallengeResponseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningChallengeResponseParams.kt @@ -11,7 +11,7 @@ import java.util.Objects /** * Card program's response to a 3DS Challenge Request. Challenge Request is emitted as a webhook - * [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) + * [three_ds_authentication.challenge](https://docs.lithic.com/reference/threedsauthenticationchallengewebhook) * and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to * receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information). */ diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringCaseUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringCaseUpdateParams.kt index 4e1d519d7..4b520751b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringCaseUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringCaseUpdateParams.kt @@ -59,17 +59,13 @@ private constructor( fun priority(): Optional = body.priority() /** - * Outcome recorded when a case is resolved: - * - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent - * - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud - * - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false positive - * - `NO_ACTION_REQUIRED` - No further action is required - * - `ESCALATED_EXTERNAL` - The case was escalated to an external party + * Resolution to record on the case. Must be one of the `allowed_resolutions` configured on the + * case's queue, otherwise the request is rejected with a `400` * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ - fun resolution(): Optional = body.resolution() + fun resolution(): Optional = body.resolution() /** * Notes describing the resolution @@ -143,7 +139,7 @@ private constructor( * * Unlike [resolution], this method doesn't throw if the JSON field has an unexpected type. */ - fun _resolution(): JsonField = body._resolution() + fun _resolution(): JsonField = body._resolution() /** * Returns the raw JSON value of [resolutionNotes]. @@ -282,25 +278,19 @@ private constructor( fun priority(priority: JsonField) = apply { body.priority(priority) } /** - * Outcome recorded when a case is resolved: - * - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent - * - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud - * - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false positive - * - `NO_ACTION_REQUIRED` - No further action is required - * - `ESCALATED_EXTERNAL` - The case was escalated to an external party + * Resolution to record on the case. Must be one of the `allowed_resolutions` configured on + * the case's queue, otherwise the request is rejected with a `400` */ - fun resolution(resolution: ResolutionOutcome) = apply { body.resolution(resolution) } + fun resolution(resolution: String) = apply { body.resolution(resolution) } /** * Sets [Builder.resolution] to an arbitrary JSON value. * - * You should usually call [Builder.resolution] with a well-typed [ResolutionOutcome] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * You should usually call [Builder.resolution] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. */ - fun resolution(resolution: JsonField) = apply { - body.resolution(resolution) - } + fun resolution(resolution: JsonField) = apply { body.resolution(resolution) } /** Notes describing the resolution */ fun resolutionNotes(resolutionNotes: String) = apply { @@ -534,7 +524,7 @@ private constructor( private val actorToken: JsonField, private val assignee: JsonField, private val priority: JsonField, - private val resolution: JsonField, + private val resolution: JsonField, private val resolutionNotes: JsonField, private val slaDeadline: JsonField, private val status: JsonField, @@ -556,7 +546,7 @@ private constructor( priority: JsonField = JsonMissing.of(), @JsonProperty("resolution") @ExcludeMissing - resolution: JsonField = JsonMissing.of(), + resolution: JsonField = JsonMissing.of(), @JsonProperty("resolution_notes") @ExcludeMissing resolutionNotes: JsonField = JsonMissing.of(), @@ -608,17 +598,13 @@ private constructor( fun priority(): Optional = priority.getOptional("priority") /** - * Outcome recorded when a case is resolved: - * - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent - * - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud - * - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false positive - * - `NO_ACTION_REQUIRED` - No further action is required - * - `ESCALATED_EXTERNAL` - The case was escalated to an external party + * Resolution to record on the case. Must be one of the `allowed_resolutions` configured on + * the case's queue, otherwise the request is rejected with a `400` * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ - fun resolution(): Optional = resolution.getOptional("resolution") + fun resolution(): Optional = resolution.getOptional("resolution") /** * Notes describing the resolution @@ -698,7 +684,7 @@ private constructor( */ @JsonProperty("resolution") @ExcludeMissing - fun _resolution(): JsonField = resolution + fun _resolution(): JsonField = resolution /** * Returns the raw JSON value of [resolutionNotes]. @@ -764,7 +750,7 @@ private constructor( private var actorToken: JsonField = JsonMissing.of() private var assignee: JsonField = JsonMissing.of() private var priority: JsonField = JsonMissing.of() - private var resolution: JsonField = JsonMissing.of() + private var resolution: JsonField = JsonMissing.of() private var resolutionNotes: JsonField = JsonMissing.of() private var slaDeadline: JsonField = JsonMissing.of() private var status: JsonField = JsonMissing.of() @@ -830,25 +816,19 @@ private constructor( fun priority(priority: JsonField) = apply { this.priority = priority } /** - * Outcome recorded when a case is resolved: - * - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent - * - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud - * - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false positive - * - `NO_ACTION_REQUIRED` - No further action is required - * - `ESCALATED_EXTERNAL` - The case was escalated to an external party + * Resolution to record on the case. Must be one of the `allowed_resolutions` configured + * on the case's queue, otherwise the request is rejected with a `400` */ - fun resolution(resolution: ResolutionOutcome) = resolution(JsonField.of(resolution)) + fun resolution(resolution: String) = resolution(JsonField.of(resolution)) /** * Sets [Builder.resolution] to an arbitrary JSON value. * - * You should usually call [Builder.resolution] with a well-typed [ResolutionOutcome] - * value instead. This method is primarily for setting the field to an undocumented or - * not yet supported value. + * You should usually call [Builder.resolution] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. */ - fun resolution(resolution: JsonField) = apply { - this.resolution = resolution - } + fun resolution(resolution: JsonField) = apply { this.resolution = resolution } /** Notes describing the resolution */ fun resolutionNotes(resolutionNotes: String) = @@ -989,7 +969,7 @@ private constructor( actorToken() assignee() priority().ifPresent { it.validate() } - resolution().ifPresent { it.validate() } + resolution() resolutionNotes() slaDeadline() status().ifPresent { it.validate() } @@ -1017,7 +997,7 @@ private constructor( (if (actorToken.asKnown().isPresent) 1 else 0) + (if (assignee.asKnown().isPresent) 1 else 0) + (priority.asKnown().getOrNull()?.validity() ?: 0) + - (resolution.asKnown().getOrNull()?.validity() ?: 0) + + (if (resolution.asKnown().isPresent) 1 else 0) + (if (resolutionNotes.asKnown().isPresent) 1 else 0) + (if (slaDeadline.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringQueueCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringQueueCreateParams.kt index 468449c80..f3cd36b2c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringQueueCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringQueueCreateParams.kt @@ -11,9 +11,11 @@ import com.lithic.api.core.JsonField import com.lithic.api.core.JsonMissing import com.lithic.api.core.JsonValue import com.lithic.api.core.Params +import com.lithic.api.core.checkKnown import com.lithic.api.core.checkRequired import com.lithic.api.core.http.Headers import com.lithic.api.core.http.QueryParams +import com.lithic.api.core.toImmutable import com.lithic.api.errors.LithicInvalidDataException import java.util.Collections import java.util.Objects @@ -36,6 +38,15 @@ private constructor( */ fun name(): String = body.name() + /** + * Resolutions that can be recorded on cases in this queue. Omit or send `null` to use the + * default list. Values are free-form labels and must be non-empty and unique + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun allowedResolutions(): Optional> = body.allowedResolutions() + /** * Optional description of the queue * @@ -51,6 +62,14 @@ private constructor( */ fun _name(): JsonField = body._name() + /** + * Returns the raw JSON value of [allowedResolutions]. + * + * Unlike [allowedResolutions], this method doesn't throw if the JSON field has an unexpected + * type. + */ + fun _allowedResolutions(): JsonField> = body._allowedResolutions() + /** * Returns the raw JSON value of [description]. * @@ -105,6 +124,7 @@ private constructor( * This is generally only useful if you are already constructing the body separately. * Otherwise, it's more convenient to use the top-level setters instead: * - [name] + * - [allowedResolutions] * - [description] */ fun body(body: CreateQueueRequest) = apply { this.body = body.toBuilder() } @@ -120,6 +140,40 @@ private constructor( */ fun name(name: JsonField) = apply { body.name(name) } + /** + * Resolutions that can be recorded on cases in this queue. Omit or send `null` to use the + * default list. Values are free-form labels and must be non-empty and unique + */ + fun allowedResolutions(allowedResolutions: List?) = apply { + body.allowedResolutions(allowedResolutions) + } + + /** + * Alias for calling [Builder.allowedResolutions] with `allowedResolutions.orElse(null)`. + */ + fun allowedResolutions(allowedResolutions: Optional>) = + allowedResolutions(allowedResolutions.getOrNull()) + + /** + * Sets [Builder.allowedResolutions] to an arbitrary JSON value. + * + * You should usually call [Builder.allowedResolutions] with a well-typed `List` + * value instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun allowedResolutions(allowedResolutions: JsonField>) = apply { + body.allowedResolutions(allowedResolutions) + } + + /** + * Adds a single [String] to [allowedResolutions]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addAllowedResolution(allowedResolution: String) = apply { + body.addAllowedResolution(allowedResolution) + } + /** Optional description of the queue */ fun description(description: String?) = apply { body.description(description) } @@ -283,6 +337,7 @@ private constructor( @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val name: JsonField, + private val allowedResolutions: JsonField>, private val description: JsonField, private val additionalProperties: MutableMap, ) { @@ -290,10 +345,13 @@ private constructor( @JsonCreator private constructor( @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + @JsonProperty("allowed_resolutions") + @ExcludeMissing + allowedResolutions: JsonField> = JsonMissing.of(), @JsonProperty("description") @ExcludeMissing description: JsonField = JsonMissing.of(), - ) : this(name, description, mutableMapOf()) + ) : this(name, allowedResolutions, description, mutableMapOf()) /** * Human-readable name of the queue @@ -303,6 +361,16 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * Resolutions that can be recorded on cases in this queue. Omit or send `null` to use the + * default list. Values are free-form labels and must be non-empty and unique + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun allowedResolutions(): Optional> = + allowedResolutions.getOptional("allowed_resolutions") + /** * Optional description of the queue * @@ -318,6 +386,16 @@ private constructor( */ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + /** + * Returns the raw JSON value of [allowedResolutions]. + * + * Unlike [allowedResolutions], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("allowed_resolutions") + @ExcludeMissing + fun _allowedResolutions(): JsonField> = allowedResolutions + /** * Returns the raw JSON value of [description]. * @@ -356,12 +434,15 @@ private constructor( class Builder internal constructor() { private var name: JsonField? = null + private var allowedResolutions: JsonField>? = null private var description: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(createQueueRequest: CreateQueueRequest) = apply { name = createQueueRequest.name + allowedResolutions = + createQueueRequest.allowedResolutions.map { it.toMutableList() } description = createQueueRequest.description additionalProperties = createQueueRequest.additionalProperties.toMutableMap() } @@ -378,6 +459,43 @@ private constructor( */ fun name(name: JsonField) = apply { this.name = name } + /** + * Resolutions that can be recorded on cases in this queue. Omit or send `null` to use + * the default list. Values are free-form labels and must be non-empty and unique + */ + fun allowedResolutions(allowedResolutions: List?) = + allowedResolutions(JsonField.ofNullable(allowedResolutions)) + + /** + * Alias for calling [Builder.allowedResolutions] with + * `allowedResolutions.orElse(null)`. + */ + fun allowedResolutions(allowedResolutions: Optional>) = + allowedResolutions(allowedResolutions.getOrNull()) + + /** + * Sets [Builder.allowedResolutions] to an arbitrary JSON value. + * + * You should usually call [Builder.allowedResolutions] with a well-typed `List` + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun allowedResolutions(allowedResolutions: JsonField>) = apply { + this.allowedResolutions = allowedResolutions.map { it.toMutableList() } + } + + /** + * Adds a single [String] to [allowedResolutions]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addAllowedResolution(allowedResolution: String) = apply { + allowedResolutions = + (allowedResolutions ?: JsonField.of(mutableListOf())).also { + checkKnown("allowedResolutions", it).add(allowedResolution) + } + } + /** Optional description of the queue */ fun description(description: String?) = description(JsonField.ofNullable(description)) @@ -429,6 +547,7 @@ private constructor( fun build(): CreateQueueRequest = CreateQueueRequest( checkRequired("name", name), + (allowedResolutions ?: JsonMissing.of()).map { it.toImmutable() }, description, additionalProperties.toMutableMap(), ) @@ -451,6 +570,7 @@ private constructor( } name() + allowedResolutions() description() validated = true } @@ -472,6 +592,7 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (if (name.asKnown().isPresent) 1 else 0) + + (allowedResolutions.asKnown().getOrNull()?.size ?: 0) + (if (description.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { @@ -481,16 +602,19 @@ private constructor( return other is CreateQueueRequest && name == other.name && + allowedResolutions == other.allowedResolutions && description == other.description && additionalProperties == other.additionalProperties } - private val hashCode: Int by lazy { Objects.hash(name, description, additionalProperties) } + private val hashCode: Int by lazy { + Objects.hash(name, allowedResolutions, description, additionalProperties) + } override fun hashCode(): Int = hashCode override fun toString() = - "CreateQueueRequest{name=$name, description=$description, additionalProperties=$additionalProperties}" + "CreateQueueRequest{name=$name, allowedResolutions=$allowedResolutions, description=$description, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringQueueUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringQueueUpdateParams.kt index d458efa6a..590e76fe3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringQueueUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionMonitoringQueueUpdateParams.kt @@ -11,8 +11,10 @@ import com.lithic.api.core.JsonField import com.lithic.api.core.JsonMissing import com.lithic.api.core.JsonValue import com.lithic.api.core.Params +import com.lithic.api.core.checkKnown import com.lithic.api.core.http.Headers import com.lithic.api.core.http.QueryParams +import com.lithic.api.core.toImmutable import com.lithic.api.errors.LithicInvalidDataException import java.util.Collections import java.util.Objects @@ -30,6 +32,17 @@ private constructor( fun queueToken(): Optional = Optional.ofNullable(queueToken) + /** + * New list of resolutions that can be recorded on cases in this queue, or `null` to revert to + * the default list. Values are free-form labels and must be non-empty and unique. Changing the + * list only affects what is selectable going forward; the `resolution` already stored on a case + * is preserved as-is + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun allowedResolutions(): Optional> = body.allowedResolutions() + /** * New description for the queue, or `null` to clear it * @@ -46,6 +59,14 @@ private constructor( */ fun name(): Optional = body.name() + /** + * Returns the raw JSON value of [allowedResolutions]. + * + * Unlike [allowedResolutions], this method doesn't throw if the JSON field has an unexpected + * type. + */ + fun _allowedResolutions(): JsonField> = body._allowedResolutions() + /** * Returns the raw JSON value of [description]. * @@ -110,11 +131,48 @@ private constructor( * * This is generally only useful if you are already constructing the body separately. * Otherwise, it's more convenient to use the top-level setters instead: + * - [allowedResolutions] * - [description] * - [name] */ fun body(body: UpdateQueueRequest) = apply { this.body = body.toBuilder() } + /** + * New list of resolutions that can be recorded on cases in this queue, or `null` to revert + * to the default list. Values are free-form labels and must be non-empty and unique. + * Changing the list only affects what is selectable going forward; the `resolution` already + * stored on a case is preserved as-is + */ + fun allowedResolutions(allowedResolutions: List?) = apply { + body.allowedResolutions(allowedResolutions) + } + + /** + * Alias for calling [Builder.allowedResolutions] with `allowedResolutions.orElse(null)`. + */ + fun allowedResolutions(allowedResolutions: Optional>) = + allowedResolutions(allowedResolutions.getOrNull()) + + /** + * Sets [Builder.allowedResolutions] to an arbitrary JSON value. + * + * You should usually call [Builder.allowedResolutions] with a well-typed `List` + * value instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun allowedResolutions(allowedResolutions: JsonField>) = apply { + body.allowedResolutions(allowedResolutions) + } + + /** + * Adds a single [String] to [allowedResolutions]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addAllowedResolution(allowedResolution: String) = apply { + body.addAllowedResolution(allowedResolution) + } + /** New description for the queue, or `null` to clear it */ fun description(description: String?) = apply { body.description(description) } @@ -290,6 +348,7 @@ private constructor( class UpdateQueueRequest @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( + private val allowedResolutions: JsonField>, private val description: JsonField, private val name: JsonField, private val additionalProperties: MutableMap, @@ -297,11 +356,26 @@ private constructor( @JsonCreator private constructor( + @JsonProperty("allowed_resolutions") + @ExcludeMissing + allowedResolutions: JsonField> = JsonMissing.of(), @JsonProperty("description") @ExcludeMissing description: JsonField = JsonMissing.of(), @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), - ) : this(description, name, mutableMapOf()) + ) : this(allowedResolutions, description, name, mutableMapOf()) + + /** + * New list of resolutions that can be recorded on cases in this queue, or `null` to revert + * to the default list. Values are free-form labels and must be non-empty and unique. + * Changing the list only affects what is selectable going forward; the `resolution` already + * stored on a case is preserved as-is + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun allowedResolutions(): Optional> = + allowedResolutions.getOptional("allowed_resolutions") /** * New description for the queue, or `null` to clear it @@ -319,6 +393,16 @@ private constructor( */ fun name(): Optional = name.getOptional("name") + /** + * Returns the raw JSON value of [allowedResolutions]. + * + * Unlike [allowedResolutions], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("allowed_resolutions") + @ExcludeMissing + fun _allowedResolutions(): JsonField> = allowedResolutions + /** * Returns the raw JSON value of [description]. * @@ -356,17 +440,59 @@ private constructor( /** A builder for [UpdateQueueRequest]. */ class Builder internal constructor() { + private var allowedResolutions: JsonField>? = null private var description: JsonField = JsonMissing.of() private var name: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(updateQueueRequest: UpdateQueueRequest) = apply { + allowedResolutions = + updateQueueRequest.allowedResolutions.map { it.toMutableList() } description = updateQueueRequest.description name = updateQueueRequest.name additionalProperties = updateQueueRequest.additionalProperties.toMutableMap() } + /** + * New list of resolutions that can be recorded on cases in this queue, or `null` to + * revert to the default list. Values are free-form labels and must be non-empty and + * unique. Changing the list only affects what is selectable going forward; the + * `resolution` already stored on a case is preserved as-is + */ + fun allowedResolutions(allowedResolutions: List?) = + allowedResolutions(JsonField.ofNullable(allowedResolutions)) + + /** + * Alias for calling [Builder.allowedResolutions] with + * `allowedResolutions.orElse(null)`. + */ + fun allowedResolutions(allowedResolutions: Optional>) = + allowedResolutions(allowedResolutions.getOrNull()) + + /** + * Sets [Builder.allowedResolutions] to an arbitrary JSON value. + * + * You should usually call [Builder.allowedResolutions] with a well-typed `List` + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun allowedResolutions(allowedResolutions: JsonField>) = apply { + this.allowedResolutions = allowedResolutions.map { it.toMutableList() } + } + + /** + * Adds a single [String] to [allowedResolutions]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addAllowedResolution(allowedResolution: String) = apply { + allowedResolutions = + (allowedResolutions ?: JsonField.of(mutableListOf())).also { + checkKnown("allowedResolutions", it).add(allowedResolution) + } + } + /** New description for the queue, or `null` to clear it */ fun description(description: String?) = description(JsonField.ofNullable(description)) @@ -421,7 +547,12 @@ private constructor( * Further updates to this [Builder] will not mutate the returned instance. */ fun build(): UpdateQueueRequest = - UpdateQueueRequest(description, name, additionalProperties.toMutableMap()) + UpdateQueueRequest( + (allowedResolutions ?: JsonMissing.of()).map { it.toImmutable() }, + description, + name, + additionalProperties.toMutableMap(), + ) } private var validated: Boolean = false @@ -440,6 +571,7 @@ private constructor( return@apply } + allowedResolutions() description() name() validated = true @@ -461,7 +593,8 @@ private constructor( */ @JvmSynthetic internal fun validity(): Int = - (if (description.asKnown().isPresent) 1 else 0) + + (allowedResolutions.asKnown().getOrNull()?.size ?: 0) + + (if (description.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { @@ -470,17 +603,20 @@ private constructor( } return other is UpdateQueueRequest && + allowedResolutions == other.allowedResolutions && description == other.description && name == other.name && additionalProperties == other.additionalProperties } - private val hashCode: Int by lazy { Objects.hash(description, name, additionalProperties) } + private val hashCode: Int by lazy { + Objects.hash(allowedResolutions, description, name, additionalProperties) + } override fun hashCode(): Int = hashCode override fun toString() = - "UpdateQueueRequest{description=$description, name=$name, additionalProperties=$additionalProperties}" + "UpdateQueueRequest{allowedResolutions=$allowedResolutions, description=$description, name=$name, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionReportResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionReportResponse.kt index 1e2571781..abaea40ad 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionReportResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionReportResponse.kt @@ -278,7 +278,10 @@ private constructor( } /** Provides additional context or details about the fraud report. */ - fun comment(comment: String) = comment(JsonField.of(comment)) + fun comment(comment: String?) = comment(JsonField.ofNullable(comment)) + + /** Alias for calling [Builder.comment] with `comment.orElse(null)`. */ + fun comment(comment: Optional) = comment(comment.getOrNull()) /** * Sets [Builder.comment] to an arbitrary JSON value. @@ -289,7 +292,10 @@ private constructor( fun comment(comment: JsonField) = apply { this.comment = comment } /** Timestamp representing when the fraud report was created. */ - fun createdAt(createdAt: OffsetDateTime) = createdAt(JsonField.of(createdAt)) + fun createdAt(createdAt: OffsetDateTime?) = createdAt(JsonField.ofNullable(createdAt)) + + /** Alias for calling [Builder.createdAt] with `createdAt.orElse(null)`. */ + fun createdAt(createdAt: Optional) = createdAt(createdAt.getOrNull()) /** * Sets [Builder.createdAt] to an arbitrary JSON value. @@ -320,7 +326,10 @@ private constructor( * coerces a legitimate cardholder into unauthorized transactions, often through social * engineering tactics. */ - fun fraudType(fraudType: FraudType) = fraudType(JsonField.of(fraudType)) + fun fraudType(fraudType: FraudType?) = fraudType(JsonField.ofNullable(fraudType)) + + /** Alias for calling [Builder.fraudType] with `fraudType.orElse(null)`. */ + fun fraudType(fraudType: Optional) = fraudType(fraudType.getOrNull()) /** * Sets [Builder.fraudType] to an arbitrary JSON value. @@ -332,7 +341,10 @@ private constructor( fun fraudType(fraudType: JsonField) = apply { this.fraudType = fraudType } /** Timestamp representing the last update to the fraud report. */ - fun updatedAt(updatedAt: OffsetDateTime) = updatedAt(JsonField.of(updatedAt)) + fun updatedAt(updatedAt: OffsetDateTime?) = updatedAt(JsonField.ofNullable(updatedAt)) + + /** Alias for calling [Builder.updatedAt] with `updatedAt.orElse(null)`. */ + fun updatedAt(updatedAt: Optional) = updatedAt(updatedAt.getOrNull()) /** * Sets [Builder.updatedAt] to an arbitrary JSON value. diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionRetrieveResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionRetrieveResponse.kt index 8c57bca94..00d141fed 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionRetrieveResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionRetrieveResponse.kt @@ -278,7 +278,10 @@ private constructor( } /** Provides additional context or details about the fraud report. */ - fun comment(comment: String) = comment(JsonField.of(comment)) + fun comment(comment: String?) = comment(JsonField.ofNullable(comment)) + + /** Alias for calling [Builder.comment] with `comment.orElse(null)`. */ + fun comment(comment: Optional) = comment(comment.getOrNull()) /** * Sets [Builder.comment] to an arbitrary JSON value. @@ -289,7 +292,10 @@ private constructor( fun comment(comment: JsonField) = apply { this.comment = comment } /** Timestamp representing when the fraud report was created. */ - fun createdAt(createdAt: OffsetDateTime) = createdAt(JsonField.of(createdAt)) + fun createdAt(createdAt: OffsetDateTime?) = createdAt(JsonField.ofNullable(createdAt)) + + /** Alias for calling [Builder.createdAt] with `createdAt.orElse(null)`. */ + fun createdAt(createdAt: Optional) = createdAt(createdAt.getOrNull()) /** * Sets [Builder.createdAt] to an arbitrary JSON value. @@ -320,7 +326,10 @@ private constructor( * coerces a legitimate cardholder into unauthorized transactions, often through social * engineering tactics. */ - fun fraudType(fraudType: FraudType) = fraudType(JsonField.of(fraudType)) + fun fraudType(fraudType: FraudType?) = fraudType(JsonField.ofNullable(fraudType)) + + /** Alias for calling [Builder.fraudType] with `fraudType.orElse(null)`. */ + fun fraudType(fraudType: Optional) = fraudType(fraudType.getOrNull()) /** * Sets [Builder.fraudType] to an arbitrary JSON value. @@ -332,7 +341,10 @@ private constructor( fun fraudType(fraudType: JsonField) = apply { this.fraudType = fraudType } /** Timestamp representing the last update to the fraud report. */ - fun updatedAt(updatedAt: OffsetDateTime) = updatedAt(JsonField.of(updatedAt)) + fun updatedAt(updatedAt: OffsetDateTime?) = updatedAt(JsonField.ofNullable(updatedAt)) + + /** Alias for calling [Builder.updatedAt] with `updatedAt.orElse(null)`. */ + fun updatedAt(updatedAt: Optional) = updatedAt(updatedAt.getOrNull()) /** * Sets [Builder.updatedAt] to an arbitrary JSON value. diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt index c55973a8d..ba0dac9d5 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt @@ -23,8 +23,9 @@ import java.util.Optional * Clears an existing authorization, either debit or credit. After this event, the transaction * transitions from `PENDING` to `SETTLED` status. * - * If `amount` is not set, the full amount of the transaction will be cleared. Transactions that - * have already cleared, either partially or fully, cannot be cleared again using this endpoint. + * If `amount` is not set, the full amount of the transaction will be cleared. This endpoint may be + * called multiple times against the same authorization to simulate a multiple-completion scenario, + * with each call creating a separate clearing event. */ class TransactionSimulateClearingParams private constructor( @@ -48,8 +49,9 @@ private constructor( * result in a -100 amount in the transaction, if the original authorization is a credit * authorization. * - * If `amount` is not set, the full amount of the transaction will be cleared. Transactions that - * have already cleared, either partially or fully, cannot be cleared again using this endpoint. + * If `amount` is not set, the full amount of the transaction will be cleared. This endpoint may + * be called multiple times against the same authorization to simulate a multiple-completion + * scenario, with each call creating a separate clearing event. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -138,9 +140,9 @@ private constructor( * field will result in a -100 amount in the transaction, if the original authorization is a * credit authorization. * - * If `amount` is not set, the full amount of the transaction will be cleared. Transactions - * that have already cleared, either partially or fully, cannot be cleared again using this - * endpoint. + * If `amount` is not set, the full amount of the transaction will be cleared. This endpoint + * may be called multiple times against the same authorization to simulate a + * multiple-completion scenario, with each call creating a separate clearing event. */ fun amount(amount: Long) = apply { body.amount(amount) } @@ -324,9 +326,9 @@ private constructor( * field will result in a -100 amount in the transaction, if the original authorization is a * credit authorization. * - * If `amount` is not set, the full amount of the transaction will be cleared. Transactions - * that have already cleared, either partially or fully, cannot be cleared again using this - * endpoint. + * If `amount` is not set, the full amount of the transaction will be cleared. This endpoint + * may be called multiple times against the same authorization to simulate a + * multiple-completion scenario, with each call creating a separate clearing event. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -405,9 +407,9 @@ private constructor( * this field will result in a -100 amount in the transaction, if the original * authorization is a credit authorization. * - * If `amount` is not set, the full amount of the transaction will be cleared. - * Transactions that have already cleared, either partially or fully, cannot be cleared - * again using this endpoint. + * If `amount` is not set, the full amount of the transaction will be cleared. This + * endpoint may be called multiple times against the same authorization to simulate a + * multiple-completion scenario, with each call creating a separate clearing event. */ fun amount(amount: Long) = amount(JsonField.of(amount)) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitPeriod.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitPeriod.kt index ac9a45391..77995df2b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitPeriod.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitPeriod.kt @@ -413,7 +413,7 @@ private constructor( /** * The size of the trailing window to calculate Spend Velocity over in seconds. The minimum - * value is 10 seconds, and the maximum value is 2678400 seconds (31 days). + * value is 10 seconds, and the maximum value is 7776000 seconds (90 days). * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -482,7 +482,7 @@ private constructor( /** * The size of the trailing window to calculate Spend Velocity over in seconds. The - * minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 days). + * minimum value is 10 seconds, and the maximum value is 7776000 seconds (90 days). */ fun duration(duration: Long) = duration(JsonField.of(duration)) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardAuthorizationServiceAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardAuthorizationServiceAsync.kt index 5288e272f..495322fd5 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardAuthorizationServiceAsync.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardAuthorizationServiceAsync.kt @@ -26,7 +26,7 @@ interface CardAuthorizationServiceAsync { /** * Card program's response to Authorization Challenge. Programs that have Authorization * Challenges configured as Out of Band receive a - * [card_authorization.challenge](https://docs.lithic.com/reference/post_card-authorization-challenge) + * [card_authorization.challenge](https://docs.lithic.com/reference/cardauthorizationchallengewebhook) * webhook when an authorization attempt triggers a challenge. The card program should respond * using this endpoint after the cardholder completes the challenge. */ diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsync.kt index bc5a87598..9ebf1fb98 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsync.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsync.kt @@ -181,6 +181,9 @@ interface CardServiceAsync { ): CompletableFuture /** + * **Deprecated.** Use the modern embedded card flow instead: create a session with `POST + * /v1/cards/{card_token}/embed` and render it via `GET /v1/embed`. + * * Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry * Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations * by leveraging our embedded card UI solution documented below. @@ -203,10 +206,12 @@ interface CardServiceAsync { * iframe) on the server or make an ajax call from your front end code, but **do not ever embed * your API key into front end code, as doing so introduces a serious security vulnerability**. */ + @Deprecated("deprecated") fun embed(params: CardEmbedParams): CompletableFuture = embed(params, RequestOptions.none()) /** @see embed */ + @Deprecated("deprecated") fun embed( params: CardEmbedParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -639,10 +644,12 @@ interface CardServiceAsync { * Returns a raw HTTP response for `get /v1/embed/card`, but is otherwise the same as * [CardServiceAsync.embed]. */ + @Deprecated("deprecated") fun embed(params: CardEmbedParams): CompletableFuture> = embed(params, RequestOptions.none()) /** @see embed */ + @Deprecated("deprecated") fun embed( params: CardEmbedParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsyncImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsyncImpl.kt index 5aedc961a..784a71378 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsyncImpl.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsyncImpl.kt @@ -108,6 +108,7 @@ class CardServiceAsyncImpl internal constructor(private val clientOptions: Clien // post /v1/cards/{card_token}/convert_physical withRawResponse().convertPhysical(params, requestOptions).thenApply { it.parse() } + @Deprecated("deprecated") override fun embed( params: CardEmbedParams, requestOptions: RequestOptions, @@ -360,6 +361,7 @@ class CardServiceAsyncImpl internal constructor(private val clientOptions: Clien private val embedHandler: Handler = stringHandler() + @Deprecated("deprecated") override fun embed( params: CardEmbedParams, requestOptions: RequestOptions, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransactionServiceAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransactionServiceAsync.kt index 334a63c3f..923a3b83c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransactionServiceAsync.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransactionServiceAsync.kt @@ -217,8 +217,9 @@ interface TransactionServiceAsync { * Clears an existing authorization, either debit or credit. After this event, the transaction * transitions from `PENDING` to `SETTLED` status. * - * If `amount` is not set, the full amount of the transaction will be cleared. Transactions that - * have already cleared, either partially or fully, cannot be cleared again using this endpoint. + * If `amount` is not set, the full amount of the transaction will be cleared. This endpoint may + * be called multiple times against the same authorization to simulate a multiple-completion + * scenario, with each call creating a separate clearing event. */ fun simulateClearing( params: TransactionSimulateClearingParams diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/threeDS/DecisioningServiceAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/threeDS/DecisioningServiceAsync.kt index 5f3c4861d..3283f95bc 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/threeDS/DecisioningServiceAsync.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/threeDS/DecisioningServiceAsync.kt @@ -30,7 +30,7 @@ interface DecisioningServiceAsync { /** * Card program's response to a 3DS Challenge Request. Challenge Request is emitted as a webhook - * [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) + * [three_ds_authentication.challenge](https://docs.lithic.com/reference/threedsauthenticationchallengewebhook) * and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to * receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information). */ diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardAuthorizationService.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardAuthorizationService.kt index bda18faee..2df94049b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardAuthorizationService.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardAuthorizationService.kt @@ -26,7 +26,7 @@ interface CardAuthorizationService { /** * Card program's response to Authorization Challenge. Programs that have Authorization * Challenges configured as Out of Band receive a - * [card_authorization.challenge](https://docs.lithic.com/reference/post_card-authorization-challenge) + * [card_authorization.challenge](https://docs.lithic.com/reference/cardauthorizationchallengewebhook) * webhook when an authorization attempt triggers a challenge. The card program should respond * using this endpoint after the cardholder completes the challenge. */ diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardService.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardService.kt index 4217f18e6..07f1b1d3c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardService.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardService.kt @@ -167,6 +167,9 @@ interface CardService { ): Card /** + * **Deprecated.** Use the modern embedded card flow instead: create a session with `POST + * /v1/cards/{card_token}/embed` and render it via `GET /v1/embed`. + * * Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry * Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations * by leveraging our embedded card UI solution documented below. @@ -189,9 +192,11 @@ interface CardService { * iframe) on the server or make an ajax call from your front end code, but **do not ever embed * your API key into front end code, as doing so introduces a serious security vulnerability**. */ + @Deprecated("deprecated") fun embed(params: CardEmbedParams): String = embed(params, RequestOptions.none()) /** @see embed */ + @Deprecated("deprecated") fun embed( params: CardEmbedParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -603,11 +608,13 @@ interface CardService { * Returns a raw HTTP response for `get /v1/embed/card`, but is otherwise the same as * [CardService.embed]. */ + @Deprecated("deprecated") @MustBeClosed fun embed(params: CardEmbedParams): HttpResponseFor = embed(params, RequestOptions.none()) /** @see embed */ + @Deprecated("deprecated") @MustBeClosed fun embed( params: CardEmbedParams, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardServiceImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardServiceImpl.kt index 761159675..0d0dbf489 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardServiceImpl.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardServiceImpl.kt @@ -94,6 +94,7 @@ class CardServiceImpl internal constructor(private val clientOptions: ClientOpti // post /v1/cards/{card_token}/convert_physical withRawResponse().convertPhysical(params, requestOptions).parse() + @Deprecated("deprecated") override fun embed(params: CardEmbedParams, requestOptions: RequestOptions): String = // get /v1/embed/card withRawResponse().embed(params, requestOptions).parse() @@ -317,6 +318,7 @@ class CardServiceImpl internal constructor(private val clientOptions: ClientOpti private val embedHandler: Handler = stringHandler() + @Deprecated("deprecated") override fun embed( params: CardEmbedParams, requestOptions: RequestOptions, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransactionService.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransactionService.kt index 69b54af87..2a8e7c3bb 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransactionService.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransactionService.kt @@ -206,8 +206,9 @@ interface TransactionService { * Clears an existing authorization, either debit or credit. After this event, the transaction * transitions from `PENDING` to `SETTLED` status. * - * If `amount` is not set, the full amount of the transaction will be cleared. Transactions that - * have already cleared, either partially or fully, cannot be cleared again using this endpoint. + * If `amount` is not set, the full amount of the transaction will be cleared. This endpoint may + * be called multiple times against the same authorization to simulate a multiple-completion + * scenario, with each call creating a separate clearing event. */ fun simulateClearing( params: TransactionSimulateClearingParams diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/threeDS/DecisioningService.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/threeDS/DecisioningService.kt index d1c3c41a3..1fb19316e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/threeDS/DecisioningService.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/threeDS/DecisioningService.kt @@ -30,7 +30,7 @@ interface DecisioningService { /** * Card program's response to a 3DS Challenge Request. Challenge Request is emitted as a webhook - * [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) + * [three_ds_authentication.challenge](https://docs.lithic.com/reference/threedsauthenticationchallengewebhook) * and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to * receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information). */ diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListPageResponseTest.kt index e969f2920..0b3762e5a 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListPageResponseTest.kt @@ -59,6 +59,7 @@ internal class AccountActivityListPageResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -137,6 +138,7 @@ internal class AccountActivityListPageResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -219,6 +221,7 @@ internal class AccountActivityListPageResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListResponseTest.kt index 100e4ac18..8484cbb71 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListResponseTest.kt @@ -770,6 +770,7 @@ internal class AccountActivityListResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -854,6 +855,7 @@ internal class AccountActivityListResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponseTest.kt index d4d372ce2..46bbd28b0 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponseTest.kt @@ -799,6 +799,7 @@ internal class AccountActivityRetrieveTransactionResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -884,6 +885,7 @@ internal class AccountActivityRetrieveTransactionResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/EmbedSessionGeneratedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/EmbedSessionGeneratedWebhookEventTest.kt new file mode 100644 index 000000000..c6e8cc491 --- /dev/null +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/EmbedSessionGeneratedWebhookEventTest.kt @@ -0,0 +1,72 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.lithic.api.models + +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import com.lithic.api.core.jsonMapper +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test + +internal class EmbedSessionGeneratedWebhookEventTest { + + @Test + fun create() { + val embedSessionGeneratedWebhookEvent = + EmbedSessionGeneratedWebhookEvent.builder() + .accountToken("9a352526-4e69-469a-80b8-e22c71ba3cf0") + .cardToken("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + .deviceDetails( + EmbedSessionGeneratedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + .eventType(EmbedSessionGeneratedWebhookEvent.EventType.EMBED_SESSION_GENERATED) + .sessionId("4273ff06-3ce4-4092-8a1f-0340e33b6375") + .sessionType(EmbedSessionGeneratedWebhookEvent.SessionType.CARD_EMBED) + .build() + + assertThat(embedSessionGeneratedWebhookEvent.accountToken()) + .isEqualTo("9a352526-4e69-469a-80b8-e22c71ba3cf0") + assertThat(embedSessionGeneratedWebhookEvent.cardToken()) + .isEqualTo("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + assertThat(embedSessionGeneratedWebhookEvent.deviceDetails()) + .isEqualTo( + EmbedSessionGeneratedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + assertThat(embedSessionGeneratedWebhookEvent.eventType()) + .isEqualTo(EmbedSessionGeneratedWebhookEvent.EventType.EMBED_SESSION_GENERATED) + assertThat(embedSessionGeneratedWebhookEvent.sessionId()) + .isEqualTo("4273ff06-3ce4-4092-8a1f-0340e33b6375") + assertThat(embedSessionGeneratedWebhookEvent.sessionType()) + .isEqualTo(EmbedSessionGeneratedWebhookEvent.SessionType.CARD_EMBED) + } + + @Test + fun roundtrip() { + val jsonMapper = jsonMapper() + val embedSessionGeneratedWebhookEvent = + EmbedSessionGeneratedWebhookEvent.builder() + .accountToken("9a352526-4e69-469a-80b8-e22c71ba3cf0") + .cardToken("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + .deviceDetails( + EmbedSessionGeneratedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + .eventType(EmbedSessionGeneratedWebhookEvent.EventType.EMBED_SESSION_GENERATED) + .sessionId("4273ff06-3ce4-4092-8a1f-0340e33b6375") + .sessionType(EmbedSessionGeneratedWebhookEvent.SessionType.CARD_EMBED) + .build() + + val roundtrippedEmbedSessionGeneratedWebhookEvent = + jsonMapper.readValue( + jsonMapper.writeValueAsString(embedSessionGeneratedWebhookEvent), + jacksonTypeRef(), + ) + + assertThat(roundtrippedEmbedSessionGeneratedWebhookEvent) + .isEqualTo(embedSessionGeneratedWebhookEvent) + } +} diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/EmbedViewedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/EmbedViewedWebhookEventTest.kt new file mode 100644 index 000000000..577edb1d7 --- /dev/null +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/EmbedViewedWebhookEventTest.kt @@ -0,0 +1,69 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.lithic.api.models + +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import com.lithic.api.core.jsonMapper +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test + +internal class EmbedViewedWebhookEventTest { + + @Test + fun create() { + val embedViewedWebhookEvent = + EmbedViewedWebhookEvent.builder() + .accountToken("9a352526-4e69-469a-80b8-e22c71ba3cf0") + .cardToken("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + .deviceDetails( + EmbedViewedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + .embedType(EmbedViewedWebhookEvent.EmbedType.PAN) + .eventType(EmbedViewedWebhookEvent.EventType.EMBED_VIEWED) + .sessionId("4273ff06-3ce4-4092-8a1f-0340e33b6375") + .build() + + assertThat(embedViewedWebhookEvent.accountToken()) + .isEqualTo("9a352526-4e69-469a-80b8-e22c71ba3cf0") + assertThat(embedViewedWebhookEvent.cardToken()) + .isEqualTo("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + assertThat(embedViewedWebhookEvent.deviceDetails()) + .isEqualTo( + EmbedViewedWebhookEvent.EmbedDeviceDetails.builder().ipAddress("192.0.2.1").build() + ) + assertThat(embedViewedWebhookEvent.embedType()) + .isEqualTo(EmbedViewedWebhookEvent.EmbedType.PAN) + assertThat(embedViewedWebhookEvent.eventType()) + .isEqualTo(EmbedViewedWebhookEvent.EventType.EMBED_VIEWED) + assertThat(embedViewedWebhookEvent.sessionId()) + .isEqualTo("4273ff06-3ce4-4092-8a1f-0340e33b6375") + } + + @Test + fun roundtrip() { + val jsonMapper = jsonMapper() + val embedViewedWebhookEvent = + EmbedViewedWebhookEvent.builder() + .accountToken("9a352526-4e69-469a-80b8-e22c71ba3cf0") + .cardToken("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + .deviceDetails( + EmbedViewedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + .embedType(EmbedViewedWebhookEvent.EmbedType.PAN) + .eventType(EmbedViewedWebhookEvent.EventType.EMBED_VIEWED) + .sessionId("4273ff06-3ce4-4092-8a1f-0340e33b6375") + .build() + + val roundtrippedEmbedViewedWebhookEvent = + jsonMapper.readValue( + jsonMapper.writeValueAsString(embedViewedWebhookEvent), + jacksonTypeRef(), + ) + + assertThat(roundtrippedEmbedViewedWebhookEvent).isEqualTo(embedViewedWebhookEvent) + } +} diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/MonitoringCaseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/MonitoringCaseTest.kt index 0f1102bb3..236eb3ebc 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/MonitoringCaseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/MonitoringCaseTest.kt @@ -28,7 +28,7 @@ internal class MonitoringCaseTest { .pendingTransactions(true) .priority(CasePriority.LOW) .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .resolved(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .ruleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -59,7 +59,7 @@ internal class MonitoringCaseTest { assertThat(monitoringCase.pendingTransactions()).isEqualTo(true) assertThat(monitoringCase.priority()).isEqualTo(CasePriority.LOW) assertThat(monitoringCase.queueToken()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - assertThat(monitoringCase.resolution()).contains(ResolutionOutcome.CONFIRMED_FRAUD) + assertThat(monitoringCase.resolution()).contains("resolution") assertThat(monitoringCase.resolutionNotes()).contains("resolution_notes") assertThat(monitoringCase.resolved()) .contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) @@ -96,7 +96,7 @@ internal class MonitoringCaseTest { .pendingTransactions(true) .priority(CasePriority.LOW) .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .resolved(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .ruleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt index 4a4e76790..de53b7467 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt @@ -73,6 +73,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -251,6 +253,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -448,6 +452,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -581,6 +587,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -695,6 +703,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -828,6 +838,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -1162,6 +1174,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -1711,6 +1725,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -2069,6 +2085,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -2225,6 +2243,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -2389,6 +2409,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -2549,6 +2571,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -2743,6 +2767,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -2889,6 +2915,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -2988,6 +3016,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -3090,6 +3120,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -3192,6 +3224,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -3295,6 +3329,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -3400,6 +3436,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -3727,6 +3765,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -4123,6 +4163,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -4334,6 +4376,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -4504,6 +4548,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -4636,6 +4682,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -4767,6 +4815,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -4899,6 +4949,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -5031,6 +5083,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -5230,6 +5284,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -5444,6 +5500,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -5601,6 +5659,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -5741,6 +5801,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -5907,6 +5969,8 @@ internal class ParsedWebhookEventTest { .contains(digitalWalletTokenizationUpdated) assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -6069,6 +6133,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).contains(disputeUpdated) assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -6194,6 +6260,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()) .contains(disputeEvidenceUploadFailed) + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -6255,6 +6323,238 @@ internal class ParsedWebhookEventTest { assertThat(roundtrippedParsedWebhookEvent).isEqualTo(parsedWebhookEvent) } + @Test + fun ofEmbedSessionGenerated() { + val embedSessionGenerated = + EmbedSessionGeneratedWebhookEvent.builder() + .accountToken("9a352526-4e69-469a-80b8-e22c71ba3cf0") + .cardToken("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + .deviceDetails( + EmbedSessionGeneratedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + .eventType(EmbedSessionGeneratedWebhookEvent.EventType.EMBED_SESSION_GENERATED) + .sessionId("4273ff06-3ce4-4092-8a1f-0340e33b6375") + .sessionType(EmbedSessionGeneratedWebhookEvent.SessionType.CARD_EMBED) + .build() + + val parsedWebhookEvent = ParsedWebhookEvent.ofEmbedSessionGenerated(embedSessionGenerated) + + assertThat(parsedWebhookEvent.accountHolderCreated()).isEmpty + assertThat(parsedWebhookEvent.kybPayload()).isEmpty + assertThat(parsedWebhookEvent.kycPayload()).isEmpty + assertThat(parsedWebhookEvent.legacyPayload()).isEmpty + assertThat(parsedWebhookEvent.accountHolderVerification()).isEmpty + assertThat(parsedWebhookEvent.accountHolderDocumentUpdated()).isEmpty + assertThat(parsedWebhookEvent.cardAuthorizationApprovalRequest()).isEmpty + assertThat(parsedWebhookEvent.cardAuthorizationChallenge()).isEmpty + assertThat(parsedWebhookEvent.cardAuthorizationChallengeResponse()).isEmpty + assertThat(parsedWebhookEvent.authRulesBacktestReportCreated()).isEmpty + assertThat(parsedWebhookEvent.balanceUpdated()).isEmpty + assertThat(parsedWebhookEvent.bookTransferTransactionCreated()).isEmpty + assertThat(parsedWebhookEvent.bookTransferTransactionUpdated()).isEmpty + assertThat(parsedWebhookEvent.cardCreated()).isEmpty + assertThat(parsedWebhookEvent.cardConverted()).isEmpty + assertThat(parsedWebhookEvent.cardRenewed()).isEmpty + assertThat(parsedWebhookEvent.cardReissued()).isEmpty + assertThat(parsedWebhookEvent.cardShipped()).isEmpty + assertThat(parsedWebhookEvent.cardUpdated()).isEmpty + assertThat(parsedWebhookEvent.cardTransactionUpdated()).isEmpty + assertThat(parsedWebhookEvent.cardTransactionEnhancedDataCreated()).isEmpty + assertThat(parsedWebhookEvent.cardTransactionEnhancedDataUpdated()).isEmpty + assertThat(parsedWebhookEvent.claimCreated()).isEmpty + assertThat(parsedWebhookEvent.claimUpdated()).isEmpty + assertThat(parsedWebhookEvent.claimDocumentUploaded()).isEmpty + assertThat(parsedWebhookEvent.claimDocumentAccepted()).isEmpty + assertThat(parsedWebhookEvent.claimDocumentRejected()).isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationApprovalRequest()).isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationResult()).isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationTwoFactorAuthenticationCode()) + .isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationTwoFactorAuthenticationCodeSent()) + .isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty + assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty + assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).contains(embedSessionGenerated) + assertThat(parsedWebhookEvent.embedViewed()).isEmpty + assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty + assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty + assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty + assertThat(parsedWebhookEvent.externalPaymentUpdated()).isEmpty + assertThat(parsedWebhookEvent.financialAccountCreated()).isEmpty + assertThat(parsedWebhookEvent.financialAccountUpdated()).isEmpty + assertThat(parsedWebhookEvent.fundingEventCreated()).isEmpty + assertThat(parsedWebhookEvent.loanTapeCreated()).isEmpty + assertThat(parsedWebhookEvent.loanTapeUpdated()).isEmpty + assertThat(parsedWebhookEvent.managementOperationCreated()).isEmpty + assertThat(parsedWebhookEvent.managementOperationUpdated()).isEmpty + assertThat(parsedWebhookEvent.internalTransactionCreated()).isEmpty + assertThat(parsedWebhookEvent.internalTransactionUpdated()).isEmpty + assertThat(parsedWebhookEvent.networkTotalCreated()).isEmpty + assertThat(parsedWebhookEvent.networkTotalUpdated()).isEmpty + assertThat(parsedWebhookEvent.paymentTransactionCreated()).isEmpty + assertThat(parsedWebhookEvent.paymentTransactionUpdated()).isEmpty + assertThat(parsedWebhookEvent.settlementReportUpdated()).isEmpty + assertThat(parsedWebhookEvent.statementsCreated()).isEmpty + assertThat(parsedWebhookEvent.threeDSAuthenticationCreated()).isEmpty + assertThat(parsedWebhookEvent.threeDSAuthenticationUpdated()).isEmpty + assertThat(parsedWebhookEvent.threeDSAuthenticationChallenge()).isEmpty + assertThat(parsedWebhookEvent.tokenizationApprovalRequest()).isEmpty + assertThat(parsedWebhookEvent.tokenizationResult()).isEmpty + assertThat(parsedWebhookEvent.tokenizationTwoFactorAuthenticationCode()).isEmpty + assertThat(parsedWebhookEvent.tokenizationTwoFactorAuthenticationCodeSent()).isEmpty + assertThat(parsedWebhookEvent.tokenizationUpdated()).isEmpty + assertThat(parsedWebhookEvent.threeDSAuthenticationApprovalRequest()).isEmpty + assertThat(parsedWebhookEvent.disputeTransactionCreated()).isEmpty + assertThat(parsedWebhookEvent.disputeTransactionUpdated()).isEmpty + } + + @Test + fun ofEmbedSessionGeneratedRoundtrip() { + val jsonMapper = jsonMapper() + val parsedWebhookEvent = + ParsedWebhookEvent.ofEmbedSessionGenerated( + EmbedSessionGeneratedWebhookEvent.builder() + .accountToken("9a352526-4e69-469a-80b8-e22c71ba3cf0") + .cardToken("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + .deviceDetails( + EmbedSessionGeneratedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + .eventType(EmbedSessionGeneratedWebhookEvent.EventType.EMBED_SESSION_GENERATED) + .sessionId("4273ff06-3ce4-4092-8a1f-0340e33b6375") + .sessionType(EmbedSessionGeneratedWebhookEvent.SessionType.CARD_EMBED) + .build() + ) + + val roundtrippedParsedWebhookEvent = + jsonMapper.readValue( + jsonMapper.writeValueAsString(parsedWebhookEvent), + jacksonTypeRef(), + ) + + assertThat(roundtrippedParsedWebhookEvent).isEqualTo(parsedWebhookEvent) + } + + @Test + fun ofEmbedViewed() { + val embedViewed = + EmbedViewedWebhookEvent.builder() + .accountToken("9a352526-4e69-469a-80b8-e22c71ba3cf0") + .cardToken("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + .deviceDetails( + EmbedViewedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + .embedType(EmbedViewedWebhookEvent.EmbedType.PAN) + .eventType(EmbedViewedWebhookEvent.EventType.EMBED_VIEWED) + .sessionId("4273ff06-3ce4-4092-8a1f-0340e33b6375") + .build() + + val parsedWebhookEvent = ParsedWebhookEvent.ofEmbedViewed(embedViewed) + + assertThat(parsedWebhookEvent.accountHolderCreated()).isEmpty + assertThat(parsedWebhookEvent.kybPayload()).isEmpty + assertThat(parsedWebhookEvent.kycPayload()).isEmpty + assertThat(parsedWebhookEvent.legacyPayload()).isEmpty + assertThat(parsedWebhookEvent.accountHolderVerification()).isEmpty + assertThat(parsedWebhookEvent.accountHolderDocumentUpdated()).isEmpty + assertThat(parsedWebhookEvent.cardAuthorizationApprovalRequest()).isEmpty + assertThat(parsedWebhookEvent.cardAuthorizationChallenge()).isEmpty + assertThat(parsedWebhookEvent.cardAuthorizationChallengeResponse()).isEmpty + assertThat(parsedWebhookEvent.authRulesBacktestReportCreated()).isEmpty + assertThat(parsedWebhookEvent.balanceUpdated()).isEmpty + assertThat(parsedWebhookEvent.bookTransferTransactionCreated()).isEmpty + assertThat(parsedWebhookEvent.bookTransferTransactionUpdated()).isEmpty + assertThat(parsedWebhookEvent.cardCreated()).isEmpty + assertThat(parsedWebhookEvent.cardConverted()).isEmpty + assertThat(parsedWebhookEvent.cardRenewed()).isEmpty + assertThat(parsedWebhookEvent.cardReissued()).isEmpty + assertThat(parsedWebhookEvent.cardShipped()).isEmpty + assertThat(parsedWebhookEvent.cardUpdated()).isEmpty + assertThat(parsedWebhookEvent.cardTransactionUpdated()).isEmpty + assertThat(parsedWebhookEvent.cardTransactionEnhancedDataCreated()).isEmpty + assertThat(parsedWebhookEvent.cardTransactionEnhancedDataUpdated()).isEmpty + assertThat(parsedWebhookEvent.claimCreated()).isEmpty + assertThat(parsedWebhookEvent.claimUpdated()).isEmpty + assertThat(parsedWebhookEvent.claimDocumentUploaded()).isEmpty + assertThat(parsedWebhookEvent.claimDocumentAccepted()).isEmpty + assertThat(parsedWebhookEvent.claimDocumentRejected()).isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationApprovalRequest()).isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationResult()).isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationTwoFactorAuthenticationCode()) + .isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationTwoFactorAuthenticationCodeSent()) + .isEmpty + assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty + assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty + assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).contains(embedViewed) + assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty + assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty + assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty + assertThat(parsedWebhookEvent.externalPaymentUpdated()).isEmpty + assertThat(parsedWebhookEvent.financialAccountCreated()).isEmpty + assertThat(parsedWebhookEvent.financialAccountUpdated()).isEmpty + assertThat(parsedWebhookEvent.fundingEventCreated()).isEmpty + assertThat(parsedWebhookEvent.loanTapeCreated()).isEmpty + assertThat(parsedWebhookEvent.loanTapeUpdated()).isEmpty + assertThat(parsedWebhookEvent.managementOperationCreated()).isEmpty + assertThat(parsedWebhookEvent.managementOperationUpdated()).isEmpty + assertThat(parsedWebhookEvent.internalTransactionCreated()).isEmpty + assertThat(parsedWebhookEvent.internalTransactionUpdated()).isEmpty + assertThat(parsedWebhookEvent.networkTotalCreated()).isEmpty + assertThat(parsedWebhookEvent.networkTotalUpdated()).isEmpty + assertThat(parsedWebhookEvent.paymentTransactionCreated()).isEmpty + assertThat(parsedWebhookEvent.paymentTransactionUpdated()).isEmpty + assertThat(parsedWebhookEvent.settlementReportUpdated()).isEmpty + assertThat(parsedWebhookEvent.statementsCreated()).isEmpty + assertThat(parsedWebhookEvent.threeDSAuthenticationCreated()).isEmpty + assertThat(parsedWebhookEvent.threeDSAuthenticationUpdated()).isEmpty + assertThat(parsedWebhookEvent.threeDSAuthenticationChallenge()).isEmpty + assertThat(parsedWebhookEvent.tokenizationApprovalRequest()).isEmpty + assertThat(parsedWebhookEvent.tokenizationResult()).isEmpty + assertThat(parsedWebhookEvent.tokenizationTwoFactorAuthenticationCode()).isEmpty + assertThat(parsedWebhookEvent.tokenizationTwoFactorAuthenticationCodeSent()).isEmpty + assertThat(parsedWebhookEvent.tokenizationUpdated()).isEmpty + assertThat(parsedWebhookEvent.threeDSAuthenticationApprovalRequest()).isEmpty + assertThat(parsedWebhookEvent.disputeTransactionCreated()).isEmpty + assertThat(parsedWebhookEvent.disputeTransactionUpdated()).isEmpty + } + + @Test + fun ofEmbedViewedRoundtrip() { + val jsonMapper = jsonMapper() + val parsedWebhookEvent = + ParsedWebhookEvent.ofEmbedViewed( + EmbedViewedWebhookEvent.builder() + .accountToken("9a352526-4e69-469a-80b8-e22c71ba3cf0") + .cardToken("4df9a19c-9e1e-40d1-b27a-05e01152ee07") + .deviceDetails( + EmbedViewedWebhookEvent.EmbedDeviceDetails.builder() + .ipAddress("192.0.2.1") + .build() + ) + .embedType(EmbedViewedWebhookEvent.EmbedType.PAN) + .eventType(EmbedViewedWebhookEvent.EventType.EMBED_VIEWED) + .sessionId("4273ff06-3ce4-4092-8a1f-0340e33b6375") + .build() + ) + + val roundtrippedParsedWebhookEvent = + jsonMapper.readValue( + jsonMapper.writeValueAsString(parsedWebhookEvent), + jacksonTypeRef(), + ) + + assertThat(roundtrippedParsedWebhookEvent).isEqualTo(parsedWebhookEvent) + } + @Test fun ofExternalBankAccountCreated() { val externalBankAccountCreated = @@ -6334,6 +6634,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()) .contains(externalBankAccountCreated) assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty @@ -6499,6 +6801,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()) .contains(externalBankAccountUpdated) @@ -6660,6 +6964,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).contains(externalPaymentCreated) @@ -6818,6 +7124,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -6974,6 +7282,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -7127,6 +7437,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -7265,6 +7577,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -7537,6 +7851,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -7977,6 +8293,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -8308,6 +8626,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -8516,6 +8836,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -8694,6 +9016,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -8842,6 +9166,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -8985,6 +9311,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -9119,6 +9447,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -9231,6 +9561,7 @@ internal class ParsedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -9302,6 +9633,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -9379,6 +9712,7 @@ internal class ParsedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -9463,6 +9797,7 @@ internal class ParsedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -9534,6 +9869,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -9611,6 +9948,7 @@ internal class ParsedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -9721,6 +10059,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -9968,6 +10308,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -10329,6 +10671,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -10709,6 +11053,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -11118,6 +11464,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -11457,6 +11805,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -11657,6 +12007,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -11805,6 +12157,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -11942,6 +12296,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -12102,6 +12458,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -12383,6 +12741,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -12682,6 +13042,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty @@ -12894,6 +13256,8 @@ internal class ParsedWebhookEventTest { assertThat(parsedWebhookEvent.digitalWalletTokenizationUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeUpdated()).isEmpty assertThat(parsedWebhookEvent.disputeEvidenceUploadFailed()).isEmpty + assertThat(parsedWebhookEvent.embedSessionGenerated()).isEmpty + assertThat(parsedWebhookEvent.embedViewed()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountCreated()).isEmpty assertThat(parsedWebhookEvent.externalBankAccountUpdated()).isEmpty assertThat(parsedWebhookEvent.externalPaymentCreated()).isEmpty diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentCreateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentCreateResponseTest.kt index d0d8a60f8..5d638ef37 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentCreateResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentCreateResponseTest.kt @@ -53,6 +53,7 @@ internal class PaymentCreateResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -137,6 +138,7 @@ internal class PaymentCreateResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -229,6 +231,7 @@ internal class PaymentCreateResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentListPageResponseTest.kt index d6019cff6..18f5b284f 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentListPageResponseTest.kt @@ -59,6 +59,7 @@ internal class PaymentListPageResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -132,6 +133,7 @@ internal class PaymentListPageResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -213,6 +215,7 @@ internal class PaymentListPageResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentRetryResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentRetryResponseTest.kt index ff9cc52a9..35fde1b08 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentRetryResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentRetryResponseTest.kt @@ -53,6 +53,7 @@ internal class PaymentRetryResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -137,6 +138,7 @@ internal class PaymentRetryResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -229,6 +231,7 @@ internal class PaymentRetryResponseTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTest.kt index 98bfc5201..b75154717 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTest.kt @@ -53,6 +53,7 @@ internal class PaymentTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -122,6 +123,7 @@ internal class PaymentTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -198,6 +200,7 @@ internal class PaymentTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTransactionCreatedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTransactionCreatedWebhookEventTest.kt index 15c49faf1..51a8d7e1c 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTransactionCreatedWebhookEventTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTransactionCreatedWebhookEventTest.kt @@ -53,6 +53,7 @@ internal class PaymentTransactionCreatedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -131,6 +132,7 @@ internal class PaymentTransactionCreatedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -213,6 +215,7 @@ internal class PaymentTransactionCreatedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTransactionUpdatedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTransactionUpdatedWebhookEventTest.kt index 80d4abd5b..e93812e7d 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTransactionUpdatedWebhookEventTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentTransactionUpdatedWebhookEventTest.kt @@ -53,6 +53,7 @@ internal class PaymentTransactionUpdatedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -131,6 +132,7 @@ internal class PaymentTransactionUpdatedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -213,6 +215,7 @@ internal class PaymentTransactionUpdatedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/QueueTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/QueueTest.kt index a490a7f8a..2bc699599 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/QueueTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/QueueTest.kt @@ -15,6 +15,7 @@ internal class QueueTest { val queue = Queue.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("string") .caseCounts( Queue.CaseCounts.builder() .assigned(0L) @@ -32,6 +33,7 @@ internal class QueueTest { .build() assertThat(queue.token()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + assertThat(queue.allowedResolutions()).containsExactly("string") assertThat(queue.caseCounts()) .isEqualTo( Queue.CaseCounts.builder() @@ -55,6 +57,7 @@ internal class QueueTest { val queue = Queue.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("string") .caseCounts( Queue.CaseCounts.builder() .assigned(0L) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringCaseListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringCaseListPageResponseTest.kt index c1641fcb1..6a86a9c4b 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringCaseListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringCaseListPageResponseTest.kt @@ -30,7 +30,7 @@ internal class TransactionMonitoringCaseListPageResponseTest { .pendingTransactions(true) .priority(CasePriority.LOW) .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .resolved(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .ruleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -64,7 +64,7 @@ internal class TransactionMonitoringCaseListPageResponseTest { .pendingTransactions(true) .priority(CasePriority.LOW) .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .resolved(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .ruleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -102,7 +102,7 @@ internal class TransactionMonitoringCaseListPageResponseTest { .pendingTransactions(true) .priority(CasePriority.LOW) .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .resolved(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .ruleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringCaseUpdateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringCaseUpdateParamsTest.kt index 43b426aed..8e59739be 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringCaseUpdateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringCaseUpdateParamsTest.kt @@ -16,7 +16,7 @@ internal class TransactionMonitoringCaseUpdateParamsTest { .actorToken("actor_token") .assignee("assignee") .priority(CasePriority.LOW) - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .slaDeadline(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .status(CaseStatus.OPEN) @@ -49,7 +49,7 @@ internal class TransactionMonitoringCaseUpdateParamsTest { .actorToken("actor_token") .assignee("assignee") .priority(CasePriority.LOW) - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .slaDeadline(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .status(CaseStatus.OPEN) @@ -66,7 +66,7 @@ internal class TransactionMonitoringCaseUpdateParamsTest { assertThat(body.actorToken()).contains("actor_token") assertThat(body.assignee()).contains("assignee") assertThat(body.priority()).contains(CasePriority.LOW) - assertThat(body.resolution()).contains(ResolutionOutcome.CONFIRMED_FRAUD) + assertThat(body.resolution()).contains("resolution") assertThat(body.resolutionNotes()).contains("resolution_notes") assertThat(body.slaDeadline()).contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) assertThat(body.status()).contains(CaseStatus.OPEN) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueCreateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueCreateParamsTest.kt index 48f06816f..8bf75b7df 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueCreateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueCreateParamsTest.kt @@ -2,6 +2,7 @@ package com.lithic.api.models +import kotlin.jvm.optionals.getOrNull import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -11,6 +12,7 @@ internal class TransactionMonitoringQueueCreateParamsTest { fun create() { TransactionMonitoringQueueCreateParams.builder() .name("name") + .addAllowedResolution("x") .description("description") .build() } @@ -20,12 +22,14 @@ internal class TransactionMonitoringQueueCreateParamsTest { val params = TransactionMonitoringQueueCreateParams.builder() .name("name") + .addAllowedResolution("x") .description("description") .build() val body = params._body() assertThat(body.name()).isEqualTo("name") + assertThat(body.allowedResolutions().getOrNull()).containsExactly("x") assertThat(body.description()).contains("description") } diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueListPageResponseTest.kt index f8b580b0e..9be144a0a 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueListPageResponseTest.kt @@ -17,6 +17,7 @@ internal class TransactionMonitoringQueueListPageResponseTest { .addData( Queue.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("string") .caseCounts( Queue.CaseCounts.builder() .assigned(0L) @@ -40,6 +41,7 @@ internal class TransactionMonitoringQueueListPageResponseTest { .containsExactly( Queue.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("string") .caseCounts( Queue.CaseCounts.builder() .assigned(0L) @@ -67,6 +69,7 @@ internal class TransactionMonitoringQueueListPageResponseTest { .addData( Queue.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("string") .caseCounts( Queue.CaseCounts.builder() .assigned(0L) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueUpdateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueUpdateParamsTest.kt index c3f6c6557..0d3063dee 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueUpdateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionMonitoringQueueUpdateParamsTest.kt @@ -2,6 +2,7 @@ package com.lithic.api.models +import kotlin.jvm.optionals.getOrNull import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -11,6 +12,7 @@ internal class TransactionMonitoringQueueUpdateParamsTest { fun create() { TransactionMonitoringQueueUpdateParams.builder() .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("x") .description("description") .name("name") .build() @@ -33,12 +35,14 @@ internal class TransactionMonitoringQueueUpdateParamsTest { val params = TransactionMonitoringQueueUpdateParams.builder() .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("x") .description("description") .name("name") .build() val body = params._body() + assertThat(body.allowedResolutions().getOrNull()).containsExactly("x") assertThat(body.description()).contains("description") assertThat(body.name()).contains("name") } diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/transactionMonitoring/CaseServiceAsyncTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/transactionMonitoring/CaseServiceAsyncTest.kt index 108b953a6..77393bf95 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/transactionMonitoring/CaseServiceAsyncTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/transactionMonitoring/CaseServiceAsyncTest.kt @@ -7,7 +7,6 @@ import com.lithic.api.client.okhttp.LithicOkHttpClientAsync import com.lithic.api.core.JsonValue import com.lithic.api.models.CasePriority import com.lithic.api.models.CaseStatus -import com.lithic.api.models.ResolutionOutcome import com.lithic.api.models.TransactionMonitoringCaseUpdateParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test @@ -47,7 +46,7 @@ internal class CaseServiceAsyncTest { .actorToken("actor_token") .assignee("assignee") .priority(CasePriority.LOW) - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .slaDeadline(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .status(CaseStatus.OPEN) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/transactionMonitoring/QueueServiceAsyncTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/transactionMonitoring/QueueServiceAsyncTest.kt index 736acc148..a37fd7ff0 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/transactionMonitoring/QueueServiceAsyncTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/transactionMonitoring/QueueServiceAsyncTest.kt @@ -25,6 +25,7 @@ internal class QueueServiceAsyncTest { queueServiceAsync.create( TransactionMonitoringQueueCreateParams.builder() .name("name") + .addAllowedResolution("x") .description("description") .build() ) @@ -61,6 +62,7 @@ internal class QueueServiceAsyncTest { queueServiceAsync.update( TransactionMonitoringQueueUpdateParams.builder() .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("x") .description("description") .name("name") .build() diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/transactionMonitoring/CaseServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/transactionMonitoring/CaseServiceTest.kt index 315b8d4ad..ae74be695 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/transactionMonitoring/CaseServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/transactionMonitoring/CaseServiceTest.kt @@ -7,7 +7,6 @@ import com.lithic.api.client.okhttp.LithicOkHttpClient import com.lithic.api.core.JsonValue import com.lithic.api.models.CasePriority import com.lithic.api.models.CaseStatus -import com.lithic.api.models.ResolutionOutcome import com.lithic.api.models.TransactionMonitoringCaseUpdateParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test @@ -46,7 +45,7 @@ internal class CaseServiceTest { .actorToken("actor_token") .assignee("assignee") .priority(CasePriority.LOW) - .resolution(ResolutionOutcome.CONFIRMED_FRAUD) + .resolution("resolution") .resolutionNotes("resolution_notes") .slaDeadline(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .status(CaseStatus.OPEN) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/transactionMonitoring/QueueServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/transactionMonitoring/QueueServiceTest.kt index e49e0ee63..b61b52cb2 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/transactionMonitoring/QueueServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/transactionMonitoring/QueueServiceTest.kt @@ -25,6 +25,7 @@ internal class QueueServiceTest { queueService.create( TransactionMonitoringQueueCreateParams.builder() .name("name") + .addAllowedResolution("x") .description("description") .build() ) @@ -59,6 +60,7 @@ internal class QueueServiceTest { queueService.update( TransactionMonitoringQueueUpdateParams.builder() .queueToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addAllowedResolution("x") .description("description") .name("name") .build()