From 326d02d42d76d0f79391d693a9bdd4068e784b94 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 22:18:43 +0000 Subject: [PATCH 01/12] docs(api): clarify simulateClearing supports multiple calls --- .stats.yml | 4 +-- .../TransactionSimulateClearingParams.kt | 28 ++++++++++--------- .../services/async/TransactionServiceAsync.kt | 5 ++-- .../services/blocking/TransactionService.kt | 5 ++-- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.stats.yml b/.stats.yml index 189b2dd2a..f99c3ec70 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 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-1514911f233cb8bf0d6752c45bfa53a61b8f9b8ff215a4ea94a95f9505911000.yml +openapi_spec_hash: 9820a9c9a4ff778c627041eb53fd4ee5 config_hash: 5bb913c05ebeb301ec925b16e75bb251 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/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/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 From 7afdd50d02a66cc8e5fa76133d333c5ffbccab38 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 14:54:42 +0000 Subject: [PATCH 02/12] docs(api): update category parameter description in external_payment list --- .stats.yml | 4 ++-- .../com/lithic/api/models/ExternalPaymentListParams.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index f99c3ec70..9c19fa158 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-1514911f233cb8bf0d6752c45bfa53a61b8f9b8ff215a4ea94a95f9505911000.yml -openapi_spec_hash: 9820a9c9a4ff778c627041eb53fd4ee5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-021aecb037a2f6b44056d6ebe08129e55f2dd95d8a6944c6e2c1c8e2bede56b4.yml +openapi_spec_hash: 3567c6592916d79ce38248d922cd0db6 config_hash: 5bb913c05ebeb301ec925b16e75bb251 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 { From 20fcf6fe25934101174fada2170592df451bd5ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:10:25 +0000 Subject: [PATCH 03/12] docs(api): clarify dispute event type descriptions --- .stats.yml | 4 +- .../kotlin/com/lithic/api/models/Event.kt | 63 +++++++++++++------ .../com/lithic/api/models/EventListParams.kt | 21 +++++-- .../lithic/api/models/EventSubscription.kt | 21 +++++-- .../models/EventSubscriptionCreateParams.kt | 21 +++++-- .../models/EventSubscriptionUpdateParams.kt | 21 +++++-- 6 files changed, 107 insertions(+), 44 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9c19fa158..f8c9d580c 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-021aecb037a2f6b44056d6ebe08129e55f2dd95d8a6944c6e2c1c8e2bede56b4.yml -openapi_spec_hash: 3567c6592916d79ce38248d922cd0db6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-7944f9c14da86359cf30f16d97dff357f656f8fab9a59e923c436304624438ee.yml +openapi_spec_hash: 4b45cf81f64bc52e739731108d2cc482 config_hash: 5bb913c05ebeb301ec925b16e75bb251 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..c98034515 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,19 @@ 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. * - 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,7 +144,7 @@ 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 @@ -271,7 +280,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 +334,19 @@ 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. * - 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,7 +365,7 @@ 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 @@ -478,7 +496,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 +546,19 @@ 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. * - 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,7 +577,7 @@ 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 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..5941c13a8 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,19 @@ 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. * - 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,7 +402,7 @@ 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 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..b0176d2ea 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,19 @@ 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. * - 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,7 +412,7 @@ 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 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..e4d13e728 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,19 @@ 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. * - 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,7 +735,7 @@ 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 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..ec6074380 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,19 @@ 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. * - 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,7 +758,7 @@ 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 From d0f208a821f93589ce4a79baf636430386ad7a27 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:18:50 +0000 Subject: [PATCH 04/12] feat(stlc): configurable CI runner and private-production-repo support in workflow templates --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From a3627495919ac3272de3403e3b4e5a50155dd434 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 20:23:08 +0000 Subject: [PATCH 05/12] feat(api): add PAYMENT category to book transfers --- .stats.yml | 4 ++-- .../com/lithic/api/models/BookTransferCreateParams.kt | 6 ++++++ .../kotlin/com/lithic/api/models/BookTransferResponse.kt | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f8c9d580c..03f061a34 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-7944f9c14da86359cf30f16d97dff357f656f8fab9a59e923c436304624438ee.yml -openapi_spec_hash: 4b45cf81f64bc52e739731108d2cc482 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-09b6d1b85c657173562e9a372adc74551f07d476122003078e9168467329f792.yml +openapi_spec_hash: a2b3a526310ceccd4ccb59ec428d246f config_hash: 5bb913c05ebeb301ec925b16e75bb251 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..32b237b6f 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 @@ -1404,6 +1404,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") @@ -1459,6 +1461,7 @@ private constructor( INTEREST, LATE_PAYMENT, BILL_PAYMENT, + PAYMENT_FEE, CASH_BACK, ACCOUNT_TO_ACCOUNT, CARD_TO_CARD, @@ -1506,6 +1509,7 @@ private constructor( INTEREST, LATE_PAYMENT, BILL_PAYMENT, + PAYMENT_FEE, CASH_BACK, ACCOUNT_TO_ACCOUNT, CARD_TO_CARD, @@ -1557,6 +1561,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 @@ -1606,6 +1611,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 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..a2a4d0906 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 @@ -1801,6 +1801,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") @@ -1856,6 +1858,7 @@ private constructor( INTEREST, LATE_PAYMENT, BILL_PAYMENT, + PAYMENT_FEE, CASH_BACK, ACCOUNT_TO_ACCOUNT, CARD_TO_CARD, @@ -1904,6 +1907,7 @@ private constructor( INTEREST, LATE_PAYMENT, BILL_PAYMENT, + PAYMENT_FEE, CASH_BACK, ACCOUNT_TO_ACCOUNT, CARD_TO_CARD, @@ -1955,6 +1959,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 @@ -2004,6 +2009,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 From 6b438b70afa7efc9b556f664177ab168a6fff71b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 20:52:14 +0000 Subject: [PATCH 06/12] feat(api): add embed webhook event types --- .stats.yml | 4 +- .../com/lithic/api/models/CardEmbedParams.kt | 4 + .../EmbedSessionGeneratedWebhookEvent.kt | 853 +++++++++++++++++ .../api/models/EmbedViewedWebhookEvent.kt | 857 ++++++++++++++++++ .../kotlin/com/lithic/api/models/Event.kt | 18 + .../com/lithic/api/models/EventListParams.kt | 14 + .../lithic/api/models/EventSubscription.kt | 14 + .../models/EventSubscriptionCreateParams.kt | 14 + ...tSubscriptionSendSimulatedExampleParams.kt | 12 + .../models/EventSubscriptionUpdateParams.kt | 14 + .../lithic/api/models/ParsedWebhookEvent.kt | 63 ++ .../api/services/async/CardServiceAsync.kt | 7 + .../services/async/CardServiceAsyncImpl.kt | 2 + .../api/services/blocking/CardService.kt | 7 + .../api/services/blocking/CardServiceImpl.kt | 2 + .../EmbedSessionGeneratedWebhookEventTest.kt | 72 ++ .../api/models/EmbedViewedWebhookEventTest.kt | 69 ++ .../api/models/ParsedWebhookEventTest.kt | 360 ++++++++ 18 files changed, 2384 insertions(+), 2 deletions(-) create mode 100644 lithic-java-core/src/main/kotlin/com/lithic/api/models/EmbedSessionGeneratedWebhookEvent.kt create mode 100644 lithic-java-core/src/main/kotlin/com/lithic/api/models/EmbedViewedWebhookEvent.kt create mode 100644 lithic-java-core/src/test/kotlin/com/lithic/api/models/EmbedSessionGeneratedWebhookEventTest.kt create mode 100644 lithic-java-core/src/test/kotlin/com/lithic/api/models/EmbedViewedWebhookEventTest.kt diff --git a/.stats.yml b/.stats.yml index 03f061a34..6174bfd2b 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-09b6d1b85c657173562e9a372adc74551f07d476122003078e9168467329f792.yml -openapi_spec_hash: a2b3a526310ceccd4ccb59ec428d246f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-2d2600072500797474f0d7798c1a8b668bfbc4e0c6a8f076ca7b4cc7ad82058b.yml +openapi_spec_hash: 7605eb6be77a3d150078916f0eb0e9ac config_hash: 5bb913c05ebeb301ec925b16e75bb251 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 c98034515..478f8b46c 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 @@ -126,6 +126,8 @@ private constructor( * * 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,6 +349,8 @@ private constructor( * * 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. @@ -559,6 +563,8 @@ private constructor( * * 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. @@ -690,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") @@ -786,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, @@ -857,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, @@ -935,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 @@ -1014,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 5941c13a8..70417c1e4 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 @@ -384,6 +384,8 @@ private constructor( * * 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. @@ -515,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") @@ -611,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, @@ -682,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, @@ -760,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 @@ -839,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 b0176d2ea..2c364ac01 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 @@ -394,6 +394,8 @@ private constructor( * * 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. @@ -525,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") @@ -621,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, @@ -692,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, @@ -770,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 @@ -849,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 e4d13e728..789263338 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 @@ -717,6 +717,8 @@ private constructor( * * 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. @@ -848,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") @@ -944,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, @@ -1015,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, @@ -1093,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 @@ -1172,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 ec6074380..eedd0e0bd 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 @@ -740,6 +740,8 @@ private constructor( * * 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. @@ -871,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") @@ -967,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, @@ -1038,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, @@ -1116,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 @@ -1195,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/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/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/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/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/ParsedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt index 4a4e76790..da67e6c80 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 @@ -9302,6 +9632,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 @@ -9534,6 +9866,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 @@ -9721,6 +10055,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 +10304,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 +10667,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 +11049,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 +11460,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 +11801,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 +12003,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 +12153,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 +12292,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 +12454,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 +12737,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 +13038,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 +13252,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 From 5b5091a6f565bb93817401f30e37590e7f532623 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 22:59:39 +0000 Subject: [PATCH 07/12] feat(api): add Optional parameter overloads to transaction response builders --- .stats.yml | 4 ++-- ...ardAuthorizationChallengeResponseParams.kt | 2 +- .../kotlin/com/lithic/api/models/Event.kt | 6 +++--- .../com/lithic/api/models/EventListParams.kt | 2 +- .../lithic/api/models/EventSubscription.kt | 2 +- .../models/EventSubscriptionCreateParams.kt | 2 +- .../models/EventSubscriptionUpdateParams.kt | 2 +- ...reeDSDecisioningChallengeResponseParams.kt | 2 +- .../api/models/TransactionReportResponse.kt | 20 +++++++++++++++---- .../api/models/TransactionRetrieveResponse.kt | 20 +++++++++++++++---- .../async/CardAuthorizationServiceAsync.kt | 2 +- .../async/threeDS/DecisioningServiceAsync.kt | 2 +- .../blocking/CardAuthorizationService.kt | 2 +- .../blocking/threeDS/DecisioningService.kt | 2 +- 14 files changed, 47 insertions(+), 23 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6174bfd2b..f9ca92ea8 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-2d2600072500797474f0d7798c1a8b668bfbc4e0c6a8f076ca7b4cc7ad82058b.yml -openapi_spec_hash: 7605eb6be77a3d150078916f0eb0e9ac +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-6683cf82e93cfd95e17b0386f070333486fe8e7b857b47c62e09682362d5991d.yml +openapi_spec_hash: ce2c1f6201bb2036d05602238503eb6b config_hash: 5bb913c05ebeb301ec925b16e75bb251 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/Event.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt index 478f8b46c..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 @@ -151,7 +151,7 @@ private constructor( * 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 @@ -374,7 +374,7 @@ private constructor( * 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 @@ -588,7 +588,7 @@ private constructor( * 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 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 70417c1e4..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 @@ -409,7 +409,7 @@ private constructor( * 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 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 2c364ac01..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 @@ -419,7 +419,7 @@ private constructor( * 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 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 789263338..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 @@ -742,7 +742,7 @@ private constructor( * 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 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 eedd0e0bd..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 @@ -765,7 +765,7 @@ private constructor( * 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 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/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/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/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/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). */ From 6038ae0656608deb7fa01b8d0aa2865467b637a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 06:18:44 +0000 Subject: [PATCH 08/12] docs(api): update VelocityLimitPeriod duration maximum from 31 to 90 days --- .stats.yml | 4 ++-- .../main/kotlin/com/lithic/api/models/VelocityLimitPeriod.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index f9ca92ea8..757cea680 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-6683cf82e93cfd95e17b0386f070333486fe8e7b857b47c62e09682362d5991d.yml -openapi_spec_hash: ce2c1f6201bb2036d05602238503eb6b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-46435dfdef99ea1c005a78bab282c859980e1edd5570e781bf3b67dd97ebf545.yml +openapi_spec_hash: fe504df52c793d72df78146d3fb6f3ac config_hash: 5bb913c05ebeb301ec925b16e75bb251 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)) From 108f7333b40ea70fff815cdc2a00a14464bbb5a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 14:57:14 +0000 Subject: [PATCH 09/12] feat(api): add REVERSED status value to payment list parameters --- .stats.yml | 4 ++-- .../main/kotlin/com/lithic/api/models/PaymentListParams.kt | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 757cea680..d528d88e4 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-46435dfdef99ea1c005a78bab282c859980e1edd5570e781bf3b67dd97ebf545.yml -openapi_spec_hash: fe504df52c793d72df78146d3fb6f3ac +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-5b3d4793b9cc2b4a6ac971f36d5e8a08b48fb976aba670f9ffedc929a52d3e0a.yml +openapi_spec_hash: 3bcf49d20dbd24100d67fa3750a40e6b config_hash: 5bb913c05ebeb301ec925b16e75bb251 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") } From 143f55bf5f783aa9ab8b40d81f2ab6bb5a3fa1b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 20:21:38 +0000 Subject: [PATCH 10/12] feat(api): add recipient_name field to Payment ACH method attributes --- .stats.yml | 4 +- .../kotlin/com/lithic/api/models/Payment.kt | 51 ++++++++++++++++++- .../AccountActivityListPageResponseTest.kt | 3 ++ .../models/AccountActivityListResponseTest.kt | 2 + ...ActivityRetrieveTransactionResponseTest.kt | 2 + .../api/models/ParsedWebhookEventTest.kt | 4 ++ .../api/models/PaymentCreateResponseTest.kt | 3 ++ .../api/models/PaymentListPageResponseTest.kt | 3 ++ .../api/models/PaymentRetryResponseTest.kt | 3 ++ .../com/lithic/api/models/PaymentTest.kt | 3 ++ ...ymentTransactionCreatedWebhookEventTest.kt | 3 ++ ...ymentTransactionUpdatedWebhookEventTest.kt | 3 ++ 12 files changed, 81 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d528d88e4..323ed4657 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-5b3d4793b9cc2b4a6ac971f36d5e8a08b48fb976aba670f9ffedc929a52d3e0a.yml -openapi_spec_hash: 3bcf49d20dbd24100d67fa3750a40e6b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-bd17a533b1b772cf28389698c3d4e9f462360e323588175292161c5adc5895f1.yml +openapi_spec_hash: 1004e42a5569ca559ffee65bd85ee7f8 config_hash: 5bb913c05ebeb301ec925b16e75bb251 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..67a9bd3d2 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 @@ -3172,6 +3172,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 +3199,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 +3218,7 @@ private constructor( companyId, overrideCompanyName, receiptRoutingNumber, + recipientName, retries, returnReasonCode, traceNumbers, @@ -3272,6 +3277,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 +3364,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 +3435,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 +3449,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 +3571,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 +3703,7 @@ private constructor( companyId, overrideCompanyName, receiptRoutingNumber, + recipientName, retries, returnReasonCode, (traceNumbers ?: JsonMissing.of()).map { it.toImmutable() }, @@ -3689,6 +3734,7 @@ private constructor( companyId() overrideCompanyName() receiptRoutingNumber() + recipientName() retries() returnReasonCode() traceNumbers() @@ -3717,6 +3763,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 +3946,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 +3961,7 @@ private constructor( companyId, overrideCompanyName, receiptRoutingNumber, + recipientName, retries, returnReasonCode, traceNumbers, @@ -3923,7 +3972,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/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/ParsedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt index da67e6c80..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 @@ -9561,6 +9561,7 @@ internal class ParsedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -9711,6 +9712,7 @@ internal class ParsedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -9795,6 +9797,7 @@ internal class ParsedWebhookEventTest { .companyId("1111111111") .overrideCompanyName("override_company_name") .receiptRoutingNumber(null) + .recipientName(null) .retries(0L) .returnReasonCode(null) .addTraceNumber("string") @@ -9945,6 +9948,7 @@ internal class ParsedWebhookEventTest { .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/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") From 0ef7114609e355b3dfc6d193df85fded7a69300e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 21:14:08 +0000 Subject: [PATCH 11/12] feat(api): add PROGRAM_TRANSFER enum values to account/book_transfer/payment/statement types --- .stats.yml | 4 ++-- .../api/models/AccountActivityListParams.kt | 6 ++++++ .../api/models/AccountActivityListResponse.kt | 6 ++++++ ...countActivityRetrieveTransactionResponse.kt | 6 ++++++ .../api/models/BookTransferCreateParams.kt | 18 ++++++++++++++++++ .../api/models/BookTransferListParams.kt | 6 ++++++ .../lithic/api/models/BookTransferResponse.kt | 18 ++++++++++++++++++ .../com/lithic/api/models/FinancialEvent.kt | 12 ++++++++++++ .../kotlin/com/lithic/api/models/Payment.kt | 6 ++++++ .../lithic/api/models/StatementLineItems.kt | 18 ++++++++++++++++++ 10 files changed, 98 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 323ed4657..8a3de29b7 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-bd17a533b1b772cf28389698c3d4e9f462360e323588175292161c5adc5895f1.yml -openapi_spec_hash: 1004e42a5569ca559ffee65bd85ee7f8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-90a1307b64fb449a81303dd73185b15e40f48c10415f4e4f483e59d828c53084.yml +openapi_spec_hash: 4c752106ab99b1c537fc364535736eaa config_hash: 5bb913c05ebeb301ec925b16e75bb251 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..578a9e67b 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 @@ -430,6 +430,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)) } @@ -457,6 +459,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -491,6 +494,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an unknown * value. @@ -529,6 +533,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -565,6 +570,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..7e914ac4d 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 @@ -1152,6 +1152,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 +1181,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -1215,6 +1218,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an * unknown value. @@ -1253,6 +1257,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1289,6 +1294,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..25d723db2 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 @@ -1174,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)) } @@ -1201,6 +1203,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -1237,6 +1240,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an * unknown value. @@ -1275,6 +1279,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1311,6 +1316,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 32b237b6f..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") } @@ -1436,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)) } @@ -1477,6 +1487,8 @@ private constructor( SERVICE, TRANSFER, COLLECTION, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, } /** @@ -1525,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. @@ -1577,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 } @@ -1627,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 a2a4d0906..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") } @@ -1833,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)) } @@ -1874,6 +1884,8 @@ private constructor( SERVICE, TRANSFER, COLLECTION, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, } /** @@ -1923,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. @@ -1975,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 } @@ -2025,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/FinancialEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt index 4361e278b..daf7d9bab 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") @@ -711,6 +715,8 @@ private constructor( RETURNED_PAYMENT, RETURNED_PAYMENT_REVERSAL, LITHIC_NETWORK_PAYMENT, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, ANNUAL, ANNUAL_REVERSAL, QUARTERLY, @@ -811,6 +817,8 @@ private constructor( RETURNED_PAYMENT, RETURNED_PAYMENT_REVERSAL, LITHIC_NETWORK_PAYMENT, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, ANNUAL, ANNUAL_REVERSAL, QUARTERLY, @@ -915,6 +923,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 @@ -1017,6 +1027,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 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 67a9bd3d2..3ad3c2d84 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 @@ -1172,6 +1172,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)) } @@ -1199,6 +1201,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -1233,6 +1236,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an unknown * value. @@ -1271,6 +1275,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1307,6 +1312,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/StatementLineItems.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt index fad18d66f..5731f917c 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 @@ -995,6 +995,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)) } @@ -1022,6 +1024,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, } /** @@ -1058,6 +1061,7 @@ private constructor( MANAGEMENT_DISBURSEMENT, HOLD, PROGRAM_FUNDING, + PROGRAM_TRANSFER, /** * An enum member indicating that [TransactionCategory] was instantiated with an * unknown value. @@ -1096,6 +1100,7 @@ private constructor( MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT HOLD -> Value.HOLD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + PROGRAM_TRANSFER -> Value.PROGRAM_TRANSFER else -> Value._UNKNOWN } @@ -1132,6 +1137,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 +1383,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") @@ -1477,6 +1487,8 @@ private constructor( RETURNED_PAYMENT, RETURNED_PAYMENT_REVERSAL, LITHIC_NETWORK_PAYMENT, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, ANNUAL, ANNUAL_REVERSAL, QUARTERLY, @@ -1579,6 +1591,8 @@ private constructor( RETURNED_PAYMENT, RETURNED_PAYMENT_REVERSAL, LITHIC_NETWORK_PAYMENT, + LITHIC_PROGRAM_TRANSFER, + BANK_PROGRAM_TRANSFER, ANNUAL, ANNUAL_REVERSAL, QUARTERLY, @@ -1683,6 +1697,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 @@ -1785,6 +1801,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 From ce66c9c902c455757d3e46fe3c8787ac2a58cc8a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 21:14:42 +0000 Subject: [PATCH 12/12] release: 0.132.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 22 ++++++++++++++++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 29 insertions(+), 7 deletions(-) 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/CHANGELOG.md b/CHANGELOG.md index 98d31de2f..86083e4d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 0.132.0 (2026-07-22) + +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 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)) +* **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 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 {