From dc09408533cc3dbedb4afaeb56f9c458fa9e9e4b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:26:12 +0000 Subject: [PATCH] feat(api): updates (#186) --- .../lithic/api/models/CardProvisionParams.kt | 79 +++++++++- .../kotlin/com/lithic/api/models/Event.kt | 29 ++++ .../com/lithic/api/models/EventListParams.kt | 29 ++++ .../lithic/api/models/EventSubscription.kt | 29 ++++ .../models/EventSubscriptionCreateParams.kt | 29 ++++ ...tSubscriptionSendSimulatedExampleParams.kt | 29 ++++ .../models/EventSubscriptionUpdateParams.kt | 29 ++++ .../models/ExternalBankAccountCreateParams.kt | 19 ++- .../ExternalBankAccountCreateResponse.kt | 29 +++- .../models/ExternalBankAccountListResponse.kt | 29 +++- .../ExternalBankAccountRetrieveResponse.kt | 29 +++- ...alBankAccountRetryMicroDepositsResponse.kt | 30 +++- .../ExternalBankAccountUpdateResponse.kt | 29 +++- .../com/lithic/api/models/FinancialAccount.kt | 26 +++- .../lithic/api/models/FinancialTransaction.kt | 30 ++++ .../lithic/api/models/LineItemListResponse.kt | 29 ++++ .../api/models/MicroDepositCreateResponse.kt | 29 +++- .../com/lithic/api/models/SettlementReport.kt | 12 +- .../kotlin/com/lithic/api/models/Transfer.kt | 30 ++++ .../api/models/TransferCreateResponse.kt | 106 ------------- .../services/async/TransferServiceAsync.kt | 4 +- .../async/TransferServiceAsyncImpl.kt | 8 +- .../api/services/blocking/TransferService.kt | 4 +- .../services/blocking/TransferServiceImpl.kt | 11 +- .../api/models/CardProvisionParamsTest.kt | 6 + .../ExternalBankAccountCreateParamsTest.kt | 3 +- .../ExternalBankAccountCreateResponseTest.kt | 3 + .../ExternalBankAccountListResponseTest.kt | 3 + ...ExternalBankAccountRetrieveResponseTest.kt | 3 + ...nkAccountRetryMicroDepositsResponseTest.kt | 3 + .../ExternalBankAccountUpdateResponseTest.kt | 3 + .../lithic/api/models/FinancialAccountTest.kt | 2 + .../api/models/FinancialTransactionTest.kt | 4 +- .../api/models/LineItemListResponseTest.kt | 4 +- .../models/MicroDepositCreateResponseTest.kt | 3 + .../api/models/TransferCreateResponseTest.kt | 143 ------------------ .../com/lithic/api/models/TransferTest.kt | 4 +- .../api/services/blocking/CardServiceTest.kt | 2 + .../ExternalBankAccountServiceTest.kt | 3 +- .../services/blocking/TransferServiceTest.kt | 6 +- 40 files changed, 611 insertions(+), 291 deletions(-) delete mode 100644 lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferCreateResponse.kt delete mode 100644 lithic-java-core/src/test/kotlin/com/lithic/api/models/TransferCreateResponseTest.kt diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt index cb6e629f..8ca79a48 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt @@ -21,6 +21,8 @@ class CardProvisionParams constructor( private val cardToken: String, private val certificate: String?, + private val clientDeviceId: String?, + private val clientWalletAccountId: String?, private val digitalWallet: DigitalWallet?, private val nonce: String?, private val nonceSignature: String?, @@ -33,6 +35,10 @@ constructor( fun certificate(): Optional = Optional.ofNullable(certificate) + fun clientDeviceId(): Optional = Optional.ofNullable(clientDeviceId) + + fun clientWalletAccountId(): Optional = Optional.ofNullable(clientWalletAccountId) + fun digitalWallet(): Optional = Optional.ofNullable(digitalWallet) fun nonce(): Optional = Optional.ofNullable(nonce) @@ -43,6 +49,8 @@ constructor( internal fun getBody(): CardProvisionBody { return CardProvisionBody( certificate, + clientDeviceId, + clientWalletAccountId, digitalWallet, nonce, nonceSignature, @@ -66,6 +74,8 @@ constructor( class CardProvisionBody internal constructor( private val certificate: String?, + private val clientDeviceId: String?, + private val clientWalletAccountId: String?, private val digitalWallet: DigitalWallet?, private val nonce: String?, private val nonceSignature: String?, @@ -82,6 +92,19 @@ constructor( */ @JsonProperty("certificate") fun certificate(): String? = certificate + /** + * Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on + * the Visa network. Stable device identification set by the wallet provider. + */ + @JsonProperty("client_device_id") fun clientDeviceId(): String? = clientDeviceId + + /** + * Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on + * the Visa network. Consumer ID that identifies the wallet account holder entity. + */ + @JsonProperty("client_wallet_account_id") + fun clientWalletAccountId(): String? = clientWalletAccountId + /** Name of digital wallet provider. */ @JsonProperty("digital_wallet") fun digitalWallet(): DigitalWallet? = digitalWallet @@ -110,6 +133,8 @@ constructor( return other is CardProvisionBody && this.certificate == other.certificate && + this.clientDeviceId == other.clientDeviceId && + this.clientWalletAccountId == other.clientWalletAccountId && this.digitalWallet == other.digitalWallet && this.nonce == other.nonce && this.nonceSignature == other.nonceSignature && @@ -121,6 +146,8 @@ constructor( hashCode = Objects.hash( certificate, + clientDeviceId, + clientWalletAccountId, digitalWallet, nonce, nonceSignature, @@ -131,7 +158,7 @@ constructor( } override fun toString() = - "CardProvisionBody{certificate=$certificate, digitalWallet=$digitalWallet, nonce=$nonce, nonceSignature=$nonceSignature, additionalProperties=$additionalProperties}" + "CardProvisionBody{certificate=$certificate, clientDeviceId=$clientDeviceId, clientWalletAccountId=$clientWalletAccountId, digitalWallet=$digitalWallet, nonce=$nonce, nonceSignature=$nonceSignature, additionalProperties=$additionalProperties}" companion object { @@ -141,6 +168,8 @@ constructor( class Builder { private var certificate: String? = null + private var clientDeviceId: String? = null + private var clientWalletAccountId: String? = null private var digitalWallet: DigitalWallet? = null private var nonce: String? = null private var nonceSignature: String? = null @@ -149,6 +178,8 @@ constructor( @JvmSynthetic internal fun from(cardProvisionBody: CardProvisionBody) = apply { this.certificate = cardProvisionBody.certificate + this.clientDeviceId = cardProvisionBody.clientDeviceId + this.clientWalletAccountId = cardProvisionBody.clientWalletAccountId this.digitalWallet = cardProvisionBody.digitalWallet this.nonce = cardProvisionBody.nonce this.nonceSignature = cardProvisionBody.nonceSignature @@ -164,6 +195,24 @@ constructor( @JsonProperty("certificate") fun certificate(certificate: String) = apply { this.certificate = certificate } + /** + * Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is + * on the Visa network. Stable device identification set by the wallet provider. + */ + @JsonProperty("client_device_id") + fun clientDeviceId(clientDeviceId: String) = apply { + this.clientDeviceId = clientDeviceId + } + + /** + * Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is + * on the Visa network. Consumer ID that identifies the wallet account holder entity. + */ + @JsonProperty("client_wallet_account_id") + fun clientWalletAccountId(clientWalletAccountId: String) = apply { + this.clientWalletAccountId = clientWalletAccountId + } + /** Name of digital wallet provider. */ @JsonProperty("digital_wallet") fun digitalWallet(digitalWallet: DigitalWallet) = apply { @@ -204,6 +253,8 @@ constructor( fun build(): CardProvisionBody = CardProvisionBody( certificate, + clientDeviceId, + clientWalletAccountId, digitalWallet, nonce, nonceSignature, @@ -226,6 +277,8 @@ constructor( return other is CardProvisionParams && this.cardToken == other.cardToken && this.certificate == other.certificate && + this.clientDeviceId == other.clientDeviceId && + this.clientWalletAccountId == other.clientWalletAccountId && this.digitalWallet == other.digitalWallet && this.nonce == other.nonce && this.nonceSignature == other.nonceSignature && @@ -238,6 +291,8 @@ constructor( return Objects.hash( cardToken, certificate, + clientDeviceId, + clientWalletAccountId, digitalWallet, nonce, nonceSignature, @@ -248,7 +303,7 @@ constructor( } override fun toString() = - "CardProvisionParams{cardToken=$cardToken, certificate=$certificate, digitalWallet=$digitalWallet, nonce=$nonce, nonceSignature=$nonceSignature, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "CardProvisionParams{cardToken=$cardToken, certificate=$certificate, clientDeviceId=$clientDeviceId, clientWalletAccountId=$clientWalletAccountId, digitalWallet=$digitalWallet, nonce=$nonce, nonceSignature=$nonceSignature, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" fun toBuilder() = Builder().from(this) @@ -262,6 +317,8 @@ constructor( private var cardToken: String? = null private var certificate: String? = null + private var clientDeviceId: String? = null + private var clientWalletAccountId: String? = null private var digitalWallet: DigitalWallet? = null private var nonce: String? = null private var nonceSignature: String? = null @@ -273,6 +330,8 @@ constructor( internal fun from(cardProvisionParams: CardProvisionParams) = apply { this.cardToken = cardProvisionParams.cardToken this.certificate = cardProvisionParams.certificate + this.clientDeviceId = cardProvisionParams.clientDeviceId + this.clientWalletAccountId = cardProvisionParams.clientWalletAccountId this.digitalWallet = cardProvisionParams.digitalWallet this.nonce = cardProvisionParams.nonce this.nonceSignature = cardProvisionParams.nonceSignature @@ -291,6 +350,20 @@ constructor( */ fun certificate(certificate: String) = apply { this.certificate = certificate } + /** + * Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on + * the Visa network. Stable device identification set by the wallet provider. + */ + fun clientDeviceId(clientDeviceId: String) = apply { this.clientDeviceId = clientDeviceId } + + /** + * Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on + * the Visa network. Consumer ID that identifies the wallet account holder entity. + */ + fun clientWalletAccountId(clientWalletAccountId: String) = apply { + this.clientWalletAccountId = clientWalletAccountId + } + /** Name of digital wallet provider. */ fun digitalWallet(digitalWallet: DigitalWallet) = apply { this.digitalWallet = digitalWallet @@ -366,6 +439,8 @@ constructor( CardProvisionParams( checkNotNull(cardToken) { "`cardToken` is required but was not set" }, certificate, + clientDeviceId, + clientWalletAccountId, digitalWallet, nonce, nonceSignature, 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 326e433e..6d3dfa01 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 @@ -337,12 +337,25 @@ private constructor( val DISPUTE_EVIDENCE_UPLOAD_FAILED = EventType(JsonField.of("dispute_evidence.upload_failed")) + @JvmField + val EXTERNAL_BANK_ACCOUNT_CREATED = + EventType(JsonField.of("external_bank_account.created")) + + @JvmField + val EXTERNAL_BANK_ACCOUNT_UPDATED = + EventType(JsonField.of("external_bank_account.updated")) + + @JvmField + val FINANCIAL_ACCOUNT_CREATED = EventType(JsonField.of("financial_account.created")) + @JvmField val PAYMENT_TRANSACTION_CREATED = EventType(JsonField.of("payment_transaction.created")) @JvmField val PAYMENT_TRANSACTION_UPDATED = EventType(JsonField.of("payment_transaction.updated")) + @JvmField val STATEMENTS_CREATED = EventType(JsonField.of("statements.created")) + @JvmField val THREE_DS_AUTHENTICATION_CREATED = EventType(JsonField.of("three_ds_authentication.created")) @@ -368,8 +381,12 @@ private constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, } @@ -388,8 +405,12 @@ private constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, _UNKNOWN, @@ -412,8 +433,12 @@ private constructor( Value.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Value.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Value.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Value.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Value.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Value.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Value.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED else -> Value._UNKNOWN @@ -436,8 +461,12 @@ private constructor( Known.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Known.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Known.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Known.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Known.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Known.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Known.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED else -> throw LithicInvalidDataException("Unknown EventType: $value") 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 a43359fe..39db8afb 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 @@ -280,12 +280,25 @@ constructor( val DISPUTE_EVIDENCE_UPLOAD_FAILED = EventType(JsonField.of("dispute_evidence.upload_failed")) + @JvmField + val EXTERNAL_BANK_ACCOUNT_CREATED = + EventType(JsonField.of("external_bank_account.created")) + + @JvmField + val EXTERNAL_BANK_ACCOUNT_UPDATED = + EventType(JsonField.of("external_bank_account.updated")) + + @JvmField + val FINANCIAL_ACCOUNT_CREATED = EventType(JsonField.of("financial_account.created")) + @JvmField val PAYMENT_TRANSACTION_CREATED = EventType(JsonField.of("payment_transaction.created")) @JvmField val PAYMENT_TRANSACTION_UPDATED = EventType(JsonField.of("payment_transaction.updated")) + @JvmField val STATEMENTS_CREATED = EventType(JsonField.of("statements.created")) + @JvmField val THREE_DS_AUTHENTICATION_CREATED = EventType(JsonField.of("three_ds_authentication.created")) @@ -311,8 +324,12 @@ constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, } @@ -331,8 +348,12 @@ constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, _UNKNOWN, @@ -355,8 +376,12 @@ constructor( Value.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Value.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Value.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Value.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Value.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Value.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Value.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED else -> Value._UNKNOWN @@ -379,8 +404,12 @@ constructor( Known.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Known.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Known.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Known.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Known.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Known.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Known.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED else -> throw LithicInvalidDataException("Unknown EventType: $value") 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 a480154b..d431e5ac 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 @@ -257,12 +257,25 @@ private constructor( val DISPUTE_EVIDENCE_UPLOAD_FAILED = EventType(JsonField.of("dispute_evidence.upload_failed")) + @JvmField + val EXTERNAL_BANK_ACCOUNT_CREATED = + EventType(JsonField.of("external_bank_account.created")) + + @JvmField + val EXTERNAL_BANK_ACCOUNT_UPDATED = + EventType(JsonField.of("external_bank_account.updated")) + + @JvmField + val FINANCIAL_ACCOUNT_CREATED = EventType(JsonField.of("financial_account.created")) + @JvmField val PAYMENT_TRANSACTION_CREATED = EventType(JsonField.of("payment_transaction.created")) @JvmField val PAYMENT_TRANSACTION_UPDATED = EventType(JsonField.of("payment_transaction.updated")) + @JvmField val STATEMENTS_CREATED = EventType(JsonField.of("statements.created")) + @JvmField val THREE_DS_AUTHENTICATION_CREATED = EventType(JsonField.of("three_ds_authentication.created")) @@ -288,8 +301,12 @@ private constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, } @@ -308,8 +325,12 @@ private constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, _UNKNOWN, @@ -332,8 +353,12 @@ private constructor( Value.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Value.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Value.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Value.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Value.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Value.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Value.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED else -> Value._UNKNOWN @@ -356,8 +381,12 @@ private constructor( Known.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Known.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Known.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Known.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Known.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Known.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Known.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED else -> throw LithicInvalidDataException("Unknown EventType: $value") 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 1a8ca4d9..f8092edb 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 @@ -395,12 +395,25 @@ constructor( val DISPUTE_EVIDENCE_UPLOAD_FAILED = EventType(JsonField.of("dispute_evidence.upload_failed")) + @JvmField + val EXTERNAL_BANK_ACCOUNT_CREATED = + EventType(JsonField.of("external_bank_account.created")) + + @JvmField + val EXTERNAL_BANK_ACCOUNT_UPDATED = + EventType(JsonField.of("external_bank_account.updated")) + + @JvmField + val FINANCIAL_ACCOUNT_CREATED = EventType(JsonField.of("financial_account.created")) + @JvmField val PAYMENT_TRANSACTION_CREATED = EventType(JsonField.of("payment_transaction.created")) @JvmField val PAYMENT_TRANSACTION_UPDATED = EventType(JsonField.of("payment_transaction.updated")) + @JvmField val STATEMENTS_CREATED = EventType(JsonField.of("statements.created")) + @JvmField val THREE_DS_AUTHENTICATION_CREATED = EventType(JsonField.of("three_ds_authentication.created")) @@ -426,8 +439,12 @@ constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, } @@ -446,8 +463,12 @@ constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, _UNKNOWN, @@ -470,8 +491,12 @@ constructor( Value.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Value.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Value.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Value.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Value.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Value.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Value.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED else -> Value._UNKNOWN @@ -494,8 +519,12 @@ constructor( Known.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Known.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Known.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Known.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Known.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Known.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Known.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED else -> throw LithicInvalidDataException("Unknown EventType: $value") 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 93bc4957..e8687edb 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 @@ -324,12 +324,25 @@ constructor( val DISPUTE_EVIDENCE_UPLOAD_FAILED = EventType(JsonField.of("dispute_evidence.upload_failed")) + @JvmField + val EXTERNAL_BANK_ACCOUNT_CREATED = + EventType(JsonField.of("external_bank_account.created")) + + @JvmField + val EXTERNAL_BANK_ACCOUNT_UPDATED = + EventType(JsonField.of("external_bank_account.updated")) + + @JvmField + val FINANCIAL_ACCOUNT_CREATED = EventType(JsonField.of("financial_account.created")) + @JvmField val PAYMENT_TRANSACTION_CREATED = EventType(JsonField.of("payment_transaction.created")) @JvmField val PAYMENT_TRANSACTION_UPDATED = EventType(JsonField.of("payment_transaction.updated")) + @JvmField val STATEMENTS_CREATED = EventType(JsonField.of("statements.created")) + @JvmField val THREE_DS_AUTHENTICATION_CREATED = EventType(JsonField.of("three_ds_authentication.created")) @@ -355,8 +368,12 @@ constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, } @@ -375,8 +392,12 @@ constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, _UNKNOWN, @@ -399,8 +420,12 @@ constructor( Value.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Value.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Value.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Value.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Value.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Value.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Value.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED else -> Value._UNKNOWN @@ -423,8 +448,12 @@ constructor( Known.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Known.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Known.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Known.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Known.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Known.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Known.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED else -> throw LithicInvalidDataException("Unknown EventType: $value") 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 87a43715..49afa615 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 @@ -416,12 +416,25 @@ constructor( val DISPUTE_EVIDENCE_UPLOAD_FAILED = EventType(JsonField.of("dispute_evidence.upload_failed")) + @JvmField + val EXTERNAL_BANK_ACCOUNT_CREATED = + EventType(JsonField.of("external_bank_account.created")) + + @JvmField + val EXTERNAL_BANK_ACCOUNT_UPDATED = + EventType(JsonField.of("external_bank_account.updated")) + + @JvmField + val FINANCIAL_ACCOUNT_CREATED = EventType(JsonField.of("financial_account.created")) + @JvmField val PAYMENT_TRANSACTION_CREATED = EventType(JsonField.of("payment_transaction.created")) @JvmField val PAYMENT_TRANSACTION_UPDATED = EventType(JsonField.of("payment_transaction.updated")) + @JvmField val STATEMENTS_CREATED = EventType(JsonField.of("statements.created")) + @JvmField val THREE_DS_AUTHENTICATION_CREATED = EventType(JsonField.of("three_ds_authentication.created")) @@ -447,8 +460,12 @@ constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, } @@ -467,8 +484,12 @@ constructor( DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, DISPUTE_UPDATED, DISPUTE_EVIDENCE_UPLOAD_FAILED, + EXTERNAL_BANK_ACCOUNT_CREATED, + EXTERNAL_BANK_ACCOUNT_UPDATED, + FINANCIAL_ACCOUNT_CREATED, PAYMENT_TRANSACTION_CREATED, PAYMENT_TRANSACTION_UPDATED, + STATEMENTS_CREATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, _UNKNOWN, @@ -491,8 +512,12 @@ constructor( Value.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Value.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Value.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Value.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Value.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Value.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Value.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Value.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Value.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED else -> Value._UNKNOWN @@ -515,8 +540,12 @@ constructor( Known.DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE DISPUTE_UPDATED -> Known.DISPUTE_UPDATED DISPUTE_EVIDENCE_UPLOAD_FAILED -> Known.DISPUTE_EVIDENCE_UPLOAD_FAILED + EXTERNAL_BANK_ACCOUNT_CREATED -> Known.EXTERNAL_BANK_ACCOUNT_CREATED + EXTERNAL_BANK_ACCOUNT_UPDATED -> Known.EXTERNAL_BANK_ACCOUNT_UPDATED + FINANCIAL_ACCOUNT_CREATED -> Known.FINANCIAL_ACCOUNT_CREATED PAYMENT_TRANSACTION_CREATED -> Known.PAYMENT_TRANSACTION_CREATED PAYMENT_TRANSACTION_UPDATED -> Known.PAYMENT_TRANSACTION_UPDATED + STATEMENTS_CREATED -> Known.STATEMENTS_CREATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED else -> throw LithicInvalidDataException("Unknown EventType: $value") diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt index 41a4bf9f..0b95fb65 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt @@ -338,6 +338,7 @@ constructor( private val currency: String?, private val dob: LocalDate?, private val doingBusinessAs: String?, + private val financialAccountToken: String?, private val name: String?, private val owner: String?, private val ownerType: OwnerType?, @@ -372,6 +373,10 @@ constructor( @JsonProperty("doing_business_as") fun doingBusinessAs(): String? = doingBusinessAs + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + fun financialAccountToken(): String? = financialAccountToken + @JsonProperty("name") fun name(): String? = name @JsonProperty("owner") fun owner(): String? = owner @@ -416,6 +421,7 @@ constructor( this.currency == other.currency && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && + this.financialAccountToken == other.financialAccountToken && this.name == other.name && this.owner == other.owner && this.ownerType == other.ownerType && @@ -439,6 +445,7 @@ constructor( currency, dob, doingBusinessAs, + financialAccountToken, name, owner, ownerType, @@ -454,7 +461,7 @@ constructor( } override fun toString() = - "BankVerifiedCreateBankAccountApiRequest{accountNumber=$accountNumber, accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, type=$type, userDefinedId=$userDefinedId, verificationEnforcement=$verificationEnforcement, verificationMethod=$verificationMethod, additionalProperties=$additionalProperties}" + "BankVerifiedCreateBankAccountApiRequest{accountNumber=$accountNumber, accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, financialAccountToken=$financialAccountToken, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, type=$type, userDefinedId=$userDefinedId, verificationEnforcement=$verificationEnforcement, verificationMethod=$verificationMethod, additionalProperties=$additionalProperties}" companion object { @@ -471,6 +478,7 @@ constructor( private var currency: String? = null private var dob: LocalDate? = null private var doingBusinessAs: String? = null + private var financialAccountToken: String? = null private var name: String? = null private var owner: String? = null private var ownerType: OwnerType? = null @@ -493,6 +501,8 @@ constructor( this.currency = bankVerifiedCreateBankAccountApiRequest.currency this.dob = bankVerifiedCreateBankAccountApiRequest.dob this.doingBusinessAs = bankVerifiedCreateBankAccountApiRequest.doingBusinessAs + this.financialAccountToken = + bankVerifiedCreateBankAccountApiRequest.financialAccountToken this.name = bankVerifiedCreateBankAccountApiRequest.name this.owner = bankVerifiedCreateBankAccountApiRequest.owner this.ownerType = bankVerifiedCreateBankAccountApiRequest.ownerType @@ -534,6 +544,12 @@ constructor( this.doingBusinessAs = doingBusinessAs } + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + fun financialAccountToken(financialAccountToken: String) = apply { + this.financialAccountToken = financialAccountToken + } + @JsonProperty("name") fun name(name: String) = apply { this.name = name } @JsonProperty("owner") fun owner(owner: String) = apply { this.owner = owner } @@ -589,6 +605,7 @@ constructor( checkNotNull(currency) { "`currency` is required but was not set" }, dob, doingBusinessAs, + financialAccountToken, name, checkNotNull(owner) { "`owner` is required but was not set" }, checkNotNull(ownerType) { "`ownerType` is required but was not set" }, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt index e4a10d92..d6f5a1af 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt @@ -33,6 +33,7 @@ private constructor( private val doingBusinessAs: JsonField, private val lastFour: JsonField, private val name: JsonField, + private val financialAccountToken: JsonField, private val owner: JsonField, private val ownerType: JsonField, private val routingNumber: JsonField, @@ -92,6 +93,10 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -170,6 +175,11 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -229,6 +239,7 @@ private constructor( doingBusinessAs() lastFour() name() + financialAccountToken() owner() ownerType() routingNumber() @@ -262,6 +273,7 @@ private constructor( this.doingBusinessAs == other.doingBusinessAs && this.lastFour == other.lastFour && this.name == other.name && + this.financialAccountToken == other.financialAccountToken && this.owner == other.owner && this.ownerType == other.ownerType && this.routingNumber == other.routingNumber && @@ -290,6 +302,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, @@ -308,7 +321,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountCreateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountCreateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -327,6 +340,7 @@ private constructor( private var doingBusinessAs: JsonField = JsonMissing.of() private var lastFour: JsonField = JsonMissing.of() private var name: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() private var owner: JsonField = JsonMissing.of() private var ownerType: JsonField = JsonMissing.of() private var routingNumber: JsonField = JsonMissing.of() @@ -353,6 +367,7 @@ private constructor( this.doingBusinessAs = externalBankAccountCreateResponse.doingBusinessAs this.lastFour = externalBankAccountCreateResponse.lastFour this.name = externalBankAccountCreateResponse.name + this.financialAccountToken = externalBankAccountCreateResponse.financialAccountToken this.owner = externalBankAccountCreateResponse.owner this.ownerType = externalBankAccountCreateResponse.ownerType this.routingNumber = externalBankAccountCreateResponse.routingNumber @@ -479,6 +494,17 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + /** * Legal Name of the business or individual who owns the external account. This will appear * in statements @@ -617,6 +643,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt index af099f3d..9919dc7f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt @@ -33,6 +33,7 @@ private constructor( private val doingBusinessAs: JsonField, private val lastFour: JsonField, private val name: JsonField, + private val financialAccountToken: JsonField, private val owner: JsonField, private val ownerType: JsonField, private val routingNumber: JsonField, @@ -92,6 +93,10 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -170,6 +175,11 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -229,6 +239,7 @@ private constructor( doingBusinessAs() lastFour() name() + financialAccountToken() owner() ownerType() routingNumber() @@ -262,6 +273,7 @@ private constructor( this.doingBusinessAs == other.doingBusinessAs && this.lastFour == other.lastFour && this.name == other.name && + this.financialAccountToken == other.financialAccountToken && this.owner == other.owner && this.ownerType == other.ownerType && this.routingNumber == other.routingNumber && @@ -290,6 +302,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, @@ -308,7 +321,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountListResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountListResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -327,6 +340,7 @@ private constructor( private var doingBusinessAs: JsonField = JsonMissing.of() private var lastFour: JsonField = JsonMissing.of() private var name: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() private var owner: JsonField = JsonMissing.of() private var ownerType: JsonField = JsonMissing.of() private var routingNumber: JsonField = JsonMissing.of() @@ -353,6 +367,7 @@ private constructor( this.doingBusinessAs = externalBankAccountListResponse.doingBusinessAs this.lastFour = externalBankAccountListResponse.lastFour this.name = externalBankAccountListResponse.name + this.financialAccountToken = externalBankAccountListResponse.financialAccountToken this.owner = externalBankAccountListResponse.owner this.ownerType = externalBankAccountListResponse.ownerType this.routingNumber = externalBankAccountListResponse.routingNumber @@ -479,6 +494,17 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + /** * Legal Name of the business or individual who owns the external account. This will appear * in statements @@ -617,6 +643,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt index 884a0f2a..432d2472 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt @@ -33,6 +33,7 @@ private constructor( private val doingBusinessAs: JsonField, private val lastFour: JsonField, private val name: JsonField, + private val financialAccountToken: JsonField, private val owner: JsonField, private val ownerType: JsonField, private val routingNumber: JsonField, @@ -92,6 +93,10 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -170,6 +175,11 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -229,6 +239,7 @@ private constructor( doingBusinessAs() lastFour() name() + financialAccountToken() owner() ownerType() routingNumber() @@ -262,6 +273,7 @@ private constructor( this.doingBusinessAs == other.doingBusinessAs && this.lastFour == other.lastFour && this.name == other.name && + this.financialAccountToken == other.financialAccountToken && this.owner == other.owner && this.ownerType == other.ownerType && this.routingNumber == other.routingNumber && @@ -290,6 +302,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, @@ -308,7 +321,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountRetrieveResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountRetrieveResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -327,6 +340,7 @@ private constructor( private var doingBusinessAs: JsonField = JsonMissing.of() private var lastFour: JsonField = JsonMissing.of() private var name: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() private var owner: JsonField = JsonMissing.of() private var ownerType: JsonField = JsonMissing.of() private var routingNumber: JsonField = JsonMissing.of() @@ -354,6 +368,7 @@ private constructor( this.doingBusinessAs = externalBankAccountRetrieveResponse.doingBusinessAs this.lastFour = externalBankAccountRetrieveResponse.lastFour this.name = externalBankAccountRetrieveResponse.name + this.financialAccountToken = externalBankAccountRetrieveResponse.financialAccountToken this.owner = externalBankAccountRetrieveResponse.owner this.ownerType = externalBankAccountRetrieveResponse.ownerType this.routingNumber = externalBankAccountRetrieveResponse.routingNumber @@ -480,6 +495,17 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + /** * Legal Name of the business or individual who owns the external account. This will appear * in statements @@ -618,6 +644,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt index ecf60253..2e90c78c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt @@ -33,6 +33,7 @@ private constructor( private val doingBusinessAs: JsonField, private val lastFour: JsonField, private val name: JsonField, + private val financialAccountToken: JsonField, private val owner: JsonField, private val ownerType: JsonField, private val routingNumber: JsonField, @@ -92,6 +93,10 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -170,6 +175,11 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -229,6 +239,7 @@ private constructor( doingBusinessAs() lastFour() name() + financialAccountToken() owner() ownerType() routingNumber() @@ -262,6 +273,7 @@ private constructor( this.doingBusinessAs == other.doingBusinessAs && this.lastFour == other.lastFour && this.name == other.name && + this.financialAccountToken == other.financialAccountToken && this.owner == other.owner && this.ownerType == other.ownerType && this.routingNumber == other.routingNumber && @@ -290,6 +302,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, @@ -308,7 +321,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountRetryMicroDepositsResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountRetryMicroDepositsResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -327,6 +340,7 @@ private constructor( private var doingBusinessAs: JsonField = JsonMissing.of() private var lastFour: JsonField = JsonMissing.of() private var name: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() private var owner: JsonField = JsonMissing.of() private var ownerType: JsonField = JsonMissing.of() private var routingNumber: JsonField = JsonMissing.of() @@ -355,6 +369,8 @@ private constructor( this.doingBusinessAs = externalBankAccountRetryMicroDepositsResponse.doingBusinessAs this.lastFour = externalBankAccountRetryMicroDepositsResponse.lastFour this.name = externalBankAccountRetryMicroDepositsResponse.name + this.financialAccountToken = + externalBankAccountRetryMicroDepositsResponse.financialAccountToken this.owner = externalBankAccountRetryMicroDepositsResponse.owner this.ownerType = externalBankAccountRetryMicroDepositsResponse.ownerType this.routingNumber = externalBankAccountRetryMicroDepositsResponse.routingNumber @@ -483,6 +499,17 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + /** * Legal Name of the business or individual who owns the external account. This will appear * in statements @@ -621,6 +648,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt index 5150d292..accbc4e2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt @@ -33,6 +33,7 @@ private constructor( private val doingBusinessAs: JsonField, private val lastFour: JsonField, private val name: JsonField, + private val financialAccountToken: JsonField, private val owner: JsonField, private val ownerType: JsonField, private val routingNumber: JsonField, @@ -92,6 +93,10 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -170,6 +175,11 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -229,6 +239,7 @@ private constructor( doingBusinessAs() lastFour() name() + financialAccountToken() owner() ownerType() routingNumber() @@ -262,6 +273,7 @@ private constructor( this.doingBusinessAs == other.doingBusinessAs && this.lastFour == other.lastFour && this.name == other.name && + this.financialAccountToken == other.financialAccountToken && this.owner == other.owner && this.ownerType == other.ownerType && this.routingNumber == other.routingNumber && @@ -290,6 +302,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, @@ -308,7 +321,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountUpdateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountUpdateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -327,6 +340,7 @@ private constructor( private var doingBusinessAs: JsonField = JsonMissing.of() private var lastFour: JsonField = JsonMissing.of() private var name: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() private var owner: JsonField = JsonMissing.of() private var ownerType: JsonField = JsonMissing.of() private var routingNumber: JsonField = JsonMissing.of() @@ -353,6 +367,7 @@ private constructor( this.doingBusinessAs = externalBankAccountUpdateResponse.doingBusinessAs this.lastFour = externalBankAccountUpdateResponse.lastFour this.name = externalBankAccountUpdateResponse.name + this.financialAccountToken = externalBankAccountUpdateResponse.financialAccountToken this.owner = externalBankAccountUpdateResponse.owner this.ownerType = externalBankAccountUpdateResponse.ownerType this.routingNumber = externalBankAccountUpdateResponse.routingNumber @@ -479,6 +494,17 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + /** * Legal Name of the business or individual who owns the external account. This will appear * in statements @@ -617,6 +643,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt index 46763b7f..158c769e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt @@ -24,6 +24,7 @@ import java.util.Optional class FinancialAccount private constructor( private val accountNumber: JsonField, + private val accountToken: JsonField, private val created: JsonField, private val nickname: JsonField, private val routingNumber: JsonField, @@ -41,6 +42,10 @@ private constructor( fun accountNumber(): Optional = Optional.ofNullable(accountNumber.getNullable("account_number")) + /** Account token of the financial account if applicable. */ + fun accountToken(): Optional = + Optional.ofNullable(accountToken.getNullable("account_token")) + /** Date and time for when the financial account was first created. */ fun created(): OffsetDateTime = created.getRequired("created") @@ -63,6 +68,9 @@ private constructor( /** Account number for your Lithic-assigned bank account number, if applicable. */ @JsonProperty("account_number") @ExcludeMissing fun _accountNumber() = accountNumber + /** Account token of the financial account if applicable. */ + @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken + /** Date and time for when the financial account was first created. */ @JsonProperty("created") @ExcludeMissing fun _created() = created @@ -88,6 +96,7 @@ private constructor( fun validate(): FinancialAccount = apply { if (!validated) { accountNumber() + accountToken() created() nickname() routingNumber() @@ -107,6 +116,7 @@ private constructor( return other is FinancialAccount && this.accountNumber == other.accountNumber && + this.accountToken == other.accountToken && this.created == other.created && this.nickname == other.nickname && this.routingNumber == other.routingNumber && @@ -121,6 +131,7 @@ private constructor( hashCode = Objects.hash( accountNumber, + accountToken, created, nickname, routingNumber, @@ -134,7 +145,7 @@ private constructor( } override fun toString() = - "FinancialAccount{accountNumber=$accountNumber, created=$created, nickname=$nickname, routingNumber=$routingNumber, token=$token, type=$type, updated=$updated, additionalProperties=$additionalProperties}" + "FinancialAccount{accountNumber=$accountNumber, accountToken=$accountToken, created=$created, nickname=$nickname, routingNumber=$routingNumber, token=$token, type=$type, updated=$updated, additionalProperties=$additionalProperties}" companion object { @@ -144,6 +155,7 @@ private constructor( class Builder { private var accountNumber: JsonField = JsonMissing.of() + private var accountToken: JsonField = JsonMissing.of() private var created: JsonField = JsonMissing.of() private var nickname: JsonField = JsonMissing.of() private var routingNumber: JsonField = JsonMissing.of() @@ -155,6 +167,7 @@ private constructor( @JvmSynthetic internal fun from(financialAccount: FinancialAccount) = apply { this.accountNumber = financialAccount.accountNumber + this.accountToken = financialAccount.accountToken this.created = financialAccount.created this.nickname = financialAccount.nickname this.routingNumber = financialAccount.routingNumber @@ -174,6 +187,16 @@ private constructor( this.accountNumber = accountNumber } + /** Account token of the financial account if applicable. */ + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) + + /** Account token of the financial account if applicable. */ + @JsonProperty("account_token") + @ExcludeMissing + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } + /** Date and time for when the financial account was first created. */ fun created(created: OffsetDateTime) = created(JsonField.of(created)) @@ -241,6 +264,7 @@ private constructor( fun build(): FinancialAccount = FinancialAccount( accountNumber, + accountToken, created, nickname, routingNumber, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt index 27ff0d15..b5d9e2e6 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt @@ -921,14 +921,25 @@ private constructor( companion object { + @JvmField + val ACH_EXCEEDED_THRESHOLD = + FinancialEventType(JsonField.of("ACH_EXCEEDED_THRESHOLD")) + @JvmField val ACH_INSUFFICIENT_FUNDS = FinancialEventType(JsonField.of("ACH_INSUFFICIENT_FUNDS")) + @JvmField + val ACH_INVALID_ACCOUNT = FinancialEventType(JsonField.of("ACH_INVALID_ACCOUNT")) + @JvmField val ACH_ORIGINATION_PENDING = FinancialEventType(JsonField.of("ACH_ORIGINATION_PENDING")) + @JvmField + val ACH_ORIGINATION_PROCESSED = + FinancialEventType(JsonField.of("ACH_ORIGINATION_PROCESSED")) + @JvmField val ACH_ORIGINATION_RELEASED = FinancialEventType(JsonField.of("ACH_ORIGINATION_RELEASED")) @@ -941,6 +952,9 @@ private constructor( @JvmField val ACH_RETURN = FinancialEventType(JsonField.of("ACH_RETURN")) + @JvmField + val ACH_RETURN_PENDING = FinancialEventType(JsonField.of("ACH_RETURN_PENDING")) + @JvmField val AUTHORIZATION = FinancialEventType(JsonField.of("AUTHORIZATION")) @JvmField @@ -992,12 +1006,16 @@ private constructor( } enum class Known { + ACH_EXCEEDED_THRESHOLD, ACH_INSUFFICIENT_FUNDS, + ACH_INVALID_ACCOUNT, ACH_ORIGINATION_PENDING, + ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, ACH_RECEIPT_PENDING, ACH_RECEIPT_RELEASED, ACH_RETURN, + ACH_RETURN_PENDING, AUTHORIZATION, AUTHORIZATION_ADVICE, AUTHORIZATION_EXPIRY, @@ -1017,12 +1035,16 @@ private constructor( } enum class Value { + ACH_EXCEEDED_THRESHOLD, ACH_INSUFFICIENT_FUNDS, + ACH_INVALID_ACCOUNT, ACH_ORIGINATION_PENDING, + ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, ACH_RECEIPT_PENDING, ACH_RECEIPT_RELEASED, ACH_RETURN, + ACH_RETURN_PENDING, AUTHORIZATION, AUTHORIZATION_ADVICE, AUTHORIZATION_EXPIRY, @@ -1044,12 +1066,16 @@ private constructor( fun value(): Value = when (this) { + ACH_EXCEEDED_THRESHOLD -> Value.ACH_EXCEEDED_THRESHOLD ACH_INSUFFICIENT_FUNDS -> Value.ACH_INSUFFICIENT_FUNDS + ACH_INVALID_ACCOUNT -> Value.ACH_INVALID_ACCOUNT ACH_ORIGINATION_PENDING -> Value.ACH_ORIGINATION_PENDING + ACH_ORIGINATION_PROCESSED -> Value.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Value.ACH_ORIGINATION_RELEASED ACH_RECEIPT_PENDING -> Value.ACH_RECEIPT_PENDING ACH_RECEIPT_RELEASED -> Value.ACH_RECEIPT_RELEASED ACH_RETURN -> Value.ACH_RETURN + ACH_RETURN_PENDING -> Value.ACH_RETURN_PENDING AUTHORIZATION -> Value.AUTHORIZATION AUTHORIZATION_ADVICE -> Value.AUTHORIZATION_ADVICE AUTHORIZATION_EXPIRY -> Value.AUTHORIZATION_EXPIRY @@ -1071,12 +1097,16 @@ private constructor( fun known(): Known = when (this) { + ACH_EXCEEDED_THRESHOLD -> Known.ACH_EXCEEDED_THRESHOLD ACH_INSUFFICIENT_FUNDS -> Known.ACH_INSUFFICIENT_FUNDS + ACH_INVALID_ACCOUNT -> Known.ACH_INVALID_ACCOUNT ACH_ORIGINATION_PENDING -> Known.ACH_ORIGINATION_PENDING + ACH_ORIGINATION_PROCESSED -> Known.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Known.ACH_ORIGINATION_RELEASED ACH_RECEIPT_PENDING -> Known.ACH_RECEIPT_PENDING ACH_RECEIPT_RELEASED -> Known.ACH_RECEIPT_RELEASED ACH_RETURN -> Known.ACH_RETURN + ACH_RETURN_PENDING -> Known.ACH_RETURN_PENDING AUTHORIZATION -> Known.AUTHORIZATION AUTHORIZATION_ADVICE -> Known.AUTHORIZATION_ADVICE AUTHORIZATION_EXPIRY -> Known.AUTHORIZATION_EXPIRY diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/LineItemListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/LineItemListResponse.kt index f7e68454..8a61b6b2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/LineItemListResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/LineItemListResponse.kt @@ -544,13 +544,23 @@ private constructor( companion object { + @JvmField + val ACH_EXCEEDED_THRESHOLD = FinancialEventType(JsonField.of("ACH_EXCEEDED_THRESHOLD")) + @JvmField val ACH_INSUFFICIENT_FUNDS = FinancialEventType(JsonField.of("ACH_INSUFFICIENT_FUNDS")) + @JvmField + val ACH_INVALID_ACCOUNT = FinancialEventType(JsonField.of("ACH_INVALID_ACCOUNT")) + @JvmField val ACH_ORIGINATION_PENDING = FinancialEventType(JsonField.of("ACH_ORIGINATION_PENDING")) + @JvmField + val ACH_ORIGINATION_PROCESSED = + FinancialEventType(JsonField.of("ACH_ORIGINATION_PROCESSED")) + @JvmField val ACH_ORIGINATION_RELEASED = FinancialEventType(JsonField.of("ACH_ORIGINATION_RELEASED")) @@ -563,6 +573,9 @@ private constructor( @JvmField val ACH_RETURN = FinancialEventType(JsonField.of("ACH_RETURN")) + @JvmField + val ACH_RETURN_PENDING = FinancialEventType(JsonField.of("ACH_RETURN_PENDING")) + @JvmField val AUTHORIZATION = FinancialEventType(JsonField.of("AUTHORIZATION")) @JvmField @@ -611,12 +624,16 @@ private constructor( } enum class Known { + ACH_EXCEEDED_THRESHOLD, ACH_INSUFFICIENT_FUNDS, + ACH_INVALID_ACCOUNT, ACH_ORIGINATION_PENDING, + ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, ACH_RECEIPT_PENDING, ACH_RECEIPT_RELEASED, ACH_RETURN, + ACH_RETURN_PENDING, AUTHORIZATION, AUTHORIZATION_ADVICE, AUTHORIZATION_EXPIRY, @@ -636,12 +653,16 @@ private constructor( } enum class Value { + ACH_EXCEEDED_THRESHOLD, ACH_INSUFFICIENT_FUNDS, + ACH_INVALID_ACCOUNT, ACH_ORIGINATION_PENDING, + ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, ACH_RECEIPT_PENDING, ACH_RECEIPT_RELEASED, ACH_RETURN, + ACH_RETURN_PENDING, AUTHORIZATION, AUTHORIZATION_ADVICE, AUTHORIZATION_EXPIRY, @@ -663,12 +684,16 @@ private constructor( fun value(): Value = when (this) { + ACH_EXCEEDED_THRESHOLD -> Value.ACH_EXCEEDED_THRESHOLD ACH_INSUFFICIENT_FUNDS -> Value.ACH_INSUFFICIENT_FUNDS + ACH_INVALID_ACCOUNT -> Value.ACH_INVALID_ACCOUNT ACH_ORIGINATION_PENDING -> Value.ACH_ORIGINATION_PENDING + ACH_ORIGINATION_PROCESSED -> Value.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Value.ACH_ORIGINATION_RELEASED ACH_RECEIPT_PENDING -> Value.ACH_RECEIPT_PENDING ACH_RECEIPT_RELEASED -> Value.ACH_RECEIPT_RELEASED ACH_RETURN -> Value.ACH_RETURN + ACH_RETURN_PENDING -> Value.ACH_RETURN_PENDING AUTHORIZATION -> Value.AUTHORIZATION AUTHORIZATION_ADVICE -> Value.AUTHORIZATION_ADVICE AUTHORIZATION_EXPIRY -> Value.AUTHORIZATION_EXPIRY @@ -690,12 +715,16 @@ private constructor( fun known(): Known = when (this) { + ACH_EXCEEDED_THRESHOLD -> Known.ACH_EXCEEDED_THRESHOLD ACH_INSUFFICIENT_FUNDS -> Known.ACH_INSUFFICIENT_FUNDS + ACH_INVALID_ACCOUNT -> Known.ACH_INVALID_ACCOUNT ACH_ORIGINATION_PENDING -> Known.ACH_ORIGINATION_PENDING + ACH_ORIGINATION_PROCESSED -> Known.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Known.ACH_ORIGINATION_RELEASED ACH_RECEIPT_PENDING -> Known.ACH_RECEIPT_PENDING ACH_RECEIPT_RELEASED -> Known.ACH_RECEIPT_RELEASED ACH_RETURN -> Known.ACH_RETURN + ACH_RETURN_PENDING -> Known.ACH_RETURN_PENDING AUTHORIZATION -> Known.AUTHORIZATION AUTHORIZATION_ADVICE -> Known.AUTHORIZATION_ADVICE AUTHORIZATION_EXPIRY -> Known.AUTHORIZATION_EXPIRY diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt index d9f8b982..c19731e2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt @@ -33,6 +33,7 @@ private constructor( private val doingBusinessAs: JsonField, private val lastFour: JsonField, private val name: JsonField, + private val financialAccountToken: JsonField, private val owner: JsonField, private val ownerType: JsonField, private val routingNumber: JsonField, @@ -92,6 +93,10 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -170,6 +175,11 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + /** * Legal Name of the business or individual who owns the external account. This will appear in * statements @@ -229,6 +239,7 @@ private constructor( doingBusinessAs() lastFour() name() + financialAccountToken() owner() ownerType() routingNumber() @@ -262,6 +273,7 @@ private constructor( this.doingBusinessAs == other.doingBusinessAs && this.lastFour == other.lastFour && this.name == other.name && + this.financialAccountToken == other.financialAccountToken && this.owner == other.owner && this.ownerType == other.ownerType && this.routingNumber == other.routingNumber && @@ -290,6 +302,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, @@ -308,7 +321,7 @@ private constructor( } override fun toString() = - "MicroDepositCreateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "MicroDepositCreateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -327,6 +340,7 @@ private constructor( private var doingBusinessAs: JsonField = JsonMissing.of() private var lastFour: JsonField = JsonMissing.of() private var name: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() private var owner: JsonField = JsonMissing.of() private var ownerType: JsonField = JsonMissing.of() private var routingNumber: JsonField = JsonMissing.of() @@ -352,6 +366,7 @@ private constructor( this.doingBusinessAs = microDepositCreateResponse.doingBusinessAs this.lastFour = microDepositCreateResponse.lastFour this.name = microDepositCreateResponse.name + this.financialAccountToken = microDepositCreateResponse.financialAccountToken this.owner = microDepositCreateResponse.owner this.ownerType = microDepositCreateResponse.ownerType this.routingNumber = microDepositCreateResponse.routingNumber @@ -477,6 +492,17 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** The financial account token of the operating account used to verify the account */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account used to verify the account */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + /** * Legal Name of the business or individual who owns the external account. This will appear * in statements @@ -615,6 +641,7 @@ private constructor( doingBusinessAs, lastFour, name, + financialAccountToken, owner, ownerType, routingNumber, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementReport.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementReport.kt index 3bd73c0a..4a519904 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementReport.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementReport.kt @@ -21,7 +21,7 @@ class SettlementReport private constructor( private val created: JsonField, private val currency: JsonField, - private val details: JsonField>, + private val details: JsonField>, private val disputesGrossAmount: JsonField, private val interchangeGrossAmount: JsonField, private val otherFeesGrossAmount: JsonField, @@ -42,7 +42,7 @@ private constructor( /** Three-digit alphabetic ISO 4217 code. */ fun currency(): String = currency.getRequired("currency") - fun details(): List = details.getRequired("details") + fun details(): List = details.getRequired("details") /** The total gross amount of disputes settlements. */ fun disputesGrossAmount(): Long = disputesGrossAmount.getRequired("disputes_gross_amount") @@ -122,7 +122,7 @@ private constructor( if (!validated) { created() currency() - details().forEach { it.validate() } + details().forEach { it?.validate() } disputesGrossAmount() interchangeGrossAmount() otherFeesGrossAmount() @@ -187,7 +187,7 @@ private constructor( private var created: JsonField = JsonMissing.of() private var currency: JsonField = JsonMissing.of() - private var details: JsonField> = JsonMissing.of() + private var details: JsonField> = JsonMissing.of() private var disputesGrossAmount: JsonField = JsonMissing.of() private var interchangeGrossAmount: JsonField = JsonMissing.of() private var otherFeesGrossAmount: JsonField = JsonMissing.of() @@ -228,11 +228,11 @@ private constructor( @ExcludeMissing fun currency(currency: JsonField) = apply { this.currency = currency } - fun details(details: List) = details(JsonField.of(details)) + fun details(details: List) = details(JsonField.of(details)) @JsonProperty("details") @ExcludeMissing - fun details(details: JsonField>) = apply { + fun details(details: JsonField>) = apply { this.details = details } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt index 45c74625..4e9dfdc7 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt @@ -935,14 +935,25 @@ private constructor( companion object { + @JvmField + val ACH_EXCEEDED_THRESHOLD = + FinancialEventType(JsonField.of("ACH_EXCEEDED_THRESHOLD")) + @JvmField val ACH_INSUFFICIENT_FUNDS = FinancialEventType(JsonField.of("ACH_INSUFFICIENT_FUNDS")) + @JvmField + val ACH_INVALID_ACCOUNT = FinancialEventType(JsonField.of("ACH_INVALID_ACCOUNT")) + @JvmField val ACH_ORIGINATION_PENDING = FinancialEventType(JsonField.of("ACH_ORIGINATION_PENDING")) + @JvmField + val ACH_ORIGINATION_PROCESSED = + FinancialEventType(JsonField.of("ACH_ORIGINATION_PROCESSED")) + @JvmField val ACH_ORIGINATION_RELEASED = FinancialEventType(JsonField.of("ACH_ORIGINATION_RELEASED")) @@ -955,6 +966,9 @@ private constructor( @JvmField val ACH_RETURN = FinancialEventType(JsonField.of("ACH_RETURN")) + @JvmField + val ACH_RETURN_PENDING = FinancialEventType(JsonField.of("ACH_RETURN_PENDING")) + @JvmField val AUTHORIZATION = FinancialEventType(JsonField.of("AUTHORIZATION")) @JvmField @@ -1006,12 +1020,16 @@ private constructor( } enum class Known { + ACH_EXCEEDED_THRESHOLD, ACH_INSUFFICIENT_FUNDS, + ACH_INVALID_ACCOUNT, ACH_ORIGINATION_PENDING, + ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, ACH_RECEIPT_PENDING, ACH_RECEIPT_RELEASED, ACH_RETURN, + ACH_RETURN_PENDING, AUTHORIZATION, AUTHORIZATION_ADVICE, AUTHORIZATION_EXPIRY, @@ -1031,12 +1049,16 @@ private constructor( } enum class Value { + ACH_EXCEEDED_THRESHOLD, ACH_INSUFFICIENT_FUNDS, + ACH_INVALID_ACCOUNT, ACH_ORIGINATION_PENDING, + ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, ACH_RECEIPT_PENDING, ACH_RECEIPT_RELEASED, ACH_RETURN, + ACH_RETURN_PENDING, AUTHORIZATION, AUTHORIZATION_ADVICE, AUTHORIZATION_EXPIRY, @@ -1058,12 +1080,16 @@ private constructor( fun value(): Value = when (this) { + ACH_EXCEEDED_THRESHOLD -> Value.ACH_EXCEEDED_THRESHOLD ACH_INSUFFICIENT_FUNDS -> Value.ACH_INSUFFICIENT_FUNDS + ACH_INVALID_ACCOUNT -> Value.ACH_INVALID_ACCOUNT ACH_ORIGINATION_PENDING -> Value.ACH_ORIGINATION_PENDING + ACH_ORIGINATION_PROCESSED -> Value.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Value.ACH_ORIGINATION_RELEASED ACH_RECEIPT_PENDING -> Value.ACH_RECEIPT_PENDING ACH_RECEIPT_RELEASED -> Value.ACH_RECEIPT_RELEASED ACH_RETURN -> Value.ACH_RETURN + ACH_RETURN_PENDING -> Value.ACH_RETURN_PENDING AUTHORIZATION -> Value.AUTHORIZATION AUTHORIZATION_ADVICE -> Value.AUTHORIZATION_ADVICE AUTHORIZATION_EXPIRY -> Value.AUTHORIZATION_EXPIRY @@ -1085,12 +1111,16 @@ private constructor( fun known(): Known = when (this) { + ACH_EXCEEDED_THRESHOLD -> Known.ACH_EXCEEDED_THRESHOLD ACH_INSUFFICIENT_FUNDS -> Known.ACH_INSUFFICIENT_FUNDS + ACH_INVALID_ACCOUNT -> Known.ACH_INVALID_ACCOUNT ACH_ORIGINATION_PENDING -> Known.ACH_ORIGINATION_PENDING + ACH_ORIGINATION_PROCESSED -> Known.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Known.ACH_ORIGINATION_RELEASED ACH_RECEIPT_PENDING -> Known.ACH_RECEIPT_PENDING ACH_RECEIPT_RELEASED -> Known.ACH_RECEIPT_RELEASED ACH_RETURN -> Known.ACH_RETURN + ACH_RETURN_PENDING -> Known.ACH_RETURN_PENDING AUTHORIZATION -> Known.AUTHORIZATION AUTHORIZATION_ADVICE -> Known.AUTHORIZATION_ADVICE AUTHORIZATION_EXPIRY -> Known.AUTHORIZATION_EXPIRY diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferCreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferCreateResponse.kt deleted file mode 100644 index 104b4100..00000000 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferCreateResponse.kt +++ /dev/null @@ -1,106 +0,0 @@ -// 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.JsonProperty -import com.fasterxml.jackson.databind.annotation.JsonDeserialize -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.NoAutoDetect -import com.lithic.api.core.toUnmodifiable -import java.util.Objects -import java.util.Optional - -@JsonDeserialize(builder = TransferCreateResponse.Builder::class) -@NoAutoDetect -class TransferCreateResponse -private constructor( - private val data: JsonField, - private val additionalProperties: Map, -) { - - private var validated: Boolean = false - - private var hashCode: Int = 0 - - fun data(): Optional = Optional.ofNullable(data.getNullable("data")) - - @JsonProperty("data") @ExcludeMissing fun _data() = data - - @JsonAnyGetter - @ExcludeMissing - fun _additionalProperties(): Map = additionalProperties - - fun validate(): TransferCreateResponse = apply { - if (!validated) { - data().map { it.validate() } - validated = true - } - } - - fun toBuilder() = Builder().from(this) - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is TransferCreateResponse && - this.data == other.data && - this.additionalProperties == other.additionalProperties - } - - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = Objects.hash(data, additionalProperties) - } - return hashCode - } - - override fun toString() = - "TransferCreateResponse{data=$data, additionalProperties=$additionalProperties}" - - companion object { - - @JvmStatic fun builder() = Builder() - } - - class Builder { - - private var data: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(transferCreateResponse: TransferCreateResponse) = apply { - this.data = transferCreateResponse.data - additionalProperties(transferCreateResponse.additionalProperties) - } - - fun data(data: Transfer) = data(JsonField.of(data)) - - @JsonProperty("data") - @ExcludeMissing - fun data(data: JsonField) = apply { this.data = data } - - fun additionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.clear() - this.additionalProperties.putAll(additionalProperties) - } - - @JsonAnySetter - fun putAdditionalProperty(key: String, value: JsonValue) = apply { - this.additionalProperties.put(key, value) - } - - fun putAllAdditionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.putAll(additionalProperties) - } - - fun build(): TransferCreateResponse = - TransferCreateResponse(data, additionalProperties.toUnmodifiable()) - } -} diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransferServiceAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransferServiceAsync.kt index 51f23007..44c283e1 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransferServiceAsync.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransferServiceAsync.kt @@ -5,8 +5,8 @@ package com.lithic.api.services.async import com.lithic.api.core.RequestOptions +import com.lithic.api.models.Transfer import com.lithic.api.models.TransferCreateParams -import com.lithic.api.models.TransferCreateResponse import java.util.concurrent.CompletableFuture interface TransferServiceAsync { @@ -16,5 +16,5 @@ interface TransferServiceAsync { fun create( params: TransferCreateParams, requestOptions: RequestOptions = RequestOptions.none() - ): CompletableFuture + ): CompletableFuture } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransferServiceAsyncImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransferServiceAsyncImpl.kt index be9d8918..eb45dad5 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransferServiceAsyncImpl.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransferServiceAsyncImpl.kt @@ -8,8 +8,8 @@ import com.lithic.api.core.http.HttpMethod import com.lithic.api.core.http.HttpRequest import com.lithic.api.core.http.HttpResponse.Handler import com.lithic.api.errors.LithicError +import com.lithic.api.models.Transfer import com.lithic.api.models.TransferCreateParams -import com.lithic.api.models.TransferCreateResponse import com.lithic.api.services.errorHandler import com.lithic.api.services.json import com.lithic.api.services.jsonHandler @@ -23,14 +23,14 @@ constructor( private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) - private val createHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + private val createHandler: Handler = + jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) /** Transfer funds between two financial accounts or between a financial account and card */ override fun create( params: TransferCreateParams, requestOptions: RequestOptions - ): CompletableFuture { + ): CompletableFuture { val request = HttpRequest.builder() .method(HttpMethod.POST) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransferService.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransferService.kt index 528fab1f..ddf80db4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransferService.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransferService.kt @@ -5,8 +5,8 @@ package com.lithic.api.services.blocking import com.lithic.api.core.RequestOptions +import com.lithic.api.models.Transfer import com.lithic.api.models.TransferCreateParams -import com.lithic.api.models.TransferCreateResponse interface TransferService { @@ -15,5 +15,5 @@ interface TransferService { fun create( params: TransferCreateParams, requestOptions: RequestOptions = RequestOptions.none() - ): TransferCreateResponse + ): Transfer } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransferServiceImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransferServiceImpl.kt index 1d97a874..a90e9f46 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransferServiceImpl.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransferServiceImpl.kt @@ -8,8 +8,8 @@ import com.lithic.api.core.http.HttpMethod import com.lithic.api.core.http.HttpRequest import com.lithic.api.core.http.HttpResponse.Handler import com.lithic.api.errors.LithicError +import com.lithic.api.models.Transfer import com.lithic.api.models.TransferCreateParams -import com.lithic.api.models.TransferCreateResponse import com.lithic.api.services.errorHandler import com.lithic.api.services.json import com.lithic.api.services.jsonHandler @@ -22,14 +22,11 @@ constructor( private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) - private val createHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + private val createHandler: Handler = + jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) /** Transfer funds between two financial accounts or between a financial account and card */ - override fun create( - params: TransferCreateParams, - requestOptions: RequestOptions - ): TransferCreateResponse { + override fun create(params: TransferCreateParams, requestOptions: RequestOptions): Transfer { val request = HttpRequest.builder() .method(HttpMethod.POST) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardProvisionParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardProvisionParamsTest.kt index 3c9a16ce..fd1677df 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardProvisionParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardProvisionParamsTest.kt @@ -13,6 +13,8 @@ class CardProvisionParamsTest { CardProvisionParams.builder() .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .certificate("U3RhaW5sZXNzIHJvY2tz") + .clientDeviceId("string") + .clientWalletAccountId("string") .digitalWallet(CardProvisionParams.DigitalWallet.APPLE_PAY) .nonce("U3RhaW5sZXNzIHJvY2tz") .nonceSignature("U3RhaW5sZXNzIHJvY2tz") @@ -25,6 +27,8 @@ class CardProvisionParamsTest { CardProvisionParams.builder() .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .certificate("U3RhaW5sZXNzIHJvY2tz") + .clientDeviceId("string") + .clientWalletAccountId("string") .digitalWallet(CardProvisionParams.DigitalWallet.APPLE_PAY) .nonce("U3RhaW5sZXNzIHJvY2tz") .nonceSignature("U3RhaW5sZXNzIHJvY2tz") @@ -32,6 +36,8 @@ class CardProvisionParamsTest { val body = params.getBody() assertThat(body).isNotNull assertThat(body.certificate()).isEqualTo("U3RhaW5sZXNzIHJvY2tz") + assertThat(body.clientDeviceId()).isEqualTo("string") + assertThat(body.clientWalletAccountId()).isEqualTo("string") assertThat(body.digitalWallet()).isEqualTo(CardProvisionParams.DigitalWallet.APPLE_PAY) assertThat(body.nonce()).isEqualTo("U3RhaW5sZXNzIHJvY2tz") assertThat(body.nonceSignature()).isEqualTo("U3RhaW5sZXNzIHJvY2tz") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateParamsTest.kt index bcb9082b..3ed67567 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateParamsTest.kt @@ -13,7 +13,7 @@ class ExternalBankAccountCreateParamsTest { ExternalBankAccountCreateParams.builder() .forBankVerifiedCreateBankAccountApiRequest( ExternalBankAccountCreateParams.BankVerifiedCreateBankAccountApiRequest.builder() - .accountNumber("string") + .accountNumber("12345678901234567") .country("USD") .currency("USD") .owner("x") @@ -39,6 +39,7 @@ class ExternalBankAccountCreateParamsTest { .companyId("x") .dob(LocalDate.parse("2019-12-27")) .doingBusinessAs("string") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("x") .userDefinedId("string") .verificationEnforcement(true) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt index 5d182f6d..171a56f2 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt @@ -40,6 +40,7 @@ class ExternalBankAccountCreateResponseTest { .companyId("string") .dob(LocalDate.parse("2019-12-27")) .doingBusinessAs("string") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("string") .userDefinedId("string") .verificationFailedReason("string") @@ -81,6 +82,8 @@ class ExternalBankAccountCreateResponseTest { assertThat(externalBankAccountCreateResponse.companyId()).contains("string") assertThat(externalBankAccountCreateResponse.dob()).contains(LocalDate.parse("2019-12-27")) assertThat(externalBankAccountCreateResponse.doingBusinessAs()).contains("string") + assertThat(externalBankAccountCreateResponse.financialAccountToken()) + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountCreateResponse.name()).contains("string") assertThat(externalBankAccountCreateResponse.userDefinedId()).contains("string") assertThat(externalBankAccountCreateResponse.verificationFailedReason()).contains("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt index 6753e4d5..a5471ccb 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt @@ -40,6 +40,7 @@ class ExternalBankAccountListResponseTest { .companyId("string") .dob(LocalDate.parse("2019-12-27")) .doingBusinessAs("string") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("string") .userDefinedId("string") .verificationFailedReason("string") @@ -81,6 +82,8 @@ class ExternalBankAccountListResponseTest { assertThat(externalBankAccountListResponse.companyId()).contains("string") assertThat(externalBankAccountListResponse.dob()).contains(LocalDate.parse("2019-12-27")) assertThat(externalBankAccountListResponse.doingBusinessAs()).contains("string") + assertThat(externalBankAccountListResponse.financialAccountToken()) + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountListResponse.name()).contains("string") assertThat(externalBankAccountListResponse.userDefinedId()).contains("string") assertThat(externalBankAccountListResponse.verificationFailedReason()).contains("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt index 73eb7c6d..bccf455a 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt @@ -40,6 +40,7 @@ class ExternalBankAccountRetrieveResponseTest { .companyId("string") .dob(LocalDate.parse("2019-12-27")) .doingBusinessAs("string") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("string") .userDefinedId("string") .verificationFailedReason("string") @@ -82,6 +83,8 @@ class ExternalBankAccountRetrieveResponseTest { assertThat(externalBankAccountRetrieveResponse.dob()) .contains(LocalDate.parse("2019-12-27")) assertThat(externalBankAccountRetrieveResponse.doingBusinessAs()).contains("string") + assertThat(externalBankAccountRetrieveResponse.financialAccountToken()) + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountRetrieveResponse.name()).contains("string") assertThat(externalBankAccountRetrieveResponse.userDefinedId()).contains("string") assertThat(externalBankAccountRetrieveResponse.verificationFailedReason()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponseTest.kt index 975afe37..67592676 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponseTest.kt @@ -44,6 +44,7 @@ class ExternalBankAccountRetryMicroDepositsResponseTest { .companyId("string") .dob(LocalDate.parse("2019-12-27")) .doingBusinessAs("string") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("string") .userDefinedId("string") .verificationFailedReason("string") @@ -89,6 +90,8 @@ class ExternalBankAccountRetryMicroDepositsResponseTest { .contains(LocalDate.parse("2019-12-27")) assertThat(externalBankAccountRetryMicroDepositsResponse.doingBusinessAs()) .contains("string") + assertThat(externalBankAccountRetryMicroDepositsResponse.financialAccountToken()) + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountRetryMicroDepositsResponse.name()).contains("string") assertThat(externalBankAccountRetryMicroDepositsResponse.userDefinedId()).contains("string") assertThat(externalBankAccountRetryMicroDepositsResponse.verificationFailedReason()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt index f68404ab..6378188c 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt @@ -40,6 +40,7 @@ class ExternalBankAccountUpdateResponseTest { .companyId("string") .dob(LocalDate.parse("2019-12-27")) .doingBusinessAs("string") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("string") .userDefinedId("string") .verificationFailedReason("string") @@ -81,6 +82,8 @@ class ExternalBankAccountUpdateResponseTest { assertThat(externalBankAccountUpdateResponse.companyId()).contains("string") assertThat(externalBankAccountUpdateResponse.dob()).contains(LocalDate.parse("2019-12-27")) assertThat(externalBankAccountUpdateResponse.doingBusinessAs()).contains("string") + assertThat(externalBankAccountUpdateResponse.financialAccountToken()) + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountUpdateResponse.name()).contains("string") assertThat(externalBankAccountUpdateResponse.userDefinedId()).contains("string") assertThat(externalBankAccountUpdateResponse.verificationFailedReason()).contains("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt index 656bb3ed..3b6194de 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt @@ -17,6 +17,7 @@ class FinancialAccountTest { .type(FinancialAccount.Type.ISSUING) .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .accountNumber("string") + .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .nickname("string") .routingNumber("string") .build() @@ -28,6 +29,7 @@ class FinancialAccountTest { assertThat(financialAccount.updated()) .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) assertThat(financialAccount.accountNumber()).contains("string") + assertThat(financialAccount.accountToken()).contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(financialAccount.nickname()).contains("string") assertThat(financialAccount.routingNumber()).contains("string") } diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialTransactionTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialTransactionTest.kt index 472f47f3..dafadfbb 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialTransactionTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialTransactionTest.kt @@ -26,7 +26,7 @@ class FinancialTransactionTest { .result(FinancialTransaction.FinancialEvent.Result.APPROVED) .type( FinancialTransaction.FinancialEvent.FinancialEventType - .ACH_INSUFFICIENT_FUNDS + .ACH_EXCEEDED_THRESHOLD ) .build() ) @@ -53,7 +53,7 @@ class FinancialTransactionTest { .result(FinancialTransaction.FinancialEvent.Result.APPROVED) .type( FinancialTransaction.FinancialEvent.FinancialEventType - .ACH_INSUFFICIENT_FUNDS + .ACH_EXCEEDED_THRESHOLD ) .build() ) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/LineItemListResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/LineItemListResponseTest.kt index b28e4228..2cd71d65 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/LineItemListResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/LineItemListResponseTest.kt @@ -18,7 +18,7 @@ class LineItemListResponseTest { .category(LineItemListResponse.Category.ACH) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currency("string") - .eventType(LineItemListResponse.FinancialEventType.ACH_INSUFFICIENT_FUNDS) + .eventType(LineItemListResponse.FinancialEventType.ACH_EXCEEDED_THRESHOLD) .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .financialTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .settledDate(LocalDate.parse("2019-12-27")) @@ -33,7 +33,7 @@ class LineItemListResponseTest { .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) assertThat(lineItemListResponse.currency()).isEqualTo("string") assertThat(lineItemListResponse.eventType()) - .isEqualTo(LineItemListResponse.FinancialEventType.ACH_INSUFFICIENT_FUNDS) + .isEqualTo(LineItemListResponse.FinancialEventType.ACH_EXCEEDED_THRESHOLD) assertThat(lineItemListResponse.financialAccountToken()) .isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(lineItemListResponse.financialTransactionToken()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt index 7cf747c4..8c906ee5 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt @@ -40,6 +40,7 @@ class MicroDepositCreateResponseTest { .companyId("string") .dob(LocalDate.parse("2019-12-27")) .doingBusinessAs("string") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("string") .userDefinedId("string") .verificationFailedReason("string") @@ -81,6 +82,8 @@ class MicroDepositCreateResponseTest { assertThat(microDepositCreateResponse.companyId()).contains("string") assertThat(microDepositCreateResponse.dob()).contains(LocalDate.parse("2019-12-27")) assertThat(microDepositCreateResponse.doingBusinessAs()).contains("string") + assertThat(microDepositCreateResponse.financialAccountToken()) + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(microDepositCreateResponse.name()).contains("string") assertThat(microDepositCreateResponse.userDefinedId()).contains("string") assertThat(microDepositCreateResponse.verificationFailedReason()).contains("string") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransferCreateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransferCreateResponseTest.kt deleted file mode 100644 index a9a9ce39..00000000 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransferCreateResponseTest.kt +++ /dev/null @@ -1,143 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.lithic.api.models - -import java.time.OffsetDateTime -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test - -class TransferCreateResponseTest { - - @Test - fun createTransferCreateResponse() { - val transferCreateResponse = - TransferCreateResponse.builder() - .data( - Transfer.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(Transfer.Category.TRANSFER) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency("string") - .descriptor("string") - .events( - listOf( - Transfer.FinancialEvent.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .amount(123L) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .result(Transfer.FinancialEvent.Result.APPROVED) - .type( - Transfer.FinancialEvent.FinancialEventType - .ACH_INSUFFICIENT_FUNDS - ) - .build() - ) - ) - .fromBalance( - listOf( - Balance.builder() - .availableAmount(123L) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency("string") - .financialAccountToken("3fa85f64-5717-4562-b3fc-2c963f66afa6") - .financialAccountType(Balance.FinancialAccountType.ISSUING) - .lastTransactionEventToken( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" - ) - .lastTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .pendingAmount(123L) - .totalAmount(123L) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) - ) - .pendingAmount(123L) - .result(Transfer.Result.APPROVED) - .settledAmount(123L) - .status(Transfer.Status.DECLINED) - .toBalance( - listOf( - Balance.builder() - .availableAmount(123L) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency("string") - .financialAccountToken("3fa85f64-5717-4562-b3fc-2c963f66afa6") - .financialAccountType(Balance.FinancialAccountType.ISSUING) - .lastTransactionEventToken( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" - ) - .lastTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .pendingAmount(123L) - .totalAmount(123L) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) - ) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) - .build() - assertThat(transferCreateResponse).isNotNull - assertThat(transferCreateResponse.data()) - .contains( - Transfer.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(Transfer.Category.TRANSFER) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency("string") - .descriptor("string") - .events( - listOf( - Transfer.FinancialEvent.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .amount(123L) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .result(Transfer.FinancialEvent.Result.APPROVED) - .type( - Transfer.FinancialEvent.FinancialEventType - .ACH_INSUFFICIENT_FUNDS - ) - .build() - ) - ) - .fromBalance( - listOf( - Balance.builder() - .availableAmount(123L) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency("string") - .financialAccountToken("3fa85f64-5717-4562-b3fc-2c963f66afa6") - .financialAccountType(Balance.FinancialAccountType.ISSUING) - .lastTransactionEventToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .lastTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .pendingAmount(123L) - .totalAmount(123L) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) - ) - .pendingAmount(123L) - .result(Transfer.Result.APPROVED) - .settledAmount(123L) - .status(Transfer.Status.DECLINED) - .toBalance( - listOf( - Balance.builder() - .availableAmount(123L) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency("string") - .financialAccountToken("3fa85f64-5717-4562-b3fc-2c963f66afa6") - .financialAccountType(Balance.FinancialAccountType.ISSUING) - .lastTransactionEventToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .lastTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .pendingAmount(123L) - .totalAmount(123L) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) - ) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .build() - ) - } -} diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransferTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransferTest.kt index 3421b347..815fcd1e 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransferTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransferTest.kt @@ -24,7 +24,7 @@ class TransferTest { .amount(123L) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .result(Transfer.FinancialEvent.Result.APPROVED) - .type(Transfer.FinancialEvent.FinancialEventType.ACH_INSUFFICIENT_FUNDS) + .type(Transfer.FinancialEvent.FinancialEventType.ACH_EXCEEDED_THRESHOLD) .build() ) ) @@ -79,7 +79,7 @@ class TransferTest { .amount(123L) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .result(Transfer.FinancialEvent.Result.APPROVED) - .type(Transfer.FinancialEvent.FinancialEventType.ACH_INSUFFICIENT_FUNDS) + .type(Transfer.FinancialEvent.FinancialEventType.ACH_EXCEEDED_THRESHOLD) .build() ) assertThat(transfer.fromBalance().get()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/CardServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/CardServiceTest.kt index 5514cee2..4511169b 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/CardServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/CardServiceTest.kt @@ -145,6 +145,8 @@ class CardServiceTest { CardProvisionParams.builder() .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .certificate("U3RhaW5sZXNzIHJvY2tz") + .clientDeviceId("string") + .clientWalletAccountId("string") .digitalWallet(CardProvisionParams.DigitalWallet.APPLE_PAY) .nonce("U3RhaW5sZXNzIHJvY2tz") .nonceSignature("U3RhaW5sZXNzIHJvY2tz") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ExternalBankAccountServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ExternalBankAccountServiceTest.kt index de231ddf..72015d1a 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ExternalBankAccountServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ExternalBankAccountServiceTest.kt @@ -27,7 +27,7 @@ class ExternalBankAccountServiceTest { .forBankVerifiedCreateBankAccountApiRequest( ExternalBankAccountCreateParams.BankVerifiedCreateBankAccountApiRequest .builder() - .accountNumber("string") + .accountNumber("12345678901234567") .country("USD") .currency("USD") .owner("x") @@ -54,6 +54,7 @@ class ExternalBankAccountServiceTest { .companyId("x") .dob(LocalDate.parse("2019-12-27")) .doingBusinessAs("string") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("x") .userDefinedId("string") .verificationEnforcement(true) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/TransferServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/TransferServiceTest.kt index c6c844c8..779aa4d9 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/TransferServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/TransferServiceTest.kt @@ -19,7 +19,7 @@ class TransferServiceTest { .apiKey("My Lithic API Key") .build() val transferService = client.transfers() - val transferCreateResponse = + val transfer = transferService.create( TransferCreateParams.builder() .amount(123L) @@ -29,7 +29,7 @@ class TransferServiceTest { .memo("string") .build() ) - println(transferCreateResponse) - transferCreateResponse.validate() + println(transfer) + transfer.validate() } }