diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 4a1242df8..774500bfb 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.133.0"
+ ".": "0.134.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 47c7d7549..c48be9d8b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 216
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-38a020a15ab14f79c7fea3290822406cf80a9d43d46ab3295632a9723f5e42cd.yml
-openapi_spec_hash: 5a7357a17c5119bc91d8f5e42297fac3
-config_hash: 27fa50e251754c8982e3dc615ef6da41
+configured_endpoints: 219
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-18e08b593c738bb6a429fe225dac7c4bf5d161a7dbb003e495b87a21d2aff6a8.yml
+openapi_spec_hash: b6f308ea5a6d9ad9c22c14e7574d9669
+config_hash: 0cfee7faa13d28e91697e2d79c50935e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b82c81f37..6f41ca8f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,25 @@
# Changelog
+## 0.134.0 (2026-09-17)
+
+Full Changelog: [v0.133.0...v0.134.0](https://github.com/lithic-com/lithic-java/compare/v0.133.0...v0.134.0)
+
+### Features
+
+* [CARDS-5174] Add reiusse/renew 409 error ([3d90574](https://github.com/lithic-com/lithic-java/commit/3d90574a2bd217af7a1e3161c55a17c2d3f7b6bc))
+* [TRE-14464] Update /retry payments endpoint to accept method ([5e294b4](https://github.com/lithic-com/lithic-java/commit/5e294b48832067d094d6c316c239a33bb10a527a))
+* [TRE-14524] Add Open to buy API spec ([b0e8d1f](https://github.com/lithic-com/lithic-java/commit/b0e8d1fba80804352d37aedf40fb809cc4fc2754))
+* Add missing blockchain/stablecoin endpoints to the spec ([5cdc715](https://github.com/lithic-com/lithic-java/commit/5cdc715990d26e494c33d6dfd5bd6581ce21b6c7))
+* **api:** add card.pin_updated webhook event ([8ab17b8](https://github.com/lithic-com/lithic-java/commit/8ab17b8600e670de5baedfb831bf3aa327c3163a))
+* **api:** add EXTERNAL_STABLECOIN category/events to payments and account activity models ([71a8dc7](https://github.com/lithic-com/lithic-java/commit/71a8dc7df0db29dc489ba45c3c677e3d1dbeafa1))
+* **api:** add FEE/FEE_REVERSAL event types to FinancialEvent/ManagementOperation/StatementLineItems ([ea12080](https://github.com/lithic-com/lithic-java/commit/ea12080f1eac92e1a9bdb3c35ed0b67f3bcf3891))
+* **api:** add psd2Context field to ThreeDSAuthentication responses ([5b86204](https://github.com/lithic-com/lithic-java/commit/5b862041a8be447059faa1cdf44fabcc82ae5764))
+* **api:** add STABLECOIN_REVIEWED simulation type to payment simulate action ([eb203cb](https://github.com/lithic-com/lithic-java/commit/eb203cb3d42ad2e5af7924be34535db8f7ffe936))
+* AUTH-3759: Add DECLINE_SCA_REQUIRED and SCA_REQUIRED enum entries ([816b323](https://github.com/lithic-com/lithic-java/commit/816b3238971ee1e9f6b2997f5a54c7a598959dd9))
+* TRE-14349: add installment plan management operation event types ([97fabed](https://github.com/lithic-com/lithic-java/commit/97fabed2eefe8fe7c76fa4c45a66ed8495a28f9d))
+* TRE-14429: Document the stablecoin payments endpoint ([585fdd5](https://github.com/lithic-com/lithic-java/commit/585fdd50392d686c01877f07189ed696345267c8))
+* **types:** add OTHER enum value to AuthRuleType ([498c5fe](https://github.com/lithic-com/lithic-java/commit/498c5fe9b52733f1723a1f5014b354c0b52a3d3b))
+
## 0.133.0 (2026-08-31)
Full Changelog: [v0.132.0...v0.133.0](https://github.com/lithic-com/lithic-java/compare/v0.132.0...v0.133.0)
diff --git a/README.md b/README.md
index 6843416bd..0c2c1a907 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.133.0)
-[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.133.0)
+[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.134.0)
+[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.134.0)
@@ -22,7 +22,7 @@ Use the Lithic MCP Server to enable AI assistants to interact with this API, all
-The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.133.0).
+The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.134.0).
@@ -33,7 +33,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic
### Gradle
```kotlin
-implementation("com.lithic.api:lithic-java:0.133.0")
+implementation("com.lithic.api:lithic-java:0.134.0")
```
### Maven
@@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.133.0")
com.lithic.api
lithic-java
- 0.133.0
+ 0.134.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 9d85f0e19..1dda877a1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.lithic.api"
- version = "0.133.0" // x-release-please-version
+ version = "0.134.0" // x-release-please-version
}
subprojects {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt
index 0dec1db34..3a1db69cc 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt
@@ -414,6 +414,8 @@ private constructor(
@JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+ @JvmField val EXTERNAL_STABLECOIN = of("EXTERNAL_STABLECOIN")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE")
@@ -453,6 +455,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -489,6 +492,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -529,6 +533,7 @@ private constructor(
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Value.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Value.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Value.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT
@@ -567,6 +572,7 @@ private constructor(
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Known.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Known.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Known.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt
index e5bff9e4c..972c5c9d8 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt
@@ -1136,6 +1136,8 @@ private constructor(
@JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+ @JvmField val EXTERNAL_STABLECOIN = of("EXTERNAL_STABLECOIN")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE")
@@ -1175,6 +1177,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1213,6 +1216,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1253,6 +1257,7 @@ private constructor(
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Value.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Value.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Value.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT
@@ -1291,6 +1296,7 @@ private constructor(
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Known.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Known.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Known.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt
index 7630a2e1e..52fa21012 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt
@@ -1158,6 +1158,8 @@ private constructor(
@JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+ @JvmField val EXTERNAL_STABLECOIN = of("EXTERNAL_STABLECOIN")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE")
@@ -1197,6 +1199,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1235,6 +1238,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1275,6 +1279,7 @@ private constructor(
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Value.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Value.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Value.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT
@@ -1313,6 +1318,7 @@ private constructor(
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Known.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Known.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Known.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt
index e3ae59125..b0bcd85b9 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt
@@ -210,6 +210,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or ACH_PAYMENT_UPDATE event
* stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -662,6 +664,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or ACH_PAYMENT_UPDATE
* event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*/
fun type(type: AuthRuleType) = type(JsonField.of(type))
@@ -3254,6 +3258,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or ACH_PAYMENT_UPDATE event
* stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*/
class AuthRuleType @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -3280,6 +3286,8 @@ private constructor(
@JvmField val TYPESCRIPT_CODE = of("TYPESCRIPT_CODE")
+ @JvmField val OTHER = of("OTHER")
+
@JvmStatic fun of(value: String) = AuthRuleType(JsonField.of(value))
}
@@ -3290,6 +3298,7 @@ private constructor(
MERCHANT_LOCK,
CONDITIONAL_ACTION,
TYPESCRIPT_CODE,
+ OTHER,
}
/**
@@ -3307,6 +3316,7 @@ private constructor(
MERCHANT_LOCK,
CONDITIONAL_ACTION,
TYPESCRIPT_CODE,
+ OTHER,
/**
* An enum member indicating that [AuthRuleType] was instantiated with an unknown value.
*/
@@ -3327,6 +3337,7 @@ private constructor(
MERCHANT_LOCK -> Value.MERCHANT_LOCK
CONDITIONAL_ACTION -> Value.CONDITIONAL_ACTION
TYPESCRIPT_CODE -> Value.TYPESCRIPT_CODE
+ OTHER -> Value.OTHER
else -> Value._UNKNOWN
}
@@ -3346,6 +3357,7 @@ private constructor(
MERCHANT_LOCK -> Known.MERCHANT_LOCK
CONDITIONAL_ACTION -> Known.CONDITIONAL_ACTION
TYPESCRIPT_CODE -> Known.TYPESCRIPT_CODE
+ OTHER -> Known.OTHER
else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt
index c0a400f36..f36432fcd 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt
@@ -521,6 +521,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected
@@ -798,6 +800,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ * are read-only; `OTHER` cannot be used when creating a rule.
*/
fun type(type: AuthRuleType) = type(JsonField.of(type))
@@ -1717,6 +1721,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*/
class AuthRuleType
@JsonCreator
@@ -1744,6 +1750,8 @@ private constructor(
@JvmField val TYPESCRIPT_CODE = of("TYPESCRIPT_CODE")
+ @JvmField val OTHER = of("OTHER")
+
@JvmStatic fun of(value: String) = AuthRuleType(JsonField.of(value))
}
@@ -1754,6 +1762,7 @@ private constructor(
MERCHANT_LOCK,
CONDITIONAL_ACTION,
TYPESCRIPT_CODE,
+ OTHER,
}
/**
@@ -1772,6 +1781,7 @@ private constructor(
MERCHANT_LOCK,
CONDITIONAL_ACTION,
TYPESCRIPT_CODE,
+ OTHER,
/**
* An enum member indicating that [AuthRuleType] was instantiated with an
* unknown value.
@@ -1793,6 +1803,7 @@ private constructor(
MERCHANT_LOCK -> Value.MERCHANT_LOCK
CONDITIONAL_ACTION -> Value.CONDITIONAL_ACTION
TYPESCRIPT_CODE -> Value.TYPESCRIPT_CODE
+ OTHER -> Value.OTHER
else -> Value._UNKNOWN
}
@@ -1812,6 +1823,7 @@ private constructor(
MERCHANT_LOCK -> Known.MERCHANT_LOCK
CONDITIONAL_ACTION -> Known.CONDITIONAL_ACTION
TYPESCRIPT_CODE -> Known.TYPESCRIPT_CODE
+ OTHER -> Known.OTHER
else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value")
}
@@ -1972,6 +1984,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected
@@ -2245,6 +2259,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ * are read-only; `OTHER` cannot be used when creating a rule.
*/
fun type(type: AuthRuleType) = type(JsonField.of(type))
@@ -3108,6 +3124,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*/
class AuthRuleType
@JsonCreator
@@ -3135,6 +3153,8 @@ private constructor(
@JvmField val TYPESCRIPT_CODE = of("TYPESCRIPT_CODE")
+ @JvmField val OTHER = of("OTHER")
+
@JvmStatic fun of(value: String) = AuthRuleType(JsonField.of(value))
}
@@ -3145,6 +3165,7 @@ private constructor(
MERCHANT_LOCK,
CONDITIONAL_ACTION,
TYPESCRIPT_CODE,
+ OTHER,
}
/**
@@ -3163,6 +3184,7 @@ private constructor(
MERCHANT_LOCK,
CONDITIONAL_ACTION,
TYPESCRIPT_CODE,
+ OTHER,
/**
* An enum member indicating that [AuthRuleType] was instantiated with an
* unknown value.
@@ -3184,6 +3206,7 @@ private constructor(
MERCHANT_LOCK -> Value.MERCHANT_LOCK
CONDITIONAL_ACTION -> Value.CONDITIONAL_ACTION
TYPESCRIPT_CODE -> Value.TYPESCRIPT_CODE
+ OTHER -> Value.OTHER
else -> Value._UNKNOWN
}
@@ -3203,6 +3226,7 @@ private constructor(
MERCHANT_LOCK -> Known.MERCHANT_LOCK
CONDITIONAL_ACTION -> Known.CONDITIONAL_ACTION
TYPESCRIPT_CODE -> Known.TYPESCRIPT_CODE
+ OTHER -> Known.OTHER
else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value")
}
@@ -3376,6 +3400,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected
@@ -3704,6 +3730,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type
+ * are read-only; `OTHER` cannot be used when creating a rule.
*/
fun type(type: AuthRuleType) = type(JsonField.of(type))
@@ -4663,6 +4691,8 @@ private constructor(
* - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
* ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or
* ACH_PAYMENT_UPDATE event stream.
+ * - `OTHER`: A rule whose type is not exposed through this API. Rules of this type are
+ * read-only; `OTHER` cannot be used when creating a rule.
*/
class AuthRuleType
@JsonCreator
@@ -4690,6 +4720,8 @@ private constructor(
@JvmField val TYPESCRIPT_CODE = of("TYPESCRIPT_CODE")
+ @JvmField val OTHER = of("OTHER")
+
@JvmStatic fun of(value: String) = AuthRuleType(JsonField.of(value))
}
@@ -4700,6 +4732,7 @@ private constructor(
MERCHANT_LOCK,
CONDITIONAL_ACTION,
TYPESCRIPT_CODE,
+ OTHER,
}
/**
@@ -4718,6 +4751,7 @@ private constructor(
MERCHANT_LOCK,
CONDITIONAL_ACTION,
TYPESCRIPT_CODE,
+ OTHER,
/**
* An enum member indicating that [AuthRuleType] was instantiated with an
* unknown value.
@@ -4739,6 +4773,7 @@ private constructor(
MERCHANT_LOCK -> Value.MERCHANT_LOCK
CONDITIONAL_ACTION -> Value.CONDITIONAL_ACTION
TYPESCRIPT_CODE -> Value.TYPESCRIPT_CODE
+ OTHER -> Value.OTHER
else -> Value._UNKNOWN
}
@@ -4758,6 +4793,7 @@ private constructor(
MERCHANT_LOCK -> Known.MERCHANT_LOCK
CONDITIONAL_ACTION -> Known.CONDITIONAL_ACTION
TYPESCRIPT_CODE -> Known.TYPESCRIPT_CODE
+ OTHER -> Known.OTHER
else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BlockchainRecipientRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BlockchainRecipientRetrieveParams.kt
new file mode 100644
index 000000000..cd0557c62
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BlockchainRecipientRetrieveParams.kt
@@ -0,0 +1,211 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+import com.lithic.api.core.Params
+import com.lithic.api.core.http.Headers
+import com.lithic.api.core.http.QueryParams
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/**
+ * Get a blockchain recipient by token
+ *
+ * Use this to poll the `verification_state` after registering an address: a recipient cannot
+ * receive a payout until screening completes and moves it out of `PENDING`
+ */
+class BlockchainRecipientRetrieveParams
+private constructor(
+ private val blockchainRecipientToken: String?,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ fun blockchainRecipientToken(): Optional = Optional.ofNullable(blockchainRecipientToken)
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun none(): BlockchainRecipientRetrieveParams = builder().build()
+
+ /**
+ * Returns a mutable builder for constructing an instance of
+ * [BlockchainRecipientRetrieveParams].
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [BlockchainRecipientRetrieveParams]. */
+ class Builder internal constructor() {
+
+ private var blockchainRecipientToken: String? = null
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(blockchainRecipientRetrieveParams: BlockchainRecipientRetrieveParams) =
+ apply {
+ blockchainRecipientToken =
+ blockchainRecipientRetrieveParams.blockchainRecipientToken
+ additionalHeaders = blockchainRecipientRetrieveParams.additionalHeaders.toBuilder()
+ additionalQueryParams =
+ blockchainRecipientRetrieveParams.additionalQueryParams.toBuilder()
+ }
+
+ fun blockchainRecipientToken(blockchainRecipientToken: String?) = apply {
+ this.blockchainRecipientToken = blockchainRecipientToken
+ }
+
+ /**
+ * Alias for calling [Builder.blockchainRecipientToken] with
+ * `blockchainRecipientToken.orElse(null)`.
+ */
+ fun blockchainRecipientToken(blockchainRecipientToken: Optional) =
+ blockchainRecipientToken(blockchainRecipientToken.getOrNull())
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [BlockchainRecipientRetrieveParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): BlockchainRecipientRetrieveParams =
+ BlockchainRecipientRetrieveParams(
+ blockchainRecipientToken,
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _pathParam(index: Int): String =
+ when (index) {
+ 0 -> blockchainRecipientToken ?: ""
+ else -> ""
+ }
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is BlockchainRecipientRetrieveParams &&
+ blockchainRecipientToken == other.blockchainRecipientToken &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int =
+ Objects.hash(blockchainRecipientToken, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "BlockchainRecipientRetrieveParams{blockchainRecipientToken=$blockchainRecipientToken, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardPinUpdatedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardPinUpdatedWebhookEvent.kt
new file mode 100644
index 000000000..d672179d4
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardPinUpdatedWebhookEvent.kt
@@ -0,0 +1,749 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.lithic.api.core.Enum
+import com.lithic.api.core.ExcludeMissing
+import com.lithic.api.core.JsonField
+import com.lithic.api.core.JsonMissing
+import com.lithic.api.core.JsonValue
+import com.lithic.api.core.checkRequired
+import com.lithic.api.errors.LithicInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import kotlin.jvm.optionals.getOrNull
+
+class CardPinUpdatedWebhookEvent
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val cardToken: JsonField,
+ private val eventType: JsonField,
+ private val pinStatus: JsonField,
+ private val statusReason: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("card_token") @ExcludeMissing cardToken: JsonField = JsonMissing.of(),
+ @JsonProperty("event_type")
+ @ExcludeMissing
+ eventType: JsonField = JsonMissing.of(),
+ @JsonProperty("pin_status")
+ @ExcludeMissing
+ pinStatus: JsonField = JsonMissing.of(),
+ @JsonProperty("status_reason")
+ @ExcludeMissing
+ statusReason: JsonField = JsonMissing.of(),
+ ) : this(cardToken, eventType, pinStatus, statusReason, mutableMapOf())
+
+ /**
+ * The token of the card whose PIN or PIN status was updated
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun cardToken(): String = cardToken.getRequired("card_token")
+
+ /**
+ * The type of event that occurred.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun eventType(): EventType = eventType.getRequired("event_type")
+
+ /**
+ * The card's PIN status after the update
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun pinStatus(): PinStatus = pinStatus.getRequired("pin_status")
+
+ /**
+ * The reason for the PIN update:
+ * * `PIN_SET` - The PIN was set for the first time; `pin_status` is `OK`
+ * * `PIN_CHANGED` - The PIN was changed, including when changing a blocked PIN; `pin_status` is
+ * `OK`
+ * * `PIN_UNBLOCKED` - The PIN was unblocked without changing it; `pin_status` is `OK`
+ * * `EXCESSIVE_PIN_ATTEMPTS` - The PIN was blocked due to excessive incorrect PIN attempts;
+ * `pin_status` is `BLOCKED`
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun statusReason(): StatusReason = statusReason.getRequired("status_reason")
+
+ /**
+ * Returns the raw JSON value of [cardToken].
+ *
+ * Unlike [cardToken], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("card_token") @ExcludeMissing fun _cardToken(): JsonField = cardToken
+
+ /**
+ * Returns the raw JSON value of [eventType].
+ *
+ * Unlike [eventType], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("event_type") @ExcludeMissing fun _eventType(): JsonField = eventType
+
+ /**
+ * Returns the raw JSON value of [pinStatus].
+ *
+ * Unlike [pinStatus], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("pin_status") @ExcludeMissing fun _pinStatus(): JsonField = pinStatus
+
+ /**
+ * Returns the raw JSON value of [statusReason].
+ *
+ * Unlike [statusReason], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("status_reason")
+ @ExcludeMissing
+ fun _statusReason(): JsonField = statusReason
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [CardPinUpdatedWebhookEvent].
+ *
+ * The following fields are required:
+ * ```java
+ * .cardToken()
+ * .eventType()
+ * .pinStatus()
+ * .statusReason()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CardPinUpdatedWebhookEvent]. */
+ class Builder internal constructor() {
+
+ private var cardToken: JsonField? = null
+ private var eventType: JsonField? = null
+ private var pinStatus: JsonField? = null
+ private var statusReason: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(cardPinUpdatedWebhookEvent: CardPinUpdatedWebhookEvent) = apply {
+ cardToken = cardPinUpdatedWebhookEvent.cardToken
+ eventType = cardPinUpdatedWebhookEvent.eventType
+ pinStatus = cardPinUpdatedWebhookEvent.pinStatus
+ statusReason = cardPinUpdatedWebhookEvent.statusReason
+ additionalProperties = cardPinUpdatedWebhookEvent.additionalProperties.toMutableMap()
+ }
+
+ /** The token of the card whose PIN or PIN status was updated */
+ fun cardToken(cardToken: String) = cardToken(JsonField.of(cardToken))
+
+ /**
+ * Sets [Builder.cardToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardToken] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun cardToken(cardToken: JsonField) = apply { this.cardToken = cardToken }
+
+ /** The type of event that occurred. */
+ fun eventType(eventType: EventType) = eventType(JsonField.of(eventType))
+
+ /**
+ * Sets [Builder.eventType] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.eventType] with a well-typed [EventType] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun eventType(eventType: JsonField) = apply { this.eventType = eventType }
+
+ /** The card's PIN status after the update */
+ fun pinStatus(pinStatus: PinStatus) = pinStatus(JsonField.of(pinStatus))
+
+ /**
+ * Sets [Builder.pinStatus] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.pinStatus] with a well-typed [PinStatus] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun pinStatus(pinStatus: JsonField) = apply { this.pinStatus = pinStatus }
+
+ /**
+ * The reason for the PIN update:
+ * * `PIN_SET` - The PIN was set for the first time; `pin_status` is `OK`
+ * * `PIN_CHANGED` - The PIN was changed, including when changing a blocked PIN;
+ * `pin_status` is `OK`
+ * * `PIN_UNBLOCKED` - The PIN was unblocked without changing it; `pin_status` is `OK`
+ * * `EXCESSIVE_PIN_ATTEMPTS` - The PIN was blocked due to excessive incorrect PIN attempts;
+ * `pin_status` is `BLOCKED`
+ */
+ fun statusReason(statusReason: StatusReason) = statusReason(JsonField.of(statusReason))
+
+ /**
+ * Sets [Builder.statusReason] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.statusReason] with a well-typed [StatusReason] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun statusReason(statusReason: JsonField) = apply {
+ this.statusReason = statusReason
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [CardPinUpdatedWebhookEvent].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .cardToken()
+ * .eventType()
+ * .pinStatus()
+ * .statusReason()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CardPinUpdatedWebhookEvent =
+ CardPinUpdatedWebhookEvent(
+ checkRequired("cardToken", cardToken),
+ checkRequired("eventType", eventType),
+ checkRequired("pinStatus", pinStatus),
+ checkRequired("statusReason", statusReason),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): CardPinUpdatedWebhookEvent = apply {
+ if (validated) {
+ return@apply
+ }
+
+ cardToken()
+ eventType().validate()
+ pinStatus().validate()
+ statusReason().validate()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (cardToken.asKnown().isPresent) 1 else 0) +
+ (eventType.asKnown().getOrNull()?.validity() ?: 0) +
+ (pinStatus.asKnown().getOrNull()?.validity() ?: 0) +
+ (statusReason.asKnown().getOrNull()?.validity() ?: 0)
+
+ /** The type of event that occurred. */
+ class EventType @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val CARD_PIN_UPDATED = of("card.pin_updated")
+
+ @JvmStatic fun of(value: String) = EventType(JsonField.of(value))
+ }
+
+ /** An enum containing [EventType]'s known values. */
+ enum class Known {
+ CARD_PIN_UPDATED
+ }
+
+ /**
+ * An enum containing [EventType]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [EventType] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ CARD_PIN_UPDATED,
+ /**
+ * An enum member indicating that [EventType] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ CARD_PIN_UPDATED -> Value.CARD_PIN_UPDATED
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws LithicInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ CARD_PIN_UPDATED -> Known.CARD_PIN_UPDATED
+ else -> throw LithicInvalidDataException("Unknown EventType: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): EventType = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is EventType && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** The card's PIN status after the update */
+ class PinStatus @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val OK = of("OK")
+
+ @JvmField val BLOCKED = of("BLOCKED")
+
+ @JvmStatic fun of(value: String) = PinStatus(JsonField.of(value))
+ }
+
+ /** An enum containing [PinStatus]'s known values. */
+ enum class Known {
+ OK,
+ BLOCKED,
+ }
+
+ /**
+ * An enum containing [PinStatus]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [PinStatus] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ OK,
+ BLOCKED,
+ /**
+ * An enum member indicating that [PinStatus] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ OK -> Value.OK
+ BLOCKED -> Value.BLOCKED
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws LithicInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ OK -> Known.OK
+ BLOCKED -> Known.BLOCKED
+ else -> throw LithicInvalidDataException("Unknown PinStatus: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): PinStatus = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is PinStatus && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /**
+ * The reason for the PIN update:
+ * * `PIN_SET` - The PIN was set for the first time; `pin_status` is `OK`
+ * * `PIN_CHANGED` - The PIN was changed, including when changing a blocked PIN; `pin_status` is
+ * `OK`
+ * * `PIN_UNBLOCKED` - The PIN was unblocked without changing it; `pin_status` is `OK`
+ * * `EXCESSIVE_PIN_ATTEMPTS` - The PIN was blocked due to excessive incorrect PIN attempts;
+ * `pin_status` is `BLOCKED`
+ */
+ class StatusReason @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val PIN_SET = of("PIN_SET")
+
+ @JvmField val PIN_CHANGED = of("PIN_CHANGED")
+
+ @JvmField val PIN_UNBLOCKED = of("PIN_UNBLOCKED")
+
+ @JvmField val EXCESSIVE_PIN_ATTEMPTS = of("EXCESSIVE_PIN_ATTEMPTS")
+
+ @JvmStatic fun of(value: String) = StatusReason(JsonField.of(value))
+ }
+
+ /** An enum containing [StatusReason]'s known values. */
+ enum class Known {
+ PIN_SET,
+ PIN_CHANGED,
+ PIN_UNBLOCKED,
+ EXCESSIVE_PIN_ATTEMPTS,
+ }
+
+ /**
+ * An enum containing [StatusReason]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [StatusReason] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ PIN_SET,
+ PIN_CHANGED,
+ PIN_UNBLOCKED,
+ EXCESSIVE_PIN_ATTEMPTS,
+ /**
+ * An enum member indicating that [StatusReason] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ PIN_SET -> Value.PIN_SET
+ PIN_CHANGED -> Value.PIN_CHANGED
+ PIN_UNBLOCKED -> Value.PIN_UNBLOCKED
+ EXCESSIVE_PIN_ATTEMPTS -> Value.EXCESSIVE_PIN_ATTEMPTS
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws LithicInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ PIN_SET -> Known.PIN_SET
+ PIN_CHANGED -> Known.PIN_CHANGED
+ PIN_UNBLOCKED -> Known.PIN_UNBLOCKED
+ EXCESSIVE_PIN_ATTEMPTS -> Known.EXCESSIVE_PIN_ATTEMPTS
+ else -> throw LithicInvalidDataException("Unknown StatusReason: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): StatusReason = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is StatusReason && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CardPinUpdatedWebhookEvent &&
+ cardToken == other.cardToken &&
+ eventType == other.eventType &&
+ pinStatus == other.pinStatus &&
+ statusReason == other.statusReason &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(cardToken, eventType, pinStatus, statusReason, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CardPinUpdatedWebhookEvent{cardToken=$cardToken, eventType=$eventType, pinStatus=$pinStatus, statusReason=$statusReason, additionalProperties=$additionalProperties}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
index 09545c5c3..223c54a0e 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
@@ -24,7 +24,8 @@ import kotlin.jvm.optionals.getOrNull
* Initiate print and shipment of a duplicate physical card (e.g. card is physically damaged). The
* PAN, expiry, and CVC2 will remain the same and the original card can continue to be used until
* the new card is activated. Only applies to cards of type `PHYSICAL`. A card can be reissued or
- * renewed a total of 8 times.
+ * renewed a total of 8 times. Returns `409` if the card is still ongoing manufacturing when using
+ * Thales as a manufacturer.
*/
class CardReissueParams
private constructor(
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
index 248bcf9d2..ed1de2970 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
@@ -29,6 +29,7 @@ import kotlin.jvm.optionals.getOrNull
* `PHYSICAL` card can be reissued or renewed a total of 8 times. For `VIRTUAL`, the card will
* retain the same card token and PAN and receive an updated expiry and CVC2 code. `product_id`,
* `shipping_method`, `shipping_address`, `carrier` are only relevant for renewing `PHYSICAL` cards.
+ * Returns `409` if the card is still ongoing manufacturing when using Thales as a manufacturer.
*/
class CardRenewParams
private constructor(
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 fb5a6891b..9c2f276b1 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
@@ -85,6 +85,8 @@ private constructor(
* - card_transaction.updated: Occurs when a card transaction happens.
* - card.converted: Occurs when a card is converted from virtual to physical cards.
* - card.created: Occurs when a new card is created.
+ * - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or blocked due to
+ * excessive incorrect PIN attempts.
* - card.reissued: Occurs when a card is reissued.
* - card.renewed: Occurs when a card is renewed.
* - card.shipped: Occurs when a card is shipped.
@@ -304,6 +306,8 @@ private constructor(
* - card_transaction.updated: Occurs when a card transaction happens.
* - card.converted: Occurs when a card is converted from virtual to physical cards.
* - card.created: Occurs when a new card is created.
+ * - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or blocked due
+ * to excessive incorrect PIN attempts.
* - card.reissued: Occurs when a card is reissued.
* - card.renewed: Occurs when a card is renewed.
* - card.shipped: Occurs when a card is shipped.
@@ -522,6 +526,8 @@ private constructor(
* - card_transaction.updated: Occurs when a card transaction happens.
* - card.converted: Occurs when a card is converted from virtual to physical cards.
* - card.created: Occurs when a new card is created.
+ * - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or blocked due to
+ * excessive incorrect PIN attempts.
* - card.reissued: Occurs when a card is reissued.
* - card.renewed: Occurs when a card is renewed.
* - card.shipped: Occurs when a card is shipped.
@@ -656,6 +662,8 @@ private constructor(
@JvmField val CARD_CREATED = of("card.created")
+ @JvmField val CARD_PIN_UPDATED = of("card.pin_updated")
+
@JvmField val CARD_REISSUED = of("card.reissued")
@JvmField val CARD_RENEWED = of("card.renewed")
@@ -779,6 +787,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -852,6 +861,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -930,6 +940,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Value.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Value.CARD_CONVERTED
CARD_CREATED -> Value.CARD_CREATED
+ CARD_PIN_UPDATED -> Value.CARD_PIN_UPDATED
CARD_REISSUED -> Value.CARD_REISSUED
CARD_RENEWED -> Value.CARD_RENEWED
CARD_SHIPPED -> Value.CARD_SHIPPED
@@ -1011,6 +1022,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Known.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Known.CARD_CONVERTED
CARD_CREATED -> Known.CARD_CREATED
+ CARD_PIN_UPDATED -> Known.CARD_PIN_UPDATED
CARD_REISSUED -> Known.CARD_REISSUED
CARD_RENEWED -> Known.CARD_RENEWED
CARD_SHIPPED -> Known.CARD_SHIPPED
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 3b0ffb8cf..527d9d30e 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
@@ -343,6 +343,8 @@ private constructor(
* - card_transaction.updated: Occurs when a card transaction happens.
* - card.converted: Occurs when a card is converted from virtual to physical cards.
* - card.created: Occurs when a new card is created.
+ * - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or blocked due to
+ * excessive incorrect PIN attempts.
* - card.reissued: Occurs when a card is reissued.
* - card.renewed: Occurs when a card is renewed.
* - card.shipped: Occurs when a card is shipped.
@@ -477,6 +479,8 @@ private constructor(
@JvmField val CARD_CREATED = of("card.created")
+ @JvmField val CARD_PIN_UPDATED = of("card.pin_updated")
+
@JvmField val CARD_REISSUED = of("card.reissued")
@JvmField val CARD_RENEWED = of("card.renewed")
@@ -600,6 +604,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -673,6 +678,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -751,6 +757,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Value.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Value.CARD_CONVERTED
CARD_CREATED -> Value.CARD_CREATED
+ CARD_PIN_UPDATED -> Value.CARD_PIN_UPDATED
CARD_REISSUED -> Value.CARD_REISSUED
CARD_RENEWED -> Value.CARD_RENEWED
CARD_SHIPPED -> Value.CARD_SHIPPED
@@ -832,6 +839,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Known.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Known.CARD_CONVERTED
CARD_CREATED -> Known.CARD_CREATED
+ CARD_PIN_UPDATED -> Known.CARD_PIN_UPDATED
CARD_REISSUED -> Known.CARD_REISSUED
CARD_RENEWED -> Known.CARD_RENEWED
CARD_SHIPPED -> Known.CARD_SHIPPED
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 1ac9217f3..39d0b0c10 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
@@ -353,6 +353,8 @@ private constructor(
* - card_transaction.updated: Occurs when a card transaction happens.
* - card.converted: Occurs when a card is converted from virtual to physical cards.
* - card.created: Occurs when a new card is created.
+ * - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or blocked due to
+ * excessive incorrect PIN attempts.
* - card.reissued: Occurs when a card is reissued.
* - card.renewed: Occurs when a card is renewed.
* - card.shipped: Occurs when a card is shipped.
@@ -487,6 +489,8 @@ private constructor(
@JvmField val CARD_CREATED = of("card.created")
+ @JvmField val CARD_PIN_UPDATED = of("card.pin_updated")
+
@JvmField val CARD_REISSUED = of("card.reissued")
@JvmField val CARD_RENEWED = of("card.renewed")
@@ -610,6 +614,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -683,6 +688,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -761,6 +767,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Value.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Value.CARD_CONVERTED
CARD_CREATED -> Value.CARD_CREATED
+ CARD_PIN_UPDATED -> Value.CARD_PIN_UPDATED
CARD_REISSUED -> Value.CARD_REISSUED
CARD_RENEWED -> Value.CARD_RENEWED
CARD_SHIPPED -> Value.CARD_SHIPPED
@@ -842,6 +849,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Known.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Known.CARD_CONVERTED
CARD_CREATED -> Known.CARD_CREATED
+ CARD_PIN_UPDATED -> Known.CARD_PIN_UPDATED
CARD_REISSUED -> Known.CARD_REISSUED
CARD_RENEWED -> Known.CARD_RENEWED
CARD_SHIPPED -> Known.CARD_SHIPPED
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 120a4e9c0..729baa419 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
@@ -676,6 +676,8 @@ private constructor(
* - card_transaction.updated: Occurs when a card transaction happens.
* - card.converted: Occurs when a card is converted from virtual to physical cards.
* - card.created: Occurs when a new card is created.
+ * - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or blocked due to
+ * excessive incorrect PIN attempts.
* - card.reissued: Occurs when a card is reissued.
* - card.renewed: Occurs when a card is renewed.
* - card.shipped: Occurs when a card is shipped.
@@ -810,6 +812,8 @@ private constructor(
@JvmField val CARD_CREATED = of("card.created")
+ @JvmField val CARD_PIN_UPDATED = of("card.pin_updated")
+
@JvmField val CARD_REISSUED = of("card.reissued")
@JvmField val CARD_RENEWED = of("card.renewed")
@@ -933,6 +937,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -1006,6 +1011,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -1084,6 +1090,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Value.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Value.CARD_CONVERTED
CARD_CREATED -> Value.CARD_CREATED
+ CARD_PIN_UPDATED -> Value.CARD_PIN_UPDATED
CARD_REISSUED -> Value.CARD_REISSUED
CARD_RENEWED -> Value.CARD_RENEWED
CARD_SHIPPED -> Value.CARD_SHIPPED
@@ -1165,6 +1172,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Known.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Known.CARD_CONVERTED
CARD_CREATED -> Known.CARD_CREATED
+ CARD_PIN_UPDATED -> Known.CARD_PIN_UPDATED
CARD_REISSUED -> Known.CARD_REISSUED
CARD_RENEWED -> Known.CARD_RENEWED
CARD_SHIPPED -> Known.CARD_SHIPPED
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 0bee59c6c..094ce1721 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
@@ -471,6 +471,8 @@ private constructor(
@JvmField val CARD_CREATED = of("card.created")
+ @JvmField val CARD_PIN_UPDATED = of("card.pin_updated")
+
@JvmField val CARD_REISSUED = of("card.reissued")
@JvmField val CARD_RENEWED = of("card.renewed")
@@ -594,6 +596,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -667,6 +670,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -745,6 +749,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Value.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Value.CARD_CONVERTED
CARD_CREATED -> Value.CARD_CREATED
+ CARD_PIN_UPDATED -> Value.CARD_PIN_UPDATED
CARD_REISSUED -> Value.CARD_REISSUED
CARD_RENEWED -> Value.CARD_RENEWED
CARD_SHIPPED -> Value.CARD_SHIPPED
@@ -826,6 +831,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Known.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Known.CARD_CONVERTED
CARD_CREATED -> Known.CARD_CREATED
+ CARD_PIN_UPDATED -> Known.CARD_PIN_UPDATED
CARD_REISSUED -> Known.CARD_REISSUED
CARD_RENEWED -> Known.CARD_RENEWED
CARD_SHIPPED -> Known.CARD_SHIPPED
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 91de84e1c..a75dc9eb5 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
@@ -699,6 +699,8 @@ private constructor(
* - card_transaction.updated: Occurs when a card transaction happens.
* - card.converted: Occurs when a card is converted from virtual to physical cards.
* - card.created: Occurs when a new card is created.
+ * - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or blocked due to
+ * excessive incorrect PIN attempts.
* - card.reissued: Occurs when a card is reissued.
* - card.renewed: Occurs when a card is renewed.
* - card.shipped: Occurs when a card is shipped.
@@ -833,6 +835,8 @@ private constructor(
@JvmField val CARD_CREATED = of("card.created")
+ @JvmField val CARD_PIN_UPDATED = of("card.pin_updated")
+
@JvmField val CARD_REISSUED = of("card.reissued")
@JvmField val CARD_RENEWED = of("card.renewed")
@@ -956,6 +960,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -1029,6 +1034,7 @@ private constructor(
CARD_TRANSACTION_UPDATED,
CARD_CONVERTED,
CARD_CREATED,
+ CARD_PIN_UPDATED,
CARD_REISSUED,
CARD_RENEWED,
CARD_SHIPPED,
@@ -1107,6 +1113,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Value.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Value.CARD_CONVERTED
CARD_CREATED -> Value.CARD_CREATED
+ CARD_PIN_UPDATED -> Value.CARD_PIN_UPDATED
CARD_REISSUED -> Value.CARD_REISSUED
CARD_RENEWED -> Value.CARD_RENEWED
CARD_SHIPPED -> Value.CARD_SHIPPED
@@ -1188,6 +1195,7 @@ private constructor(
CARD_TRANSACTION_UPDATED -> Known.CARD_TRANSACTION_UPDATED
CARD_CONVERTED -> Known.CARD_CONVERTED
CARD_CREATED -> Known.CARD_CREATED
+ CARD_PIN_UPDATED -> Known.CARD_PIN_UPDATED
CARD_REISSUED -> Known.CARD_REISSUED
CARD_RENEWED -> Known.CARD_RENEWED
CARD_SHIPPED -> Known.CARD_SHIPPED
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt
index 7643d0349..f0a8f0132 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt
@@ -866,6 +866,8 @@ private constructor(
@JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+ @JvmField val EXTERNAL_STABLECOIN = of("EXTERNAL_STABLECOIN")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmStatic fun of(value: String) = ExternalPaymentCategory(JsonField.of(value))
@@ -878,6 +880,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
}
@@ -898,6 +901,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
/**
* An enum member indicating that [ExternalPaymentCategory] was instantiated with an
@@ -920,6 +924,7 @@ private constructor(
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Value.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Value.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
else -> Value._UNKNOWN
}
@@ -940,6 +945,7 @@ private constructor(
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Known.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Known.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
else -> throw LithicInvalidDataException("Unknown ExternalPaymentCategory: $value")
}
@@ -1792,6 +1798,16 @@ private constructor(
@JvmField val EXTERNAL_RTP_RELEASED = of("EXTERNAL_RTP_RELEASED")
+ @JvmField val EXTERNAL_STABLECOIN_INITIATED = of("EXTERNAL_STABLECOIN_INITIATED")
+
+ @JvmField val EXTERNAL_STABLECOIN_CANCELED = of("EXTERNAL_STABLECOIN_CANCELED")
+
+ @JvmField val EXTERNAL_STABLECOIN_SETTLED = of("EXTERNAL_STABLECOIN_SETTLED")
+
+ @JvmField val EXTERNAL_STABLECOIN_REVERSED = of("EXTERNAL_STABLECOIN_REVERSED")
+
+ @JvmField val EXTERNAL_STABLECOIN_RELEASED = of("EXTERNAL_STABLECOIN_RELEASED")
+
@JvmStatic fun of(value: String) = ExternalPaymentEventType(JsonField.of(value))
}
@@ -1827,6 +1843,11 @@ private constructor(
EXTERNAL_RTP_SETTLED,
EXTERNAL_RTP_REVERSED,
EXTERNAL_RTP_RELEASED,
+ EXTERNAL_STABLECOIN_INITIATED,
+ EXTERNAL_STABLECOIN_CANCELED,
+ EXTERNAL_STABLECOIN_SETTLED,
+ EXTERNAL_STABLECOIN_REVERSED,
+ EXTERNAL_STABLECOIN_RELEASED,
}
/**
@@ -1871,6 +1892,11 @@ private constructor(
EXTERNAL_RTP_SETTLED,
EXTERNAL_RTP_REVERSED,
EXTERNAL_RTP_RELEASED,
+ EXTERNAL_STABLECOIN_INITIATED,
+ EXTERNAL_STABLECOIN_CANCELED,
+ EXTERNAL_STABLECOIN_SETTLED,
+ EXTERNAL_STABLECOIN_REVERSED,
+ EXTERNAL_STABLECOIN_RELEASED,
/**
* An enum member indicating that [ExternalPaymentEventType] was instantiated with
* an unknown value.
@@ -1917,6 +1943,11 @@ private constructor(
EXTERNAL_RTP_SETTLED -> Value.EXTERNAL_RTP_SETTLED
EXTERNAL_RTP_REVERSED -> Value.EXTERNAL_RTP_REVERSED
EXTERNAL_RTP_RELEASED -> Value.EXTERNAL_RTP_RELEASED
+ EXTERNAL_STABLECOIN_INITIATED -> Value.EXTERNAL_STABLECOIN_INITIATED
+ EXTERNAL_STABLECOIN_CANCELED -> Value.EXTERNAL_STABLECOIN_CANCELED
+ EXTERNAL_STABLECOIN_SETTLED -> Value.EXTERNAL_STABLECOIN_SETTLED
+ EXTERNAL_STABLECOIN_REVERSED -> Value.EXTERNAL_STABLECOIN_REVERSED
+ EXTERNAL_STABLECOIN_RELEASED -> Value.EXTERNAL_STABLECOIN_RELEASED
else -> Value._UNKNOWN
}
@@ -1961,6 +1992,11 @@ private constructor(
EXTERNAL_RTP_SETTLED -> Known.EXTERNAL_RTP_SETTLED
EXTERNAL_RTP_REVERSED -> Known.EXTERNAL_RTP_REVERSED
EXTERNAL_RTP_RELEASED -> Known.EXTERNAL_RTP_RELEASED
+ EXTERNAL_STABLECOIN_INITIATED -> Known.EXTERNAL_STABLECOIN_INITIATED
+ EXTERNAL_STABLECOIN_CANCELED -> Known.EXTERNAL_STABLECOIN_CANCELED
+ EXTERNAL_STABLECOIN_SETTLED -> Known.EXTERNAL_STABLECOIN_SETTLED
+ EXTERNAL_STABLECOIN_REVERSED -> Known.EXTERNAL_STABLECOIN_REVERSED
+ EXTERNAL_STABLECOIN_RELEASED -> Known.EXTERNAL_STABLECOIN_RELEASED
else ->
throw LithicInvalidDataException("Unknown ExternalPaymentEventType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
index 201de3314..9eef74f3a 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
@@ -1006,6 +1006,8 @@ private constructor(
@JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+ @JvmField val EXTERNAL_STABLECOIN = of("EXTERNAL_STABLECOIN")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmStatic fun of(value: String) = ExternalPaymentCategory(JsonField.of(value))
@@ -1018,6 +1020,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
}
@@ -1038,6 +1041,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
/**
* An enum member indicating that [ExternalPaymentCategory] was instantiated with an
@@ -1060,6 +1064,7 @@ private constructor(
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Value.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Value.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
else -> Value._UNKNOWN
}
@@ -1080,6 +1085,7 @@ private constructor(
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Known.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Known.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
else -> throw LithicInvalidDataException("Unknown ExternalPaymentCategory: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt
index c4a356486..1969781a5 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt
@@ -386,6 +386,8 @@ private constructor(
@JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+ @JvmField val EXTERNAL_STABLECOIN = of("EXTERNAL_STABLECOIN")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmStatic fun of(value: String) = ExternalPaymentCategory(JsonField.of(value))
@@ -398,6 +400,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
}
@@ -418,6 +421,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
/**
* An enum member indicating that [ExternalPaymentCategory] was instantiated with an
@@ -440,6 +444,7 @@ private constructor(
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Value.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Value.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
else -> Value._UNKNOWN
}
@@ -460,6 +465,7 @@ private constructor(
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Known.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Known.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
else -> throw LithicInvalidDataException("Unknown ExternalPaymentCategory: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountOpenToBuyRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountOpenToBuyRetrieveParams.kt
new file mode 100644
index 000000000..1802d79dd
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountOpenToBuyRetrieveParams.kt
@@ -0,0 +1,220 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+import com.lithic.api.core.Params
+import com.lithic.api.core.http.Headers
+import com.lithic.api.core.http.QueryParams
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/**
+ * Get the funds available for card spend backed by a given Security Account, along with the
+ * balances that amount is derived from.
+ *
+ * Open to buy is the amount Lithic authorizes card spend against. It is not a stored balance, so it
+ * is recalculated on every request from the Security Account, the funds held against spend Lithic
+ * has already paid out to the networks on your behalf, and the spend that has not yet been
+ * collected. The accounts that feed the calculation depend on your program setup, so
+ * `summary.settled_funds` is `null` outside Commercial Charge.
+ *
+ * Supported for Commercial Charge, Dynamic Reserve, and Secured Charge programs. Returns `404` if
+ * `financial_account_token` is not a Security Account you own, or if your program setup does not
+ * use an open to buy calculation.
+ */
+class FinancialAccountOpenToBuyRetrieveParams
+private constructor(
+ private val financialAccountToken: String?,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ fun financialAccountToken(): Optional = Optional.ofNullable(financialAccountToken)
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun none(): FinancialAccountOpenToBuyRetrieveParams = builder().build()
+
+ /**
+ * Returns a mutable builder for constructing an instance of
+ * [FinancialAccountOpenToBuyRetrieveParams].
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [FinancialAccountOpenToBuyRetrieveParams]. */
+ class Builder internal constructor() {
+
+ private var financialAccountToken: String? = null
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(
+ financialAccountOpenToBuyRetrieveParams: FinancialAccountOpenToBuyRetrieveParams
+ ) = apply {
+ financialAccountToken = financialAccountOpenToBuyRetrieveParams.financialAccountToken
+ additionalHeaders =
+ financialAccountOpenToBuyRetrieveParams.additionalHeaders.toBuilder()
+ additionalQueryParams =
+ financialAccountOpenToBuyRetrieveParams.additionalQueryParams.toBuilder()
+ }
+
+ fun financialAccountToken(financialAccountToken: String?) = apply {
+ this.financialAccountToken = financialAccountToken
+ }
+
+ /**
+ * Alias for calling [Builder.financialAccountToken] with
+ * `financialAccountToken.orElse(null)`.
+ */
+ fun financialAccountToken(financialAccountToken: Optional) =
+ financialAccountToken(financialAccountToken.getOrNull())
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [FinancialAccountOpenToBuyRetrieveParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): FinancialAccountOpenToBuyRetrieveParams =
+ FinancialAccountOpenToBuyRetrieveParams(
+ financialAccountToken,
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _pathParam(index: Int): String =
+ when (index) {
+ 0 -> financialAccountToken ?: ""
+ else -> ""
+ }
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is FinancialAccountOpenToBuyRetrieveParams &&
+ financialAccountToken == other.financialAccountToken &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int =
+ Objects.hash(financialAccountToken, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "FinancialAccountOpenToBuyRetrieveParams{financialAccountToken=$financialAccountToken, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt
index d7f28b871..0148e166a 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialEvent.kt
@@ -555,6 +555,16 @@ private constructor(
@JvmField val EXTERNAL_RTP_SETTLED = of("EXTERNAL_RTP_SETTLED")
+ @JvmField val EXTERNAL_STABLECOIN_CANCELED = of("EXTERNAL_STABLECOIN_CANCELED")
+
+ @JvmField val EXTERNAL_STABLECOIN_INITIATED = of("EXTERNAL_STABLECOIN_INITIATED")
+
+ @JvmField val EXTERNAL_STABLECOIN_RELEASED = of("EXTERNAL_STABLECOIN_RELEASED")
+
+ @JvmField val EXTERNAL_STABLECOIN_REVERSED = of("EXTERNAL_STABLECOIN_REVERSED")
+
+ @JvmField val EXTERNAL_STABLECOIN_SETTLED = of("EXTERNAL_STABLECOIN_SETTLED")
+
@JvmField val EXTERNAL_TRANSFER_CANCELED = of("EXTERNAL_TRANSFER_CANCELED")
@JvmField val EXTERNAL_TRANSFER_INITIATED = of("EXTERNAL_TRANSFER_INITIATED")
@@ -575,10 +585,18 @@ private constructor(
@JvmField val EXTERNAL_WIRE_SETTLED = of("EXTERNAL_WIRE_SETTLED")
+ @JvmField val FEE = of("FEE")
+
+ @JvmField val FEE_REVERSAL = of("FEE_REVERSAL")
+
@JvmField val FINANCIAL_AUTHORIZATION = of("FINANCIAL_AUTHORIZATION")
@JvmField val FINANCIAL_CREDIT_AUTHORIZATION = of("FINANCIAL_CREDIT_AUTHORIZATION")
+ @JvmField val INSTALLMENT_FEE = of("INSTALLMENT_FEE")
+
+ @JvmField val INSTALLMENT_FEE_REVERSAL = of("INSTALLMENT_FEE_REVERSAL")
+
@JvmField val INTEREST = of("INTEREST")
@JvmField val INTEREST_REVERSAL = of("INTEREST_REVERSAL")
@@ -699,6 +717,11 @@ private constructor(
EXTERNAL_RTP_RELEASED,
EXTERNAL_RTP_REVERSED,
EXTERNAL_RTP_SETTLED,
+ EXTERNAL_STABLECOIN_CANCELED,
+ EXTERNAL_STABLECOIN_INITIATED,
+ EXTERNAL_STABLECOIN_RELEASED,
+ EXTERNAL_STABLECOIN_REVERSED,
+ EXTERNAL_STABLECOIN_SETTLED,
EXTERNAL_TRANSFER_CANCELED,
EXTERNAL_TRANSFER_INITIATED,
EXTERNAL_TRANSFER_RELEASED,
@@ -709,8 +732,12 @@ private constructor(
EXTERNAL_WIRE_RELEASED,
EXTERNAL_WIRE_REVERSED,
EXTERNAL_WIRE_SETTLED,
+ FEE,
+ FEE_REVERSAL,
FINANCIAL_AUTHORIZATION,
FINANCIAL_CREDIT_AUTHORIZATION,
+ INSTALLMENT_FEE,
+ INSTALLMENT_FEE_REVERSAL,
INTEREST,
INTEREST_REVERSAL,
INTERNAL_ADJUSTMENT,
@@ -807,6 +834,11 @@ private constructor(
EXTERNAL_RTP_RELEASED,
EXTERNAL_RTP_REVERSED,
EXTERNAL_RTP_SETTLED,
+ EXTERNAL_STABLECOIN_CANCELED,
+ EXTERNAL_STABLECOIN_INITIATED,
+ EXTERNAL_STABLECOIN_RELEASED,
+ EXTERNAL_STABLECOIN_REVERSED,
+ EXTERNAL_STABLECOIN_SETTLED,
EXTERNAL_TRANSFER_CANCELED,
EXTERNAL_TRANSFER_INITIATED,
EXTERNAL_TRANSFER_RELEASED,
@@ -817,8 +849,12 @@ private constructor(
EXTERNAL_WIRE_RELEASED,
EXTERNAL_WIRE_REVERSED,
EXTERNAL_WIRE_SETTLED,
+ FEE,
+ FEE_REVERSAL,
FINANCIAL_AUTHORIZATION,
FINANCIAL_CREDIT_AUTHORIZATION,
+ INSTALLMENT_FEE,
+ INSTALLMENT_FEE_REVERSAL,
INTEREST,
INTEREST_REVERSAL,
INTERNAL_ADJUSTMENT,
@@ -919,6 +955,11 @@ private constructor(
EXTERNAL_RTP_RELEASED -> Value.EXTERNAL_RTP_RELEASED
EXTERNAL_RTP_REVERSED -> Value.EXTERNAL_RTP_REVERSED
EXTERNAL_RTP_SETTLED -> Value.EXTERNAL_RTP_SETTLED
+ EXTERNAL_STABLECOIN_CANCELED -> Value.EXTERNAL_STABLECOIN_CANCELED
+ EXTERNAL_STABLECOIN_INITIATED -> Value.EXTERNAL_STABLECOIN_INITIATED
+ EXTERNAL_STABLECOIN_RELEASED -> Value.EXTERNAL_STABLECOIN_RELEASED
+ EXTERNAL_STABLECOIN_REVERSED -> Value.EXTERNAL_STABLECOIN_REVERSED
+ EXTERNAL_STABLECOIN_SETTLED -> Value.EXTERNAL_STABLECOIN_SETTLED
EXTERNAL_TRANSFER_CANCELED -> Value.EXTERNAL_TRANSFER_CANCELED
EXTERNAL_TRANSFER_INITIATED -> Value.EXTERNAL_TRANSFER_INITIATED
EXTERNAL_TRANSFER_RELEASED -> Value.EXTERNAL_TRANSFER_RELEASED
@@ -929,8 +970,12 @@ private constructor(
EXTERNAL_WIRE_RELEASED -> Value.EXTERNAL_WIRE_RELEASED
EXTERNAL_WIRE_REVERSED -> Value.EXTERNAL_WIRE_REVERSED
EXTERNAL_WIRE_SETTLED -> Value.EXTERNAL_WIRE_SETTLED
+ FEE -> Value.FEE
+ FEE_REVERSAL -> Value.FEE_REVERSAL
FINANCIAL_AUTHORIZATION -> Value.FINANCIAL_AUTHORIZATION
FINANCIAL_CREDIT_AUTHORIZATION -> Value.FINANCIAL_CREDIT_AUTHORIZATION
+ INSTALLMENT_FEE -> Value.INSTALLMENT_FEE
+ INSTALLMENT_FEE_REVERSAL -> Value.INSTALLMENT_FEE_REVERSAL
INTEREST -> Value.INTEREST
INTEREST_REVERSAL -> Value.INTEREST_REVERSAL
INTERNAL_ADJUSTMENT -> Value.INTERNAL_ADJUSTMENT
@@ -1029,6 +1074,11 @@ private constructor(
EXTERNAL_RTP_RELEASED -> Known.EXTERNAL_RTP_RELEASED
EXTERNAL_RTP_REVERSED -> Known.EXTERNAL_RTP_REVERSED
EXTERNAL_RTP_SETTLED -> Known.EXTERNAL_RTP_SETTLED
+ EXTERNAL_STABLECOIN_CANCELED -> Known.EXTERNAL_STABLECOIN_CANCELED
+ EXTERNAL_STABLECOIN_INITIATED -> Known.EXTERNAL_STABLECOIN_INITIATED
+ EXTERNAL_STABLECOIN_RELEASED -> Known.EXTERNAL_STABLECOIN_RELEASED
+ EXTERNAL_STABLECOIN_REVERSED -> Known.EXTERNAL_STABLECOIN_REVERSED
+ EXTERNAL_STABLECOIN_SETTLED -> Known.EXTERNAL_STABLECOIN_SETTLED
EXTERNAL_TRANSFER_CANCELED -> Known.EXTERNAL_TRANSFER_CANCELED
EXTERNAL_TRANSFER_INITIATED -> Known.EXTERNAL_TRANSFER_INITIATED
EXTERNAL_TRANSFER_RELEASED -> Known.EXTERNAL_TRANSFER_RELEASED
@@ -1039,8 +1089,12 @@ private constructor(
EXTERNAL_WIRE_RELEASED -> Known.EXTERNAL_WIRE_RELEASED
EXTERNAL_WIRE_REVERSED -> Known.EXTERNAL_WIRE_REVERSED
EXTERNAL_WIRE_SETTLED -> Known.EXTERNAL_WIRE_SETTLED
+ FEE -> Known.FEE
+ FEE_REVERSAL -> Known.FEE_REVERSAL
FINANCIAL_AUTHORIZATION -> Known.FINANCIAL_AUTHORIZATION
FINANCIAL_CREDIT_AUTHORIZATION -> Known.FINANCIAL_CREDIT_AUTHORIZATION
+ INSTALLMENT_FEE -> Known.INSTALLMENT_FEE
+ INSTALLMENT_FEE_REVERSAL -> Known.INSTALLMENT_FEE_REVERSAL
INTEREST -> Known.INTEREST
INTEREST_REVERSAL -> Known.INTEREST_REVERSAL
INTERNAL_ADJUSTMENT -> Known.INTERNAL_ADJUSTMENT
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt
index f84492a1d..46c3eecd9 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt
@@ -1449,6 +1449,10 @@ private constructor(
@JvmField val INTEREST_REVERSAL = of("INTEREST_REVERSAL")
+ @JvmField val INSTALLMENT_FEE = of("INSTALLMENT_FEE")
+
+ @JvmField val INSTALLMENT_FEE_REVERSAL = of("INSTALLMENT_FEE_REVERSAL")
+
@JvmField val LATE_PAYMENT = of("LATE_PAYMENT")
@JvmField val LATE_PAYMENT_REVERSAL = of("LATE_PAYMENT_REVERSAL")
@@ -1485,6 +1489,10 @@ private constructor(
@JvmField val MONTHLY_REVERSAL = of("MONTHLY_REVERSAL")
+ @JvmField val FEE = of("FEE")
+
+ @JvmField val FEE_REVERSAL = of("FEE_REVERSAL")
+
@JvmStatic fun of(value: String) = ManagementOperationEventType(JsonField.of(value))
}
@@ -1497,6 +1505,8 @@ private constructor(
CURRENCY_CONVERSION_REVERSAL,
INTEREST,
INTEREST_REVERSAL,
+ INSTALLMENT_FEE,
+ INSTALLMENT_FEE_REVERSAL,
LATE_PAYMENT,
LATE_PAYMENT_REVERSAL,
BILLING_ERROR,
@@ -1515,6 +1525,8 @@ private constructor(
QUARTERLY_REVERSAL,
MONTHLY,
MONTHLY_REVERSAL,
+ FEE,
+ FEE_REVERSAL,
}
/**
@@ -1536,6 +1548,8 @@ private constructor(
CURRENCY_CONVERSION_REVERSAL,
INTEREST,
INTEREST_REVERSAL,
+ INSTALLMENT_FEE,
+ INSTALLMENT_FEE_REVERSAL,
LATE_PAYMENT,
LATE_PAYMENT_REVERSAL,
BILLING_ERROR,
@@ -1554,6 +1568,8 @@ private constructor(
QUARTERLY_REVERSAL,
MONTHLY,
MONTHLY_REVERSAL,
+ FEE,
+ FEE_REVERSAL,
/**
* An enum member indicating that [ManagementOperationEventType] was instantiated with
* an unknown value.
@@ -1577,6 +1593,8 @@ private constructor(
CURRENCY_CONVERSION_REVERSAL -> Value.CURRENCY_CONVERSION_REVERSAL
INTEREST -> Value.INTEREST
INTEREST_REVERSAL -> Value.INTEREST_REVERSAL
+ INSTALLMENT_FEE -> Value.INSTALLMENT_FEE
+ INSTALLMENT_FEE_REVERSAL -> Value.INSTALLMENT_FEE_REVERSAL
LATE_PAYMENT -> Value.LATE_PAYMENT
LATE_PAYMENT_REVERSAL -> Value.LATE_PAYMENT_REVERSAL
BILLING_ERROR -> Value.BILLING_ERROR
@@ -1595,6 +1613,8 @@ private constructor(
QUARTERLY_REVERSAL -> Value.QUARTERLY_REVERSAL
MONTHLY -> Value.MONTHLY
MONTHLY_REVERSAL -> Value.MONTHLY_REVERSAL
+ FEE -> Value.FEE
+ FEE_REVERSAL -> Value.FEE_REVERSAL
else -> Value._UNKNOWN
}
@@ -1616,6 +1636,8 @@ private constructor(
CURRENCY_CONVERSION_REVERSAL -> Known.CURRENCY_CONVERSION_REVERSAL
INTEREST -> Known.INTEREST
INTEREST_REVERSAL -> Known.INTEREST_REVERSAL
+ INSTALLMENT_FEE -> Known.INSTALLMENT_FEE
+ INSTALLMENT_FEE_REVERSAL -> Known.INSTALLMENT_FEE_REVERSAL
LATE_PAYMENT -> Known.LATE_PAYMENT
LATE_PAYMENT_REVERSAL -> Known.LATE_PAYMENT_REVERSAL
BILLING_ERROR -> Known.BILLING_ERROR
@@ -1634,6 +1656,8 @@ private constructor(
QUARTERLY_REVERSAL -> Known.QUARTERLY_REVERSAL
MONTHLY -> Known.MONTHLY
MONTHLY_REVERSAL -> Known.MONTHLY_REVERSAL
+ FEE -> Known.FEE
+ FEE_REVERSAL -> Known.FEE_REVERSAL
else ->
throw LithicInvalidDataException("Unknown ManagementOperationEventType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt
index 744006b8a..7820698a4 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt
@@ -2013,6 +2013,10 @@ private constructor(
@JvmField val INTEREST_REVERSAL = of("INTEREST_REVERSAL")
+ @JvmField val INSTALLMENT_FEE = of("INSTALLMENT_FEE")
+
+ @JvmField val INSTALLMENT_FEE_REVERSAL = of("INSTALLMENT_FEE_REVERSAL")
+
@JvmField val LATE_PAYMENT = of("LATE_PAYMENT")
@JvmField val LATE_PAYMENT_REVERSAL = of("LATE_PAYMENT_REVERSAL")
@@ -2049,6 +2053,10 @@ private constructor(
@JvmField val MONTHLY_REVERSAL = of("MONTHLY_REVERSAL")
+ @JvmField val FEE = of("FEE")
+
+ @JvmField val FEE_REVERSAL = of("FEE_REVERSAL")
+
@JvmStatic fun of(value: String) = ManagementOperationEventType(JsonField.of(value))
}
@@ -2061,6 +2069,8 @@ private constructor(
CURRENCY_CONVERSION_REVERSAL,
INTEREST,
INTEREST_REVERSAL,
+ INSTALLMENT_FEE,
+ INSTALLMENT_FEE_REVERSAL,
LATE_PAYMENT,
LATE_PAYMENT_REVERSAL,
BILLING_ERROR,
@@ -2079,6 +2089,8 @@ private constructor(
QUARTERLY_REVERSAL,
MONTHLY,
MONTHLY_REVERSAL,
+ FEE,
+ FEE_REVERSAL,
}
/**
@@ -2100,6 +2112,8 @@ private constructor(
CURRENCY_CONVERSION_REVERSAL,
INTEREST,
INTEREST_REVERSAL,
+ INSTALLMENT_FEE,
+ INSTALLMENT_FEE_REVERSAL,
LATE_PAYMENT,
LATE_PAYMENT_REVERSAL,
BILLING_ERROR,
@@ -2118,6 +2132,8 @@ private constructor(
QUARTERLY_REVERSAL,
MONTHLY,
MONTHLY_REVERSAL,
+ FEE,
+ FEE_REVERSAL,
/**
* An enum member indicating that [ManagementOperationEventType] was instantiated
* with an unknown value.
@@ -2141,6 +2157,8 @@ private constructor(
CURRENCY_CONVERSION_REVERSAL -> Value.CURRENCY_CONVERSION_REVERSAL
INTEREST -> Value.INTEREST
INTEREST_REVERSAL -> Value.INTEREST_REVERSAL
+ INSTALLMENT_FEE -> Value.INSTALLMENT_FEE
+ INSTALLMENT_FEE_REVERSAL -> Value.INSTALLMENT_FEE_REVERSAL
LATE_PAYMENT -> Value.LATE_PAYMENT
LATE_PAYMENT_REVERSAL -> Value.LATE_PAYMENT_REVERSAL
BILLING_ERROR -> Value.BILLING_ERROR
@@ -2159,6 +2177,8 @@ private constructor(
QUARTERLY_REVERSAL -> Value.QUARTERLY_REVERSAL
MONTHLY -> Value.MONTHLY
MONTHLY_REVERSAL -> Value.MONTHLY_REVERSAL
+ FEE -> Value.FEE
+ FEE_REVERSAL -> Value.FEE_REVERSAL
else -> Value._UNKNOWN
}
@@ -2180,6 +2200,8 @@ private constructor(
CURRENCY_CONVERSION_REVERSAL -> Known.CURRENCY_CONVERSION_REVERSAL
INTEREST -> Known.INTEREST
INTEREST_REVERSAL -> Known.INTEREST_REVERSAL
+ INSTALLMENT_FEE -> Known.INSTALLMENT_FEE
+ INSTALLMENT_FEE_REVERSAL -> Known.INSTALLMENT_FEE_REVERSAL
LATE_PAYMENT -> Known.LATE_PAYMENT
LATE_PAYMENT_REVERSAL -> Known.LATE_PAYMENT_REVERSAL
BILLING_ERROR -> Known.BILLING_ERROR
@@ -2198,6 +2220,8 @@ private constructor(
QUARTERLY_REVERSAL -> Known.QUARTERLY_REVERSAL
MONTHLY -> Known.MONTHLY
MONTHLY_REVERSAL -> Known.MONTHLY_REVERSAL
+ FEE -> Known.FEE
+ FEE_REVERSAL -> Known.FEE_REVERSAL
else ->
throw LithicInvalidDataException(
"Unknown ManagementOperationEventType: $value"
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/OpenToBuy.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/OpenToBuy.kt
new file mode 100644
index 000000000..ff00744f7
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/OpenToBuy.kt
@@ -0,0 +1,230 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.lithic.api.core.ExcludeMissing
+import com.lithic.api.core.JsonField
+import com.lithic.api.core.JsonMissing
+import com.lithic.api.core.JsonValue
+import com.lithic.api.core.checkRequired
+import com.lithic.api.errors.LithicInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import kotlin.jvm.optionals.getOrNull
+
+/** Open to Buy */
+class OpenToBuy
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val openToBuy: JsonField,
+ private val summary: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("open_to_buy") @ExcludeMissing openToBuy: JsonField = JsonMissing.of(),
+ @JsonProperty("summary")
+ @ExcludeMissing
+ summary: JsonField = JsonMissing.of(),
+ ) : this(openToBuy, summary, mutableMapOf())
+
+ /**
+ * Funds available for card spend backed by this Security Account, in the currency's smallest
+ * unit (e.g., cents for USD). Equal to the sum of the amounts in `summary`, and reaches zero
+ * once outstanding spend has consumed all available funding
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun openToBuy(): Long = openToBuy.getRequired("open_to_buy")
+
+ /**
+ * Balances that open to buy is derived from
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun summary(): OpenToBuySummary = summary.getRequired("summary")
+
+ /**
+ * Returns the raw JSON value of [openToBuy].
+ *
+ * Unlike [openToBuy], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("open_to_buy") @ExcludeMissing fun _openToBuy(): JsonField = openToBuy
+
+ /**
+ * Returns the raw JSON value of [summary].
+ *
+ * Unlike [summary], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("summary") @ExcludeMissing fun _summary(): JsonField = summary
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [OpenToBuy].
+ *
+ * The following fields are required:
+ * ```java
+ * .openToBuy()
+ * .summary()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [OpenToBuy]. */
+ class Builder internal constructor() {
+
+ private var openToBuy: JsonField? = null
+ private var summary: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(openToBuy: OpenToBuy) = apply {
+ this.openToBuy = openToBuy.openToBuy
+ summary = openToBuy.summary
+ additionalProperties = openToBuy.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * Funds available for card spend backed by this Security Account, in the currency's
+ * smallest unit (e.g., cents for USD). Equal to the sum of the amounts in `summary`, and
+ * reaches zero once outstanding spend has consumed all available funding
+ */
+ fun openToBuy(openToBuy: Long) = openToBuy(JsonField.of(openToBuy))
+
+ /**
+ * Sets [Builder.openToBuy] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.openToBuy] with a well-typed [Long] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun openToBuy(openToBuy: JsonField) = apply { this.openToBuy = openToBuy }
+
+ /** Balances that open to buy is derived from */
+ fun summary(summary: OpenToBuySummary) = summary(JsonField.of(summary))
+
+ /**
+ * Sets [Builder.summary] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.summary] with a well-typed [OpenToBuySummary] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun summary(summary: JsonField) = apply { this.summary = summary }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [OpenToBuy].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .openToBuy()
+ * .summary()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): OpenToBuy =
+ OpenToBuy(
+ checkRequired("openToBuy", openToBuy),
+ checkRequired("summary", summary),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): OpenToBuy = apply {
+ if (validated) {
+ return@apply
+ }
+
+ openToBuy()
+ summary().validate()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (openToBuy.asKnown().isPresent) 1 else 0) +
+ (summary.asKnown().getOrNull()?.validity() ?: 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is OpenToBuy &&
+ openToBuy == other.openToBuy &&
+ summary == other.summary &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(openToBuy, summary, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "OpenToBuy{openToBuy=$openToBuy, summary=$summary, additionalProperties=$additionalProperties}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/OpenToBuySummary.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/OpenToBuySummary.kt
new file mode 100644
index 000000000..4b028a6f1
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/OpenToBuySummary.kt
@@ -0,0 +1,301 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.lithic.api.core.ExcludeMissing
+import com.lithic.api.core.JsonField
+import com.lithic.api.core.JsonMissing
+import com.lithic.api.core.JsonValue
+import com.lithic.api.core.checkRequired
+import com.lithic.api.errors.LithicInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Open to Buy Summary */
+class OpenToBuySummary
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val security: JsonField,
+ private val settledFunds: JsonField,
+ private val totalOutstandingSpend: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("security") @ExcludeMissing security: JsonField = JsonMissing.of(),
+ @JsonProperty("settled_funds")
+ @ExcludeMissing
+ settledFunds: JsonField = JsonMissing.of(),
+ @JsonProperty("total_outstanding_spend")
+ @ExcludeMissing
+ totalOutstandingSpend: JsonField = JsonMissing.of(),
+ ) : this(security, settledFunds, totalOutstandingSpend, mutableMapOf())
+
+ /**
+ * Available balance of the Security Account backing card spend, in the currency's smallest unit
+ * (e.g., cents for USD)
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun security(): Long = security.getRequired("security")
+
+ /**
+ * Funding that has moved out of the Security Account to cover card spend Lithic has already
+ * paid out to the networks, in the currency's smallest unit (e.g., cents for USD). Open to buy
+ * counts it alongside `security`, and it clears once collected from your business clients. Only
+ * Commercial Charge tracks this separately, so this is `null` for every other program setup
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun settledFunds(): Optional = settledFunds.getOptional("settled_funds")
+
+ /**
+ * Customer card spend that has not yet been collected, in the currency's smallest unit (e.g.,
+ * cents for USD). Reported as a negative amount, because it reduces open to buy
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun totalOutstandingSpend(): Long = totalOutstandingSpend.getRequired("total_outstanding_spend")
+
+ /**
+ * Returns the raw JSON value of [security].
+ *
+ * Unlike [security], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("security") @ExcludeMissing fun _security(): JsonField = security
+
+ /**
+ * Returns the raw JSON value of [settledFunds].
+ *
+ * Unlike [settledFunds], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("settled_funds")
+ @ExcludeMissing
+ fun _settledFunds(): JsonField = settledFunds
+
+ /**
+ * Returns the raw JSON value of [totalOutstandingSpend].
+ *
+ * Unlike [totalOutstandingSpend], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("total_outstanding_spend")
+ @ExcludeMissing
+ fun _totalOutstandingSpend(): JsonField = totalOutstandingSpend
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [OpenToBuySummary].
+ *
+ * The following fields are required:
+ * ```java
+ * .security()
+ * .settledFunds()
+ * .totalOutstandingSpend()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [OpenToBuySummary]. */
+ class Builder internal constructor() {
+
+ private var security: JsonField? = null
+ private var settledFunds: JsonField? = null
+ private var totalOutstandingSpend: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(openToBuySummary: OpenToBuySummary) = apply {
+ security = openToBuySummary.security
+ settledFunds = openToBuySummary.settledFunds
+ totalOutstandingSpend = openToBuySummary.totalOutstandingSpend
+ additionalProperties = openToBuySummary.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * Available balance of the Security Account backing card spend, in the currency's smallest
+ * unit (e.g., cents for USD)
+ */
+ fun security(security: Long) = security(JsonField.of(security))
+
+ /**
+ * Sets [Builder.security] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.security] with a well-typed [Long] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun security(security: JsonField) = apply { this.security = security }
+
+ /**
+ * Funding that has moved out of the Security Account to cover card spend Lithic has already
+ * paid out to the networks, in the currency's smallest unit (e.g., cents for USD). Open to
+ * buy counts it alongside `security`, and it clears once collected from your business
+ * clients. Only Commercial Charge tracks this separately, so this is `null` for every other
+ * program setup
+ */
+ fun settledFunds(settledFunds: Long?) = settledFunds(JsonField.ofNullable(settledFunds))
+
+ /**
+ * Alias for [Builder.settledFunds].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun settledFunds(settledFunds: Long) = settledFunds(settledFunds as Long?)
+
+ /** Alias for calling [Builder.settledFunds] with `settledFunds.orElse(null)`. */
+ fun settledFunds(settledFunds: Optional) = settledFunds(settledFunds.getOrNull())
+
+ /**
+ * Sets [Builder.settledFunds] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.settledFunds] with a well-typed [Long] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun settledFunds(settledFunds: JsonField) = apply { this.settledFunds = settledFunds }
+
+ /**
+ * Customer card spend that has not yet been collected, in the currency's smallest unit
+ * (e.g., cents for USD). Reported as a negative amount, because it reduces open to buy
+ */
+ fun totalOutstandingSpend(totalOutstandingSpend: Long) =
+ totalOutstandingSpend(JsonField.of(totalOutstandingSpend))
+
+ /**
+ * Sets [Builder.totalOutstandingSpend] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.totalOutstandingSpend] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun totalOutstandingSpend(totalOutstandingSpend: JsonField) = apply {
+ this.totalOutstandingSpend = totalOutstandingSpend
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [OpenToBuySummary].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .security()
+ * .settledFunds()
+ * .totalOutstandingSpend()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): OpenToBuySummary =
+ OpenToBuySummary(
+ checkRequired("security", security),
+ checkRequired("settledFunds", settledFunds),
+ checkRequired("totalOutstandingSpend", totalOutstandingSpend),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): OpenToBuySummary = apply {
+ if (validated) {
+ return@apply
+ }
+
+ security()
+ settledFunds()
+ totalOutstandingSpend()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (security.asKnown().isPresent) 1 else 0) +
+ (if (settledFunds.asKnown().isPresent) 1 else 0) +
+ (if (totalOutstandingSpend.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is OpenToBuySummary &&
+ security == other.security &&
+ settledFunds == other.settledFunds &&
+ totalOutstandingSpend == other.totalOutstandingSpend &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(security, settledFunds, totalOutstandingSpend, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "OpenToBuySummary{security=$security, settledFunds=$settledFunds, totalOutstandingSpend=$totalOutstandingSpend, additionalProperties=$additionalProperties}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ParsedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ParsedWebhookEvent.kt
index 3bdbe366e..6521b09ce 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ParsedWebhookEvent.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ParsedWebhookEvent.kt
@@ -55,6 +55,7 @@ private constructor(
private val bookTransferTransactionUpdated: BookTransferTransactionUpdatedWebhookEvent? = null,
private val cardCreated: CardCreatedWebhookEvent? = null,
private val cardConverted: CardConvertedWebhookEvent? = null,
+ private val cardPinUpdated: CardPinUpdatedWebhookEvent? = null,
private val cardRenewed: CardRenewedWebhookEvent? = null,
private val cardReissued: CardReissuedWebhookEvent? = null,
private val cardShipped: CardShippedWebhookEvent? = null,
@@ -173,6 +174,8 @@ private constructor(
fun cardConverted(): Optional = Optional.ofNullable(cardConverted)
+ fun cardPinUpdated(): Optional = Optional.ofNullable(cardPinUpdated)
+
fun cardRenewed(): Optional = Optional.ofNullable(cardRenewed)
fun cardReissued(): Optional = Optional.ofNullable(cardReissued)
@@ -372,6 +375,8 @@ private constructor(
fun isCardConverted(): Boolean = cardConverted != null
+ fun isCardPinUpdated(): Boolean = cardPinUpdated != null
+
fun isCardRenewed(): Boolean = cardRenewed != null
fun isCardReissued(): Boolean = cardReissued != null
@@ -525,6 +530,8 @@ private constructor(
fun asCardConverted(): CardConvertedWebhookEvent = cardConverted.getOrThrow("cardConverted")
+ fun asCardPinUpdated(): CardPinUpdatedWebhookEvent = cardPinUpdated.getOrThrow("cardPinUpdated")
+
fun asCardRenewed(): CardRenewedWebhookEvent = cardRenewed.getOrThrow("cardRenewed")
fun asCardReissued(): CardReissuedWebhookEvent = cardReissued.getOrThrow("cardReissued")
@@ -757,6 +764,7 @@ private constructor(
visitor.visitBookTransferTransactionUpdated(bookTransferTransactionUpdated)
cardCreated != null -> visitor.visitCardCreated(cardCreated)
cardConverted != null -> visitor.visitCardConverted(cardConverted)
+ cardPinUpdated != null -> visitor.visitCardPinUpdated(cardPinUpdated)
cardRenewed != null -> visitor.visitCardRenewed(cardRenewed)
cardReissued != null -> visitor.visitCardReissued(cardReissued)
cardShipped != null -> visitor.visitCardShipped(cardShipped)
@@ -954,6 +962,10 @@ private constructor(
cardConverted.validate()
}
+ override fun visitCardPinUpdated(cardPinUpdated: CardPinUpdatedWebhookEvent) {
+ cardPinUpdated.validate()
+ }
+
override fun visitCardRenewed(cardRenewed: CardRenewedWebhookEvent) {
cardRenewed.validate()
}
@@ -1322,6 +1334,9 @@ private constructor(
override fun visitCardConverted(cardConverted: CardConvertedWebhookEvent) =
cardConverted.validity()
+ override fun visitCardPinUpdated(cardPinUpdated: CardPinUpdatedWebhookEvent) =
+ cardPinUpdated.validity()
+
override fun visitCardRenewed(cardRenewed: CardRenewedWebhookEvent) =
cardRenewed.validity()
@@ -1549,6 +1564,7 @@ private constructor(
bookTransferTransactionUpdated == other.bookTransferTransactionUpdated &&
cardCreated == other.cardCreated &&
cardConverted == other.cardConverted &&
+ cardPinUpdated == other.cardPinUpdated &&
cardRenewed == other.cardRenewed &&
cardReissued == other.cardReissued &&
cardShipped == other.cardShipped &&
@@ -1624,6 +1640,7 @@ private constructor(
bookTransferTransactionUpdated,
cardCreated,
cardConverted,
+ cardPinUpdated,
cardRenewed,
cardReissued,
cardShipped,
@@ -1703,6 +1720,7 @@ private constructor(
"ParsedWebhookEvent{bookTransferTransactionUpdated=$bookTransferTransactionUpdated}"
cardCreated != null -> "ParsedWebhookEvent{cardCreated=$cardCreated}"
cardConverted != null -> "ParsedWebhookEvent{cardConverted=$cardConverted}"
+ cardPinUpdated != null -> "ParsedWebhookEvent{cardPinUpdated=$cardPinUpdated}"
cardRenewed != null -> "ParsedWebhookEvent{cardRenewed=$cardRenewed}"
cardReissued != null -> "ParsedWebhookEvent{cardReissued=$cardReissued}"
cardShipped != null -> "ParsedWebhookEvent{cardShipped=$cardShipped}"
@@ -1875,6 +1893,10 @@ private constructor(
fun ofCardConverted(cardConverted: CardConvertedWebhookEvent) =
ParsedWebhookEvent(cardConverted = cardConverted)
+ @JvmStatic
+ fun ofCardPinUpdated(cardPinUpdated: CardPinUpdatedWebhookEvent) =
+ ParsedWebhookEvent(cardPinUpdated = cardPinUpdated)
+
@JvmStatic
fun ofCardRenewed(cardRenewed: CardRenewedWebhookEvent) =
ParsedWebhookEvent(cardRenewed = cardRenewed)
@@ -2215,6 +2237,8 @@ private constructor(
fun visitCardConverted(cardConverted: CardConvertedWebhookEvent): T
+ fun visitCardPinUpdated(cardPinUpdated: CardPinUpdatedWebhookEvent): T
+
fun visitCardRenewed(cardRenewed: CardRenewedWebhookEvent): T
fun visitCardReissued(cardReissued: CardReissuedWebhookEvent): T
@@ -2514,6 +2538,9 @@ private constructor(
tryDeserialize(node, jacksonTypeRef())?.let {
ParsedWebhookEvent(cardConverted = it, _json = json)
},
+ tryDeserialize(node, jacksonTypeRef())?.let {
+ ParsedWebhookEvent(cardPinUpdated = it, _json = json)
+ },
tryDeserialize(node, jacksonTypeRef())?.let {
ParsedWebhookEvent(cardRenewed = it, _json = json)
},
@@ -2849,6 +2876,7 @@ private constructor(
generator.writeObject(value.bookTransferTransactionUpdated)
value.cardCreated != null -> generator.writeObject(value.cardCreated)
value.cardConverted != null -> generator.writeObject(value.cardConverted)
+ value.cardPinUpdated != null -> generator.writeObject(value.cardPinUpdated)
value.cardRenewed != null -> generator.writeObject(value.cardRenewed)
value.cardReissued != null -> generator.writeObject(value.cardReissued)
value.cardShipped != null -> generator.writeObject(value.cardShipped)
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt
index 9290be4aa..585984833 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt
@@ -1213,6 +1213,8 @@ private constructor(
@JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+ @JvmField val EXTERNAL_STABLECOIN = of("EXTERNAL_STABLECOIN")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE")
@@ -1252,6 +1254,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1288,6 +1291,7 @@ private constructor(
EXTERNAL_CHECK,
EXTERNAL_FEDNOW,
EXTERNAL_RTP,
+ EXTERNAL_STABLECOIN,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1328,6 +1332,7 @@ private constructor(
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Value.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Value.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Value.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT
@@ -1366,6 +1371,7 @@ private constructor(
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
EXTERNAL_RTP -> Known.EXTERNAL_RTP
+ EXTERNAL_STABLECOIN -> Known.EXTERNAL_STABLECOIN
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Known.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt
index 823df27a3..caf00b1b3 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt
@@ -21,7 +21,14 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** Initiates a payment between a financial account and an external bank account. */
+/**
+ * Initiates an ACH payment between a financial account and an external bank account.
+ *
+ * This endpoint originates on the ACH rail only. To send a stablecoin payout, use the
+ * [Create stablecoin payment](https://docs.lithic.com/reference/createstablecoinpayment) endpoint.
+ * Payments on every rail are read back through
+ * [List payments](https://docs.lithic.com/reference/searchpayments).
+ */
class PaymentCreateParams
private constructor(
private val body: CreatePaymentRequest,
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateStablecoinParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateStablecoinParams.kt
new file mode 100644
index 000000000..6fcdc91d7
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateStablecoinParams.kt
@@ -0,0 +1,1199 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.lithic.api.core.Enum
+import com.lithic.api.core.ExcludeMissing
+import com.lithic.api.core.JsonField
+import com.lithic.api.core.JsonMissing
+import com.lithic.api.core.JsonValue
+import com.lithic.api.core.Params
+import com.lithic.api.core.checkRequired
+import com.lithic.api.core.http.Headers
+import com.lithic.api.core.http.QueryParams
+import com.lithic.api.errors.LithicInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/**
+ * Initiates a stablecoin payout from a financial account to a registered blockchain recipient.
+ *
+ * The recipient must have been registered with
+ * [Create blockchain recipient](https://docs.lithic.com/reference/createblockchainrecipient) and
+ * have completed address screening — only a recipient in the `ENABLED` verification state can
+ * receive a payout. The destination address and chain come from the recipient, so they are not
+ * supplied here.
+ *
+ * Only payouts are initiated through this endpoint. Stablecoin pay-ins are credited from on-chain
+ * deposits to a financial account's deposit address and are not created through the API. Funds are
+ * placed on hold when the payout is initiated, and a payout that fails on chain reverses that hold.
+ * A payout cannot be cancelled once it has been submitted on chain.
+ *
+ * This endpoint is only available to stablecoin-enabled programs. Contact your customer success
+ * manager to learn more.
+ */
+class PaymentCreateStablecoinParams
+private constructor(
+ private val body: CreateStablecoinPaymentRequest,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ /**
+ * Payout amount in cents
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun amount(): Long = body.amount()
+
+ /**
+ * Token of the blockchain recipient to send the payout to. The recipient must be in the
+ * `ENABLED` verification state
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun blockchainRecipientToken(): String = body.blockchainRecipientToken()
+
+ /**
+ * Token of the financial account the payout is funded from
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun financialAccountToken(): String = body.financialAccountToken()
+
+ /**
+ * Direction of the payment. Stablecoin supports payouts only
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun type(): Type = body.type()
+
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will become the
+ * transaction token
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun token(): Optional = body.token()
+
+ /**
+ * Optional hold to settle when this payout is initiated
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun hold(): Optional = body.hold()
+
+ /**
+ * Memo recorded on the payout. Defaults to `Stablecoin payout on ` when omitted
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun memo(): Optional = body.memo()
+
+ /**
+ * Returns the raw JSON value of [amount].
+ *
+ * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _amount(): JsonField = body._amount()
+
+ /**
+ * Returns the raw JSON value of [blockchainRecipientToken].
+ *
+ * Unlike [blockchainRecipientToken], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ fun _blockchainRecipientToken(): JsonField = body._blockchainRecipientToken()
+
+ /**
+ * Returns the raw JSON value of [financialAccountToken].
+ *
+ * Unlike [financialAccountToken], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ fun _financialAccountToken(): JsonField = body._financialAccountToken()
+
+ /**
+ * Returns the raw JSON value of [type].
+ *
+ * Unlike [type], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _type(): JsonField = body._type()
+
+ /**
+ * Returns the raw JSON value of [token].
+ *
+ * Unlike [token], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _token(): JsonField = body._token()
+
+ /**
+ * Returns the raw JSON value of [hold].
+ *
+ * Unlike [hold], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _hold(): JsonField = body._hold()
+
+ /**
+ * Returns the raw JSON value of [memo].
+ *
+ * Unlike [memo], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _memo(): JsonField = body._memo()
+
+ fun _additionalBodyProperties(): Map = body._additionalProperties()
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of
+ * [PaymentCreateStablecoinParams].
+ *
+ * The following fields are required:
+ * ```java
+ * .amount()
+ * .blockchainRecipientToken()
+ * .financialAccountToken()
+ * .type()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [PaymentCreateStablecoinParams]. */
+ class Builder internal constructor() {
+
+ private var body: CreateStablecoinPaymentRequest.Builder =
+ CreateStablecoinPaymentRequest.builder()
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(paymentCreateStablecoinParams: PaymentCreateStablecoinParams) = apply {
+ body = paymentCreateStablecoinParams.body.toBuilder()
+ additionalHeaders = paymentCreateStablecoinParams.additionalHeaders.toBuilder()
+ additionalQueryParams = paymentCreateStablecoinParams.additionalQueryParams.toBuilder()
+ }
+
+ /**
+ * Sets the entire request body.
+ *
+ * This is generally only useful if you are already constructing the body separately.
+ * Otherwise, it's more convenient to use the top-level setters instead:
+ * - [amount]
+ * - [blockchainRecipientToken]
+ * - [financialAccountToken]
+ * - [type]
+ * - [token]
+ * - etc.
+ */
+ fun body(body: CreateStablecoinPaymentRequest) = apply { this.body = body.toBuilder() }
+
+ /** Payout amount in cents */
+ fun amount(amount: Long) = apply { body.amount(amount) }
+
+ /**
+ * Sets [Builder.amount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.amount] with a well-typed [Long] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun amount(amount: JsonField) = apply { body.amount(amount) }
+
+ /**
+ * Token of the blockchain recipient to send the payout to. The recipient must be in the
+ * `ENABLED` verification state
+ */
+ fun blockchainRecipientToken(blockchainRecipientToken: String) = apply {
+ body.blockchainRecipientToken(blockchainRecipientToken)
+ }
+
+ /**
+ * Sets [Builder.blockchainRecipientToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.blockchainRecipientToken] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun blockchainRecipientToken(blockchainRecipientToken: JsonField) = apply {
+ body.blockchainRecipientToken(blockchainRecipientToken)
+ }
+
+ /** Token of the financial account the payout is funded from */
+ fun financialAccountToken(financialAccountToken: String) = apply {
+ body.financialAccountToken(financialAccountToken)
+ }
+
+ /**
+ * Sets [Builder.financialAccountToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.financialAccountToken] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun financialAccountToken(financialAccountToken: JsonField) = apply {
+ body.financialAccountToken(financialAccountToken)
+ }
+
+ /** Direction of the payment. Stablecoin supports payouts only */
+ fun type(type: Type) = apply { body.type(type) }
+
+ /**
+ * Sets [Builder.type] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.type] with a well-typed [Type] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun type(type: JsonField) = apply { body.type(type) }
+
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will become
+ * the transaction token
+ */
+ fun token(token: String) = apply { body.token(token) }
+
+ /**
+ * Sets [Builder.token] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.token] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun token(token: JsonField) = apply { body.token(token) }
+
+ /** Optional hold to settle when this payout is initiated */
+ fun hold(hold: Hold) = apply { body.hold(hold) }
+
+ /**
+ * Sets [Builder.hold] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.hold] with a well-typed [Hold] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun hold(hold: JsonField) = apply { body.hold(hold) }
+
+ /** Memo recorded on the payout. Defaults to `Stablecoin payout on ` when omitted */
+ fun memo(memo: String) = apply { body.memo(memo) }
+
+ /**
+ * Sets [Builder.memo] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.memo] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun memo(memo: JsonField) = apply { body.memo(memo) }
+
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ body.additionalProperties(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ body.putAdditionalProperty(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ body.putAllAdditionalProperties(additionalBodyProperties)
+ }
+
+ fun removeAdditionalBodyProperty(key: String) = apply { body.removeAdditionalProperty(key) }
+
+ fun removeAllAdditionalBodyProperties(keys: Set) = apply {
+ body.removeAllAdditionalProperties(keys)
+ }
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [PaymentCreateStablecoinParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .amount()
+ * .blockchainRecipientToken()
+ * .financialAccountToken()
+ * .type()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): PaymentCreateStablecoinParams =
+ PaymentCreateStablecoinParams(
+ body.build(),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _body(): CreateStablecoinPaymentRequest = body
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ class CreateStablecoinPaymentRequest
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val amount: JsonField,
+ private val blockchainRecipientToken: JsonField,
+ private val financialAccountToken: JsonField,
+ private val type: JsonField,
+ private val token: JsonField,
+ private val hold: JsonField,
+ private val memo: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(),
+ @JsonProperty("blockchain_recipient_token")
+ @ExcludeMissing
+ blockchainRecipientToken: JsonField = JsonMissing.of(),
+ @JsonProperty("financial_account_token")
+ @ExcludeMissing
+ financialAccountToken: JsonField = JsonMissing.of(),
+ @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
+ @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(),
+ @JsonProperty("hold") @ExcludeMissing hold: JsonField = JsonMissing.of(),
+ @JsonProperty("memo") @ExcludeMissing memo: JsonField = JsonMissing.of(),
+ ) : this(
+ amount,
+ blockchainRecipientToken,
+ financialAccountToken,
+ type,
+ token,
+ hold,
+ memo,
+ mutableMapOf(),
+ )
+
+ /**
+ * Payout amount in cents
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun amount(): Long = amount.getRequired("amount")
+
+ /**
+ * Token of the blockchain recipient to send the payout to. The recipient must be in the
+ * `ENABLED` verification state
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun blockchainRecipientToken(): String =
+ blockchainRecipientToken.getRequired("blockchain_recipient_token")
+
+ /**
+ * Token of the financial account the payout is funded from
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun financialAccountToken(): String =
+ financialAccountToken.getRequired("financial_account_token")
+
+ /**
+ * Direction of the payment. Stablecoin supports payouts only
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun type(): Type = type.getRequired("type")
+
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will become
+ * the transaction token
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun token(): Optional = token.getOptional("token")
+
+ /**
+ * Optional hold to settle when this payout is initiated
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun hold(): Optional = hold.getOptional("hold")
+
+ /**
+ * Memo recorded on the payout. Defaults to `Stablecoin payout on ` when omitted
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun memo(): Optional = memo.getOptional("memo")
+
+ /**
+ * Returns the raw JSON value of [amount].
+ *
+ * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField = amount
+
+ /**
+ * Returns the raw JSON value of [blockchainRecipientToken].
+ *
+ * Unlike [blockchainRecipientToken], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("blockchain_recipient_token")
+ @ExcludeMissing
+ fun _blockchainRecipientToken(): JsonField = blockchainRecipientToken
+
+ /**
+ * Returns the raw JSON value of [financialAccountToken].
+ *
+ * Unlike [financialAccountToken], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("financial_account_token")
+ @ExcludeMissing
+ fun _financialAccountToken(): JsonField = financialAccountToken
+
+ /**
+ * Returns the raw JSON value of [type].
+ *
+ * Unlike [type], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
+
+ /**
+ * Returns the raw JSON value of [token].
+ *
+ * Unlike [token], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("token") @ExcludeMissing fun _token(): JsonField = token
+
+ /**
+ * Returns the raw JSON value of [hold].
+ *
+ * Unlike [hold], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("hold") @ExcludeMissing fun _hold(): JsonField = hold
+
+ /**
+ * Returns the raw JSON value of [memo].
+ *
+ * Unlike [memo], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("memo") @ExcludeMissing fun _memo(): JsonField = memo
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of
+ * [CreateStablecoinPaymentRequest].
+ *
+ * The following fields are required:
+ * ```java
+ * .amount()
+ * .blockchainRecipientToken()
+ * .financialAccountToken()
+ * .type()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CreateStablecoinPaymentRequest]. */
+ class Builder internal constructor() {
+
+ private var amount: JsonField? = null
+ private var blockchainRecipientToken: JsonField? = null
+ private var financialAccountToken: JsonField? = null
+ private var type: JsonField? = null
+ private var token: JsonField = JsonMissing.of()
+ private var hold: JsonField = JsonMissing.of()
+ private var memo: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(createStablecoinPaymentRequest: CreateStablecoinPaymentRequest) =
+ apply {
+ amount = createStablecoinPaymentRequest.amount
+ blockchainRecipientToken =
+ createStablecoinPaymentRequest.blockchainRecipientToken
+ financialAccountToken = createStablecoinPaymentRequest.financialAccountToken
+ type = createStablecoinPaymentRequest.type
+ token = createStablecoinPaymentRequest.token
+ hold = createStablecoinPaymentRequest.hold
+ memo = createStablecoinPaymentRequest.memo
+ additionalProperties =
+ createStablecoinPaymentRequest.additionalProperties.toMutableMap()
+ }
+
+ /** Payout amount in cents */
+ fun amount(amount: Long) = amount(JsonField.of(amount))
+
+ /**
+ * Sets [Builder.amount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.amount] with a well-typed [Long] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun amount(amount: JsonField) = apply { this.amount = amount }
+
+ /**
+ * Token of the blockchain recipient to send the payout to. The recipient must be in the
+ * `ENABLED` verification state
+ */
+ fun blockchainRecipientToken(blockchainRecipientToken: String) =
+ blockchainRecipientToken(JsonField.of(blockchainRecipientToken))
+
+ /**
+ * Sets [Builder.blockchainRecipientToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.blockchainRecipientToken] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun blockchainRecipientToken(blockchainRecipientToken: JsonField) = apply {
+ this.blockchainRecipientToken = blockchainRecipientToken
+ }
+
+ /** Token of the financial account the payout is funded from */
+ fun financialAccountToken(financialAccountToken: String) =
+ financialAccountToken(JsonField.of(financialAccountToken))
+
+ /**
+ * Sets [Builder.financialAccountToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.financialAccountToken] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun financialAccountToken(financialAccountToken: JsonField) = apply {
+ this.financialAccountToken = financialAccountToken
+ }
+
+ /** Direction of the payment. Stablecoin supports payouts only */
+ fun type(type: Type) = type(JsonField.of(type))
+
+ /**
+ * Sets [Builder.type] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.type] with a well-typed [Type] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun type(type: JsonField) = apply { this.type = type }
+
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will
+ * become the transaction token
+ */
+ fun token(token: String) = token(JsonField.of(token))
+
+ /**
+ * Sets [Builder.token] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.token] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun token(token: JsonField) = apply { this.token = token }
+
+ /** Optional hold to settle when this payout is initiated */
+ fun hold(hold: Hold) = hold(JsonField.of(hold))
+
+ /**
+ * Sets [Builder.hold] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.hold] with a well-typed [Hold] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun hold(hold: JsonField) = apply { this.hold = hold }
+
+ /**
+ * Memo recorded on the payout. Defaults to `Stablecoin payout on ` when omitted
+ */
+ fun memo(memo: String) = memo(JsonField.of(memo))
+
+ /**
+ * Sets [Builder.memo] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.memo] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun memo(memo: JsonField) = apply { this.memo = memo }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [CreateStablecoinPaymentRequest].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .amount()
+ * .blockchainRecipientToken()
+ * .financialAccountToken()
+ * .type()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CreateStablecoinPaymentRequest =
+ CreateStablecoinPaymentRequest(
+ checkRequired("amount", amount),
+ checkRequired("blockchainRecipientToken", blockchainRecipientToken),
+ checkRequired("financialAccountToken", financialAccountToken),
+ checkRequired("type", type),
+ token,
+ hold,
+ memo,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): CreateStablecoinPaymentRequest = apply {
+ if (validated) {
+ return@apply
+ }
+
+ amount()
+ blockchainRecipientToken()
+ financialAccountToken()
+ type().validate()
+ token()
+ hold().ifPresent { it.validate() }
+ memo()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (amount.asKnown().isPresent) 1 else 0) +
+ (if (blockchainRecipientToken.asKnown().isPresent) 1 else 0) +
+ (if (financialAccountToken.asKnown().isPresent) 1 else 0) +
+ (type.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (token.asKnown().isPresent) 1 else 0) +
+ (hold.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (memo.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CreateStablecoinPaymentRequest &&
+ amount == other.amount &&
+ blockchainRecipientToken == other.blockchainRecipientToken &&
+ financialAccountToken == other.financialAccountToken &&
+ type == other.type &&
+ token == other.token &&
+ hold == other.hold &&
+ memo == other.memo &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ amount,
+ blockchainRecipientToken,
+ financialAccountToken,
+ type,
+ token,
+ hold,
+ memo,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CreateStablecoinPaymentRequest{amount=$amount, blockchainRecipientToken=$blockchainRecipientToken, financialAccountToken=$financialAccountToken, type=$type, token=$token, hold=$hold, memo=$memo, additionalProperties=$additionalProperties}"
+ }
+
+ /** Direction of the payment. Stablecoin supports payouts only */
+ class Type @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val PAYMENT = of("PAYMENT")
+
+ @JvmStatic fun of(value: String) = Type(JsonField.of(value))
+ }
+
+ /** An enum containing [Type]'s known values. */
+ enum class Known {
+ PAYMENT
+ }
+
+ /**
+ * An enum containing [Type]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Type] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ PAYMENT,
+ /** An enum member indicating that [Type] was instantiated with an unknown value. */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ PAYMENT -> Value.PAYMENT
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws LithicInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ PAYMENT -> Known.PAYMENT
+ else -> throw LithicInvalidDataException("Unknown Type: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): Type = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Type && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Optional hold to settle when this payout is initiated */
+ class Hold
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val token: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of()
+ ) : this(token, mutableMapOf())
+
+ /**
+ * Token of the hold to settle when this payout is initiated
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun token(): String = token.getRequired("token")
+
+ /**
+ * Returns the raw JSON value of [token].
+ *
+ * Unlike [token], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("token") @ExcludeMissing fun _token(): JsonField = token
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [Hold].
+ *
+ * The following fields are required:
+ * ```java
+ * .token()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Hold]. */
+ class Builder internal constructor() {
+
+ private var token: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(hold: Hold) = apply {
+ token = hold.token
+ additionalProperties = hold.additionalProperties.toMutableMap()
+ }
+
+ /** Token of the hold to settle when this payout is initiated */
+ fun token(token: String) = token(JsonField.of(token))
+
+ /**
+ * Sets [Builder.token] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.token] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun token(token: JsonField) = apply { this.token = token }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Hold].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .token()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Hold =
+ Hold(checkRequired("token", token), additionalProperties.toMutableMap())
+ }
+
+ private var validated: Boolean = false
+
+ /**
+ * Validates that the types of all values in this object match their expected types
+ * recursively.
+ *
+ * This method is _not_ forwards compatible with new types from the API for existing fields.
+ *
+ * @throws LithicInvalidDataException if any value type in this object doesn't match its
+ * expected type.
+ */
+ fun validate(): Hold = apply {
+ if (validated) {
+ return@apply
+ }
+
+ token()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = (if (token.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Hold &&
+ token == other.token &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(token, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() = "Hold{token=$token, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is PaymentCreateStablecoinParams &&
+ body == other.body &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int = Objects.hash(body, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "PaymentCreateStablecoinParams{body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateStablecoinResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateStablecoinResponse.kt
new file mode 100644
index 000000000..b9730eb14
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateStablecoinResponse.kt
@@ -0,0 +1,1320 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.lithic.api.core.ExcludeMissing
+import com.lithic.api.core.JsonField
+import com.lithic.api.core.JsonMissing
+import com.lithic.api.core.JsonValue
+import com.lithic.api.core.checkKnown
+import com.lithic.api.core.checkRequired
+import com.lithic.api.core.toImmutable
+import com.lithic.api.errors.LithicInvalidDataException
+import java.time.LocalDate
+import java.time.OffsetDateTime
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Payment transaction */
+class PaymentCreateStablecoinResponse
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val token: JsonField,
+ private val category: JsonField,
+ private val created: JsonField,
+ private val descriptor: JsonField,
+ private val direction: JsonField,
+ private val events: JsonField>,
+ private val family: JsonField,
+ private val financialAccountToken: JsonField,
+ private val method: JsonField,
+ private val methodAttributes: JsonField,
+ private val pendingAmount: JsonField,
+ private val relatedAccountTokens: JsonField,
+ private val result: JsonField,
+ private val settledAmount: JsonField,
+ private val source: JsonField,
+ private val status: JsonField,
+ private val updated: JsonField,
+ private val blockchainRecipientToken: JsonField,
+ private val currency: JsonField,
+ private val expectedReleaseDate: JsonField,
+ private val externalBankAccountToken: JsonField,
+ private val tags: JsonField,
+ private val type: JsonField,
+ private val userDefinedId: JsonField,
+ private val balance: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(),
+ @JsonProperty("category")
+ @ExcludeMissing
+ category: JsonField = JsonMissing.of(),
+ @JsonProperty("created")
+ @ExcludeMissing
+ created: JsonField = JsonMissing.of(),
+ @JsonProperty("descriptor")
+ @ExcludeMissing
+ descriptor: JsonField = JsonMissing.of(),
+ @JsonProperty("direction")
+ @ExcludeMissing
+ direction: JsonField = JsonMissing.of(),
+ @JsonProperty("events")
+ @ExcludeMissing
+ events: JsonField> = JsonMissing.of(),
+ @JsonProperty("family")
+ @ExcludeMissing
+ family: JsonField = JsonMissing.of(),
+ @JsonProperty("financial_account_token")
+ @ExcludeMissing
+ financialAccountToken: JsonField = JsonMissing.of(),
+ @JsonProperty("method")
+ @ExcludeMissing
+ method: JsonField = JsonMissing.of(),
+ @JsonProperty("method_attributes")
+ @ExcludeMissing
+ methodAttributes: JsonField = JsonMissing.of(),
+ @JsonProperty("pending_amount")
+ @ExcludeMissing
+ pendingAmount: JsonField = JsonMissing.of(),
+ @JsonProperty("related_account_tokens")
+ @ExcludeMissing
+ relatedAccountTokens: JsonField = JsonMissing.of(),
+ @JsonProperty("result")
+ @ExcludeMissing
+ result: JsonField = JsonMissing.of(),
+ @JsonProperty("settled_amount")
+ @ExcludeMissing
+ settledAmount: JsonField = JsonMissing.of(),
+ @JsonProperty("source")
+ @ExcludeMissing
+ source: JsonField = JsonMissing.of(),
+ @JsonProperty("status")
+ @ExcludeMissing
+ status: JsonField = JsonMissing.of(),
+ @JsonProperty("updated")
+ @ExcludeMissing
+ updated: JsonField = JsonMissing.of(),
+ @JsonProperty("blockchain_recipient_token")
+ @ExcludeMissing
+ blockchainRecipientToken: JsonField = JsonMissing.of(),
+ @JsonProperty("currency") @ExcludeMissing currency: JsonField = JsonMissing.of(),
+ @JsonProperty("expected_release_date")
+ @ExcludeMissing
+ expectedReleaseDate: JsonField = JsonMissing.of(),
+ @JsonProperty("external_bank_account_token")
+ @ExcludeMissing
+ externalBankAccountToken: JsonField = JsonMissing.of(),
+ @JsonProperty("tags") @ExcludeMissing tags: JsonField = JsonMissing.of(),
+ @JsonProperty("type")
+ @ExcludeMissing
+ type: JsonField = JsonMissing.of(),
+ @JsonProperty("user_defined_id")
+ @ExcludeMissing
+ userDefinedId: JsonField = JsonMissing.of(),
+ @JsonProperty("balance") @ExcludeMissing balance: JsonField = JsonMissing.of(),
+ ) : this(
+ token,
+ category,
+ created,
+ descriptor,
+ direction,
+ events,
+ family,
+ financialAccountToken,
+ method,
+ methodAttributes,
+ pendingAmount,
+ relatedAccountTokens,
+ result,
+ settledAmount,
+ source,
+ status,
+ updated,
+ blockchainRecipientToken,
+ currency,
+ expectedReleaseDate,
+ externalBankAccountToken,
+ tags,
+ type,
+ userDefinedId,
+ balance,
+ mutableMapOf(),
+ )
+
+ fun toPayment(): Payment =
+ Payment.builder()
+ .token(token)
+ .category(category)
+ .created(created)
+ .descriptor(descriptor)
+ .direction(direction)
+ .events(events)
+ .family(family)
+ .financialAccountToken(financialAccountToken)
+ .method(method)
+ .methodAttributes(methodAttributes)
+ .pendingAmount(pendingAmount)
+ .relatedAccountTokens(relatedAccountTokens)
+ .result(result)
+ .settledAmount(settledAmount)
+ .source(source)
+ .status(status)
+ .updated(updated)
+ .blockchainRecipientToken(blockchainRecipientToken)
+ .currency(currency)
+ .expectedReleaseDate(expectedReleaseDate)
+ .externalBankAccountToken(externalBankAccountToken)
+ .tags(tags)
+ .type(type)
+ .userDefinedId(userDefinedId)
+ .build()
+
+ /**
+ * Unique identifier for the transaction
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun token(): String = token.getRequired("token")
+
+ /**
+ * Transaction category
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun category(): Payment.TransactionCategory = category.getRequired("category")
+
+ /**
+ * ISO 8601 timestamp of when the transaction was created
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun created(): OffsetDateTime = created.getRequired("created")
+
+ /**
+ * Transaction descriptor
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun descriptor(): String = descriptor.getRequired("descriptor")
+
+ /**
+ * Transfer direction
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun direction(): Payment.Direction = direction.getRequired("direction")
+
+ /**
+ * List of transaction events
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun events(): List = events.getRequired("events")
+
+ /**
+ * PAYMENT - Payment Transaction
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun family(): Payment.Family = family.getRequired("family")
+
+ /**
+ * Financial account token
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun financialAccountToken(): String =
+ financialAccountToken.getRequired("financial_account_token")
+
+ /**
+ * Transfer method
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun method(): Payment.Method = method.getRequired("method")
+
+ /**
+ * Method-specific attributes
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun methodAttributes(): Payment.MethodAttributes =
+ methodAttributes.getRequired("method_attributes")
+
+ /**
+ * Pending amount in cents
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun pendingAmount(): Long = pendingAmount.getRequired("pending_amount")
+
+ /**
+ * Account tokens related to a payment transaction
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun relatedAccountTokens(): Optional =
+ relatedAccountTokens.getOptional("related_account_tokens")
+
+ /**
+ * Transaction result
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun result(): Payment.TransactionResult = result.getRequired("result")
+
+ /**
+ * Settled amount in cents
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun settledAmount(): Long = settledAmount.getRequired("settled_amount")
+
+ /**
+ * Transaction source
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun source(): Payment.Source = source.getRequired("source")
+
+ /**
+ * The status of the transaction
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun status(): Payment.TransactionStatus = status.getRequired("status")
+
+ /**
+ * ISO 8601 timestamp of when the transaction was last updated
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun updated(): OffsetDateTime = updated.getRequired("updated")
+
+ /**
+ * Token of the blockchain recipient the payout is sent to
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun blockchainRecipientToken(): Optional