diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 47775e91..f118d043 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.127.0"
+ ".": "0.128.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 29c3961c..91f0a5b3 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 195
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-efe780032e44b3cf0f6914407e43bce6aa7176fa50aa6ec018f93c1f28af8490.yml
-openapi_spec_hash: fcb4ca53ca59978f23f21d7c74fcc0b0
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-93254f6abf9fab9e687be2f48198b5126c298b634e2ad626abf413f560f1cbe1.yml
+openapi_spec_hash: 6aaac55fbf96d785ca3867adc3c7ca0e
config_hash: a0a579b0564a5c18568a78f5ba2b6653
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0adfca64..1f790f9d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog
+## 0.128.0 (2026-06-05)
+
+Full Changelog: [v0.127.0...v0.128.0](https://github.com/lithic-com/lithic-java/compare/v0.127.0...v0.128.0)
+
+### Features
+
+* **api:** Add created field and make completed_at nullable in latest_challenge ([14f5f3b](https://github.com/lithic-com/lithic-java/commit/14f5f3bb2e2ad05201f3b5553d1d96c82419554d))
+* **api:** add hold adjustment action to conditional authorization action parameters ([619c52a](https://github.com/lithic-com/lithic-java/commit/619c52ae0c94ab24658f197dfe3a931dad4bffd2))
+* **api:** add name_validation field to CardAuthorization ([d92a942](https://github.com/lithic-com/lithic-java/commit/d92a94248f635024ac944b207f174f51faef1cfd))
+
+
+### Documentation
+
+* **api:** update support contact from email to URL in account and card ([0df9db9](https://github.com/lithic-com/lithic-java/commit/0df9db999c78ee16730eedd995b96496e96576b9))
+
## 0.127.0 (2026-05-26)
Full Changelog: [v0.126.0...v0.127.0](https://github.com/lithic-com/lithic-java/compare/v0.126.0...v0.127.0)
diff --git a/README.md b/README.md
index e4c826c5..9323dd11 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.127.0)
-[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.127.0)
+[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.128.0)
+[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.128.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.127.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.128.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.127.0")
+implementation("com.lithic.api:lithic-java:0.128.0")
```
### Maven
@@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.127.0")
com.lithic.api
lithic-java
- 0.127.0
+ 0.128.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 86353f33..1d421d9f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.lithic.api"
- version = "0.127.0" // x-release-please-version
+ version = "0.128.0" // x-release-please-version
}
subprojects {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt
index a34b3df3..18cfcf62 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt
@@ -113,8 +113,8 @@ private constructor(
* * `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` accounts are
* unable to be transitioned to `ACTIVE` or `PAUSED` states. Accounts can be manually set to
* `CLOSED`, or this can be done by Lithic due to failure to pass KYB/KYC or for
- * risk/compliance reasons. Please contact [support@lithic.com](mailto:support@lithic.com) if
- * you believe this was done by mistake.
+ * risk/compliance reasons. Please contact [support.lithic.com](https://support.lithic.com/)
+ * if you believe this was done by mistake.
*
* @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).
@@ -391,8 +391,9 @@ private constructor(
* * `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` accounts
* are unable to be transitioned to `ACTIVE` or `PAUSED` states. Accounts can be manually
* set to `CLOSED`, or this can be done by Lithic due to failure to pass KYB/KYC or for
- * risk/compliance reasons. Please contact [support@lithic.com](mailto:support@lithic.com)
- * if you believe this was done by mistake.
+ * risk/compliance reasons. Please contact
+ * [support.lithic.com](https://support.lithic.com/) if you believe this was done by
+ * mistake.
*/
fun state(state: State) = state(JsonField.of(state))
@@ -898,8 +899,8 @@ private constructor(
* * `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` accounts are
* unable to be transitioned to `ACTIVE` or `PAUSED` states. Accounts can be manually set to
* `CLOSED`, or this can be done by Lithic due to failure to pass KYB/KYC or for
- * risk/compliance reasons. Please contact [support@lithic.com](mailto:support@lithic.com) if
- * you believe this was done by mistake.
+ * risk/compliance reasons. Please contact [support.lithic.com](https://support.lithic.com/)
+ * if you believe this was done by mistake.
*/
class State @JsonCreator private constructor(private val value: JsonField) : Enum {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
index 7b619e65..3a5dc571 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
@@ -443,7 +443,8 @@ private constructor(
/**
* Primary Account Number (PAN) (i.e. the card number). Customers must be PCI compliant to have
- * PAN returned as a field in production. Please contact support@lithic.com for questions.
+ * PAN returned as a field in production. Please contact https://support.lithic.com/ for
+ * questions.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1253,8 +1254,8 @@ private constructor(
/**
* Primary Account Number (PAN) (i.e. the card number). Customers must be PCI compliant to
- * have PAN returned as a field in production. Please contact support@lithic.com for
- * questions.
+ * have PAN returned as a field in production. Please contact https://support.lithic.com/
+ * for questions.
*/
fun pan(pan: String) = pan(JsonField.of(pan))
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorization.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorization.kt
index 396b17e4..1e5fb506 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorization.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorization.kt
@@ -38,6 +38,7 @@ private constructor(
private val merchant: JsonField,
private val merchantAmount: JsonField,
private val merchantCurrency: JsonField,
+ private val nameValidation: JsonField,
private val serviceLocation: JsonField,
private val settledAmount: JsonField,
private val status: JsonField,
@@ -87,6 +88,9 @@ private constructor(
@JsonProperty("merchant_currency")
@ExcludeMissing
merchantCurrency: JsonField = JsonMissing.of(),
+ @JsonProperty("name_validation")
+ @ExcludeMissing
+ nameValidation: JsonField = JsonMissing.of(),
@JsonProperty("service_location")
@ExcludeMissing
serviceLocation: JsonField = JsonMissing.of(),
@@ -144,6 +148,7 @@ private constructor(
merchant,
merchantAmount,
merchantCurrency,
+ nameValidation,
serviceLocation,
settledAmount,
status,
@@ -287,6 +292,16 @@ private constructor(
@Deprecated("deprecated")
fun merchantCurrency(): String = merchantCurrency.getRequired("merchant_currency")
+ /**
+ * Network name validation data, present when the card network requested name validation for
+ * this transaction. Contains the cardholder name provided by the network and Lithic's computed
+ * match result against KYC data on file.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun nameValidation(): Optional = nameValidation.getOptional("name_validation")
+
/**
* Where the cardholder received the service, when different from the card acceptor location.
* This is populated from network data elements such as Mastercard DE-122 SE1 SF9-14 and Visa
@@ -551,6 +566,15 @@ private constructor(
@ExcludeMissing
fun _merchantCurrency(): JsonField = merchantCurrency
+ /**
+ * Returns the raw JSON value of [nameValidation].
+ *
+ * Unlike [nameValidation], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("name_validation")
+ @ExcludeMissing
+ fun _nameValidation(): JsonField = nameValidation
+
/**
* Returns the raw JSON value of [serviceLocation].
*
@@ -728,6 +752,7 @@ private constructor(
* .merchant()
* .merchantAmount()
* .merchantCurrency()
+ * .nameValidation()
* .serviceLocation()
* .settledAmount()
* .status()
@@ -753,6 +778,7 @@ private constructor(
private var merchant: JsonField? = null
private var merchantAmount: JsonField? = null
private var merchantCurrency: JsonField? = null
+ private var nameValidation: JsonField? = null
private var serviceLocation: JsonField? = null
private var settledAmount: JsonField? = null
private var status: JsonField? = null
@@ -787,6 +813,7 @@ private constructor(
merchant = cardAuthorization.merchant
merchantAmount = cardAuthorization.merchantAmount
merchantCurrency = cardAuthorization.merchantCurrency
+ nameValidation = cardAuthorization.nameValidation
serviceLocation = cardAuthorization.serviceLocation
settledAmount = cardAuthorization.settledAmount
status = cardAuthorization.status
@@ -1009,6 +1036,29 @@ private constructor(
this.merchantCurrency = merchantCurrency
}
+ /**
+ * Network name validation data, present when the card network requested name validation for
+ * this transaction. Contains the cardholder name provided by the network and Lithic's
+ * computed match result against KYC data on file.
+ */
+ fun nameValidation(nameValidation: NameValidation?) =
+ nameValidation(JsonField.ofNullable(nameValidation))
+
+ /** Alias for calling [Builder.nameValidation] with `nameValidation.orElse(null)`. */
+ fun nameValidation(nameValidation: Optional) =
+ nameValidation(nameValidation.getOrNull())
+
+ /**
+ * Sets [Builder.nameValidation] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.nameValidation] with a well-typed [NameValidation] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun nameValidation(nameValidation: JsonField) = apply {
+ this.nameValidation = nameValidation
+ }
+
/**
* Where the cardholder received the service, when different from the card acceptor
* location. This is populated from network data elements such as Mastercard DE-122 SE1
@@ -1338,6 +1388,7 @@ private constructor(
* .merchant()
* .merchantAmount()
* .merchantCurrency()
+ * .nameValidation()
* .serviceLocation()
* .settledAmount()
* .status()
@@ -1361,6 +1412,7 @@ private constructor(
checkRequired("merchant", merchant),
checkRequired("merchantAmount", merchantAmount),
checkRequired("merchantCurrency", merchantCurrency),
+ checkRequired("nameValidation", nameValidation),
checkRequired("serviceLocation", serviceLocation),
checkRequired("settledAmount", settledAmount),
checkRequired("status", status),
@@ -1410,6 +1462,7 @@ private constructor(
merchant().validate()
merchantAmount()
merchantCurrency()
+ nameValidation().ifPresent { it.validate() }
serviceLocation().ifPresent { it.validate() }
settledAmount()
status().validate()
@@ -1458,6 +1511,7 @@ private constructor(
(merchant.asKnown().getOrNull()?.validity() ?: 0) +
(if (merchantAmount.asKnown().isPresent) 1 else 0) +
(if (merchantCurrency.asKnown().isPresent) 1 else 0) +
+ (nameValidation.asKnown().getOrNull()?.validity() ?: 0) +
(serviceLocation.asKnown().getOrNull()?.validity() ?: 0) +
(if (settledAmount.asKnown().isPresent) 1 else 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
@@ -4195,113 +4249,59 @@ private constructor(
}
/**
- * Where the cardholder received the service, when different from the card acceptor location.
- * This is populated from network data elements such as Mastercard DE-122 SE1 SF9-14 and Visa
- * F34 DS02.
+ * Network name validation data, present when the card network requested name validation for
+ * this transaction. Contains the cardholder name provided by the network and Lithic's computed
+ * match result against KYC data on file.
*/
- class ServiceLocation
+ class NameValidation
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
- private val city: JsonField,
- private val country: JsonField,
- private val postalCode: JsonField,
- private val state: JsonField,
- private val streetAddress: JsonField,
+ private val name: JsonField,
+ private val nameOnFileMatch: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
- @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
- @JsonProperty("country") @ExcludeMissing country: JsonField = JsonMissing.of(),
- @JsonProperty("postal_code")
- @ExcludeMissing
- postalCode: JsonField = JsonMissing.of(),
- @JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
- @JsonProperty("street_address")
+ @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(),
+ @JsonProperty("name_on_file_match")
@ExcludeMissing
- streetAddress: JsonField = JsonMissing.of(),
- ) : this(city, country, postalCode, state, streetAddress, mutableMapOf())
-
- /**
- * City of service location.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun city(): Optional = city.getOptional("city")
-
- /**
- * Country code of service location, ISO 3166-1 alpha-3.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun country(): Optional = country.getOptional("country")
-
- /**
- * Postal code of service location.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun postalCode(): Optional = postalCode.getOptional("postal_code")
-
- /**
- * State/province code of service location, ISO 3166-2.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun state(): Optional = state.getOptional("state")
-
- /**
- * Street address of service location.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun streetAddress(): Optional = streetAddress.getOptional("street_address")
-
- /**
- * Returns the raw JSON value of [city].
- *
- * Unlike [city], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ nameOnFileMatch: JsonField = JsonMissing.of(),
+ ) : this(name, nameOnFileMatch, mutableMapOf())
/**
- * Returns the raw JSON value of [country].
+ * Cardholder name as provided by the card network.
*
- * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ * @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).
*/
- @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+ fun name(): Name = name.getRequired("name")
/**
- * Returns the raw JSON value of [postalCode].
+ * Lithic's computed match result comparing the network-provided name to the name on file.
*
- * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected type.
+ * @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).
*/
- @JsonProperty("postal_code")
- @ExcludeMissing
- fun _postalCode(): JsonField = postalCode
+ fun nameOnFileMatch(): NameValidationResult =
+ nameOnFileMatch.getRequired("name_on_file_match")
/**
- * Returns the raw JSON value of [state].
+ * Returns the raw JSON value of [name].
*
- * Unlike [state], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [name], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
/**
- * Returns the raw JSON value of [streetAddress].
+ * Returns the raw JSON value of [nameOnFileMatch].
*
- * Unlike [streetAddress], this method doesn't throw if the JSON field has an unexpected
+ * Unlike [nameOnFileMatch], this method doesn't throw if the JSON field has an unexpected
* type.
*/
- @JsonProperty("street_address")
+ @JsonProperty("name_on_file_match")
@ExcludeMissing
- fun _streetAddress(): JsonField = streetAddress
+ fun _nameOnFileMatch(): JsonField = nameOnFileMatch
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -4318,117 +4318,59 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [ServiceLocation].
+ * Returns a mutable builder for constructing an instance of [NameValidation].
*
* The following fields are required:
* ```java
- * .city()
- * .country()
- * .postalCode()
- * .state()
- * .streetAddress()
+ * .name()
+ * .nameOnFileMatch()
* ```
*/
@JvmStatic fun builder() = Builder()
}
- /** A builder for [ServiceLocation]. */
+ /** A builder for [NameValidation]. */
class Builder internal constructor() {
- private var city: JsonField? = null
- private var country: JsonField? = null
- private var postalCode: JsonField? = null
- private var state: JsonField? = null
- private var streetAddress: JsonField? = null
+ private var name: JsonField? = null
+ private var nameOnFileMatch: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(serviceLocation: ServiceLocation) = apply {
- city = serviceLocation.city
- country = serviceLocation.country
- postalCode = serviceLocation.postalCode
- state = serviceLocation.state
- streetAddress = serviceLocation.streetAddress
- additionalProperties = serviceLocation.additionalProperties.toMutableMap()
+ internal fun from(nameValidation: NameValidation) = apply {
+ name = nameValidation.name
+ nameOnFileMatch = nameValidation.nameOnFileMatch
+ additionalProperties = nameValidation.additionalProperties.toMutableMap()
}
- /** City of service location. */
- fun city(city: String?) = city(JsonField.ofNullable(city))
-
- /** Alias for calling [Builder.city] with `city.orElse(null)`. */
- fun city(city: Optional) = city(city.getOrNull())
+ /** Cardholder name as provided by the card network. */
+ fun name(name: Name) = name(JsonField.of(name))
/**
- * Sets [Builder.city] to an arbitrary JSON value.
+ * Sets [Builder.name] to an arbitrary JSON value.
*
- * You should usually call [Builder.city] with a well-typed [String] value instead. This
+ * You should usually call [Builder.name] with a well-typed [Name] value instead. This
* method is primarily for setting the field to an undocumented or not yet supported
* value.
*/
- fun city(city: JsonField) = apply { this.city = city }
-
- /** Country code of service location, ISO 3166-1 alpha-3. */
- fun country(country: String?) = country(JsonField.ofNullable(country))
-
- /** Alias for calling [Builder.country] with `country.orElse(null)`. */
- fun country(country: Optional) = country(country.getOrNull())
-
- /**
- * Sets [Builder.country] to an arbitrary JSON value.
- *
- * You should usually call [Builder.country] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun country(country: JsonField) = apply { this.country = country }
-
- /** Postal code of service location. */
- fun postalCode(postalCode: String?) = postalCode(JsonField.ofNullable(postalCode))
-
- /** Alias for calling [Builder.postalCode] with `postalCode.orElse(null)`. */
- fun postalCode(postalCode: Optional) = postalCode(postalCode.getOrNull())
-
- /**
- * Sets [Builder.postalCode] to an arbitrary JSON value.
- *
- * You should usually call [Builder.postalCode] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun postalCode(postalCode: JsonField) = apply { this.postalCode = postalCode }
-
- /** State/province code of service location, ISO 3166-2. */
- fun state(state: String?) = state(JsonField.ofNullable(state))
-
- /** Alias for calling [Builder.state] with `state.orElse(null)`. */
- fun state(state: Optional) = state(state.getOrNull())
+ fun name(name: JsonField) = apply { this.name = name }
/**
- * Sets [Builder.state] to an arbitrary JSON value.
- *
- * You should usually call [Builder.state] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
- * supported value.
+ * Lithic's computed match result comparing the network-provided name to the name on
+ * file.
*/
- fun state(state: JsonField) = apply { this.state = state }
-
- /** Street address of service location. */
- fun streetAddress(streetAddress: String?) =
- streetAddress(JsonField.ofNullable(streetAddress))
-
- /** Alias for calling [Builder.streetAddress] with `streetAddress.orElse(null)`. */
- fun streetAddress(streetAddress: Optional) =
- streetAddress(streetAddress.getOrNull())
+ fun nameOnFileMatch(nameOnFileMatch: NameValidationResult) =
+ nameOnFileMatch(JsonField.of(nameOnFileMatch))
/**
- * Sets [Builder.streetAddress] to an arbitrary JSON value.
+ * Sets [Builder.nameOnFileMatch] to an arbitrary JSON value.
*
- * You should usually call [Builder.streetAddress] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
+ * You should usually call [Builder.nameOnFileMatch] with a well-typed
+ * [NameValidationResult] value instead. This method is primarily for setting the field
+ * to an undocumented or not yet supported value.
*/
- fun streetAddress(streetAddress: JsonField) = apply {
- this.streetAddress = streetAddress
+ fun nameOnFileMatch(nameOnFileMatch: JsonField) = apply {
+ this.nameOnFileMatch = nameOnFileMatch
}
fun additionalProperties(additionalProperties: Map) = apply {
@@ -4451,28 +4393,22 @@ private constructor(
}
/**
- * Returns an immutable instance of [ServiceLocation].
+ * Returns an immutable instance of [NameValidation].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
- * .city()
- * .country()
- * .postalCode()
- * .state()
- * .streetAddress()
+ * .name()
+ * .nameOnFileMatch()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): ServiceLocation =
- ServiceLocation(
- checkRequired("city", city),
- checkRequired("country", country),
- checkRequired("postalCode", postalCode),
- checkRequired("state", state),
- checkRequired("streetAddress", streetAddress),
+ fun build(): NameValidation =
+ NameValidation(
+ checkRequired("name", name),
+ checkRequired("nameOnFileMatch", nameOnFileMatch),
additionalProperties.toMutableMap(),
)
}
@@ -4488,16 +4424,13 @@ private constructor(
* @throws LithicInvalidDataException if any value type in this object doesn't match its
* expected type.
*/
- fun validate(): ServiceLocation = apply {
+ fun validate(): NameValidation = apply {
if (validated) {
return@apply
}
- city()
- country()
- postalCode()
- state()
- streetAddress()
+ name().validate()
+ nameOnFileMatch().validate()
validated = true
}
@@ -4517,39 +4450,978 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (if (city.asKnown().isPresent) 1 else 0) +
- (if (country.asKnown().isPresent) 1 else 0) +
- (if (postalCode.asKnown().isPresent) 1 else 0) +
- (if (state.asKnown().isPresent) 1 else 0) +
- (if (streetAddress.asKnown().isPresent) 1 else 0)
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
+ (name.asKnown().getOrNull()?.validity() ?: 0) +
+ (nameOnFileMatch.asKnown().getOrNull()?.validity() ?: 0)
- return other is ServiceLocation &&
- city == other.city &&
- country == other.country &&
- postalCode == other.postalCode &&
- state == other.state &&
- streetAddress == other.streetAddress &&
- additionalProperties == other.additionalProperties
- }
+ /** Cardholder name as provided by the card network. */
+ class Name
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val first: JsonField,
+ private val last: JsonField,
+ private val middle: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
- private val hashCode: Int by lazy {
- Objects.hash(city, country, postalCode, state, streetAddress, additionalProperties)
- }
+ @JsonCreator
+ private constructor(
+ @JsonProperty("first") @ExcludeMissing first: JsonField = JsonMissing.of(),
+ @JsonProperty("last") @ExcludeMissing last: JsonField = JsonMissing.of(),
+ @JsonProperty("middle") @ExcludeMissing middle: JsonField = JsonMissing.of(),
+ ) : this(first, last, middle, mutableMapOf())
- override fun hashCode(): Int = hashCode
+ /**
+ * First name
+ *
+ * @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 first(): String = first.getRequired("first")
- override fun toString() =
- "ServiceLocation{city=$city, country=$country, postalCode=$postalCode, state=$state, streetAddress=$streetAddress, additionalProperties=$additionalProperties}"
- }
+ /**
+ * Last name
+ *
+ * @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 last(): String = last.getRequired("last")
- /**
- * The type of authorization request that this request is for. Note that `CREDIT_AUTHORIZATION`
- * and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to users with credit decisioning via
+ /**
+ * Middle name
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun middle(): Optional = middle.getOptional("middle")
+
+ /**
+ * Returns the raw JSON value of [first].
+ *
+ * Unlike [first], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("first") @ExcludeMissing fun _first(): JsonField = first
+
+ /**
+ * Returns the raw JSON value of [last].
+ *
+ * Unlike [last], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("last") @ExcludeMissing fun _last(): JsonField = last
+
+ /**
+ * Returns the raw JSON value of [middle].
+ *
+ * Unlike [middle], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("middle") @ExcludeMissing fun _middle(): JsonField = middle
+
+ @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 [Name].
+ *
+ * The following fields are required:
+ * ```java
+ * .first()
+ * .last()
+ * .middle()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Name]. */
+ class Builder internal constructor() {
+
+ private var first: JsonField? = null
+ private var last: JsonField? = null
+ private var middle: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(name: Name) = apply {
+ first = name.first
+ last = name.last
+ middle = name.middle
+ additionalProperties = name.additionalProperties.toMutableMap()
+ }
+
+ /** First name */
+ fun first(first: String) = first(JsonField.of(first))
+
+ /**
+ * Sets [Builder.first] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.first] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun first(first: JsonField) = apply { this.first = first }
+
+ /** Last name */
+ fun last(last: String) = last(JsonField.of(last))
+
+ /**
+ * Sets [Builder.last] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.last] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun last(last: JsonField) = apply { this.last = last }
+
+ /** Middle name */
+ fun middle(middle: String?) = middle(JsonField.ofNullable(middle))
+
+ /** Alias for calling [Builder.middle] with `middle.orElse(null)`. */
+ fun middle(middle: Optional) = middle(middle.getOrNull())
+
+ /**
+ * Sets [Builder.middle] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.middle] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun middle(middle: JsonField) = apply { this.middle = middle }
+
+ 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 [Name].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .first()
+ * .last()
+ * .middle()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Name =
+ Name(
+ checkRequired("first", first),
+ checkRequired("last", last),
+ checkRequired("middle", middle),
+ 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(): Name = apply {
+ if (validated) {
+ return@apply
+ }
+
+ first()
+ last()
+ middle()
+ 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 (first.asKnown().isPresent) 1 else 0) +
+ (if (last.asKnown().isPresent) 1 else 0) +
+ (if (middle.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Name &&
+ first == other.first &&
+ last == other.last &&
+ middle == other.middle &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(first, last, middle, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Name{first=$first, last=$last, middle=$middle, additionalProperties=$additionalProperties}"
+ }
+
+ /**
+ * Lithic's computed match result comparing the network-provided name to the name on file.
+ */
+ class NameValidationResult
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val fullName: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("full_name")
+ @ExcludeMissing
+ fullName: JsonField = JsonMissing.of()
+ ) : this(fullName, mutableMapOf())
+
+ /**
+ * Overall name match 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 fullName(): FullName = fullName.getRequired("full_name")
+
+ /**
+ * Returns the raw JSON value of [fullName].
+ *
+ * Unlike [fullName], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("full_name")
+ @ExcludeMissing
+ fun _fullName(): JsonField = fullName
+
+ @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 [NameValidationResult].
+ *
+ * The following fields are required:
+ * ```java
+ * .fullName()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [NameValidationResult]. */
+ class Builder internal constructor() {
+
+ private var fullName: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(nameValidationResult: NameValidationResult) = apply {
+ fullName = nameValidationResult.fullName
+ additionalProperties = nameValidationResult.additionalProperties.toMutableMap()
+ }
+
+ /** Overall name match result. */
+ fun fullName(fullName: FullName) = fullName(JsonField.of(fullName))
+
+ /**
+ * Sets [Builder.fullName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.fullName] with a well-typed [FullName] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun fullName(fullName: JsonField) = apply { this.fullName = fullName }
+
+ 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 [NameValidationResult].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .fullName()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): NameValidationResult =
+ NameValidationResult(
+ checkRequired("fullName", fullName),
+ 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(): NameValidationResult = apply {
+ if (validated) {
+ return@apply
+ }
+
+ fullName().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 = (fullName.asKnown().getOrNull()?.validity() ?: 0)
+
+ /** Overall name match result. */
+ class FullName @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 MATCH = of("MATCH")
+
+ @JvmField val PARTIAL_MATCH = of("PARTIAL_MATCH")
+
+ @JvmField val NO_MATCH = of("NO_MATCH")
+
+ @JvmField val UNVERIFIED = of("UNVERIFIED")
+
+ @JvmStatic fun of(value: String) = FullName(JsonField.of(value))
+ }
+
+ /** An enum containing [FullName]'s known values. */
+ enum class Known {
+ MATCH,
+ PARTIAL_MATCH,
+ NO_MATCH,
+ UNVERIFIED,
+ }
+
+ /**
+ * An enum containing [FullName]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [FullName] 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 {
+ MATCH,
+ PARTIAL_MATCH,
+ NO_MATCH,
+ UNVERIFIED,
+ /**
+ * An enum member indicating that [FullName] 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) {
+ MATCH -> Value.MATCH
+ PARTIAL_MATCH -> Value.PARTIAL_MATCH
+ NO_MATCH -> Value.NO_MATCH
+ UNVERIFIED -> Value.UNVERIFIED
+ 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) {
+ MATCH -> Known.MATCH
+ PARTIAL_MATCH -> Known.PARTIAL_MATCH
+ NO_MATCH -> Known.NO_MATCH
+ UNVERIFIED -> Known.UNVERIFIED
+ else -> throw LithicInvalidDataException("Unknown FullName: $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(): FullName = 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 FullName && 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 NameValidationResult &&
+ fullName == other.fullName &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(fullName, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "NameValidationResult{fullName=$fullName, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is NameValidation &&
+ name == other.name &&
+ nameOnFileMatch == other.nameOnFileMatch &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(name, nameOnFileMatch, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "NameValidation{name=$name, nameOnFileMatch=$nameOnFileMatch, additionalProperties=$additionalProperties}"
+ }
+
+ /**
+ * Where the cardholder received the service, when different from the card acceptor location.
+ * This is populated from network data elements such as Mastercard DE-122 SE1 SF9-14 and Visa
+ * F34 DS02.
+ */
+ class ServiceLocation
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val city: JsonField,
+ private val country: JsonField,
+ private val postalCode: JsonField,
+ private val state: JsonField,
+ private val streetAddress: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country") @ExcludeMissing country: JsonField = JsonMissing.of(),
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ postalCode: JsonField = JsonMissing.of(),
+ @JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
+ @JsonProperty("street_address")
+ @ExcludeMissing
+ streetAddress: JsonField = JsonMissing.of(),
+ ) : this(city, country, postalCode, state, streetAddress, mutableMapOf())
+
+ /**
+ * City of service location.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
+
+ /**
+ * Country code of service location, ISO 3166-1 alpha-3.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun country(): Optional = country.getOptional("country")
+
+ /**
+ * Postal code of service location.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun postalCode(): Optional = postalCode.getOptional("postal_code")
+
+ /**
+ * State/province code of service location, ISO 3166-2.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun state(): Optional = state.getOptional("state")
+
+ /**
+ * Street address of service location.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun streetAddress(): Optional = streetAddress.getOptional("street_address")
+
+ /**
+ * Returns the raw JSON value of [city].
+ *
+ * Unlike [city], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
+ /**
+ * Returns the raw JSON value of [postalCode].
+ *
+ * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
+
+ /**
+ * Returns the raw JSON value of [state].
+ *
+ * Unlike [state], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state
+
+ /**
+ * Returns the raw JSON value of [streetAddress].
+ *
+ * Unlike [streetAddress], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("street_address")
+ @ExcludeMissing
+ fun _streetAddress(): JsonField = streetAddress
+
+ @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 [ServiceLocation].
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .postalCode()
+ * .state()
+ * .streetAddress()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [ServiceLocation]. */
+ class Builder internal constructor() {
+
+ private var city: JsonField? = null
+ private var country: JsonField? = null
+ private var postalCode: JsonField? = null
+ private var state: JsonField? = null
+ private var streetAddress: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(serviceLocation: ServiceLocation) = apply {
+ city = serviceLocation.city
+ country = serviceLocation.country
+ postalCode = serviceLocation.postalCode
+ state = serviceLocation.state
+ streetAddress = serviceLocation.streetAddress
+ additionalProperties = serviceLocation.additionalProperties.toMutableMap()
+ }
+
+ /** City of service location. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
+
+ /**
+ * Sets [Builder.city] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.city] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun city(city: JsonField) = apply { this.city = city }
+
+ /** Country code of service location, ISO 3166-1 alpha-3. */
+ fun country(country: String?) = country(JsonField.ofNullable(country))
+
+ /** Alias for calling [Builder.country] with `country.orElse(null)`. */
+ fun country(country: Optional) = country(country.getOrNull())
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
+ /** Postal code of service location. */
+ fun postalCode(postalCode: String?) = postalCode(JsonField.ofNullable(postalCode))
+
+ /** Alias for calling [Builder.postalCode] with `postalCode.orElse(null)`. */
+ fun postalCode(postalCode: Optional) = postalCode(postalCode.getOrNull())
+
+ /**
+ * Sets [Builder.postalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.postalCode] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun postalCode(postalCode: JsonField) = apply { this.postalCode = postalCode }
+
+ /** State/province code of service location, ISO 3166-2. */
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
+
+ /**
+ * Sets [Builder.state] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.state] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun state(state: JsonField) = apply { this.state = state }
+
+ /** Street address of service location. */
+ fun streetAddress(streetAddress: String?) =
+ streetAddress(JsonField.ofNullable(streetAddress))
+
+ /** Alias for calling [Builder.streetAddress] with `streetAddress.orElse(null)`. */
+ fun streetAddress(streetAddress: Optional) =
+ streetAddress(streetAddress.getOrNull())
+
+ /**
+ * Sets [Builder.streetAddress] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.streetAddress] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun streetAddress(streetAddress: JsonField) = apply {
+ this.streetAddress = streetAddress
+ }
+
+ 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 [ServiceLocation].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .postalCode()
+ * .state()
+ * .streetAddress()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): ServiceLocation =
+ ServiceLocation(
+ checkRequired("city", city),
+ checkRequired("country", country),
+ checkRequired("postalCode", postalCode),
+ checkRequired("state", state),
+ checkRequired("streetAddress", streetAddress),
+ 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(): ServiceLocation = apply {
+ if (validated) {
+ return@apply
+ }
+
+ city()
+ country()
+ postalCode()
+ state()
+ streetAddress()
+ 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 (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
+ (if (postalCode.asKnown().isPresent) 1 else 0) +
+ (if (state.asKnown().isPresent) 1 else 0) +
+ (if (streetAddress.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is ServiceLocation &&
+ city == other.city &&
+ country == other.country &&
+ postalCode == other.postalCode &&
+ state == other.state &&
+ streetAddress == other.streetAddress &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(city, country, postalCode, state, streetAddress, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "ServiceLocation{city=$city, country=$country, postalCode=$postalCode, state=$state, streetAddress=$streetAddress, additionalProperties=$additionalProperties}"
+ }
+
+ /**
+ * The type of authorization request that this request is for. Note that `CREDIT_AUTHORIZATION`
+ * and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to users with credit decisioning via
* ASA enabled.
*/
class AsaRequestStatus @JsonCreator private constructor(private val value: JsonField) :
@@ -5638,24 +6510,45 @@ private constructor(
class LatestChallenge
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
+ private val completedAt: JsonField,
+ private val created: JsonField,
private val method: JsonField,
private val phoneNumber: JsonField,
private val status: JsonField,
- private val completedAt: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
+ @JsonProperty("completed_at")
+ @ExcludeMissing
+ completedAt: JsonField = JsonMissing.of(),
+ @JsonProperty("created")
+ @ExcludeMissing
+ created: JsonField = JsonMissing.of(),
@JsonProperty("method") @ExcludeMissing method: JsonField = JsonMissing.of(),
@JsonProperty("phone_number")
@ExcludeMissing
phoneNumber: JsonField = JsonMissing.of(),
@JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
- @JsonProperty("completed_at")
- @ExcludeMissing
- completedAt: JsonField = JsonMissing.of(),
- ) : this(method, phoneNumber, status, completedAt, mutableMapOf())
+ ) : this(completedAt, created, method, phoneNumber, status, mutableMapOf())
+
+ /**
+ * The date and time when the Authorization Challenge was completed in UTC. Filled only if
+ * the challenge has been completed.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun completedAt(): Optional = completedAt.getOptional("completed_at")
+
+ /**
+ * The date and time when the Authorization Challenge was created in UTC
+ *
+ * @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")
/**
* The method used to deliver the challenge to the cardholder
@@ -5690,13 +6583,20 @@ private constructor(
fun status(): Status = status.getRequired("status")
/**
- * The date and time when the Authorization Challenge was completed in UTC. Present only if
- * the status is `COMPLETED`.
+ * Returns the raw JSON value of [completedAt].
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * Unlike [completedAt], this method doesn't throw if the JSON field has an unexpected type.
*/
- fun completedAt(): Optional = completedAt.getOptional("completed_at")
+ @JsonProperty("completed_at")
+ @ExcludeMissing
+ fun _completedAt(): JsonField = completedAt
+
+ /**
+ * Returns the raw JSON value of [created].
+ *
+ * Unlike [created], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created
/**
* Returns the raw JSON value of [method].
@@ -5721,15 +6621,6 @@ private constructor(
*/
@JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
- /**
- * Returns the raw JSON value of [completedAt].
- *
- * Unlike [completedAt], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("completed_at")
- @ExcludeMissing
- fun _completedAt(): JsonField = completedAt
-
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -5749,6 +6640,8 @@ private constructor(
*
* The following fields are required:
* ```java
+ * .completedAt()
+ * .created()
* .method()
* .phoneNumber()
* .status()
@@ -5760,21 +6653,57 @@ private constructor(
/** A builder for [LatestChallenge]. */
class Builder internal constructor() {
+ private var completedAt: JsonField? = null
+ private var created: JsonField? = null
private var method: JsonField? = null
private var phoneNumber: JsonField? = null
private var status: JsonField? = null
- private var completedAt: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(latestChallenge: LatestChallenge) = apply {
+ completedAt = latestChallenge.completedAt
+ created = latestChallenge.created
method = latestChallenge.method
phoneNumber = latestChallenge.phoneNumber
status = latestChallenge.status
- completedAt = latestChallenge.completedAt
additionalProperties = latestChallenge.additionalProperties.toMutableMap()
}
+ /**
+ * The date and time when the Authorization Challenge was completed in UTC. Filled only
+ * if the challenge has been completed.
+ */
+ fun completedAt(completedAt: OffsetDateTime?) =
+ completedAt(JsonField.ofNullable(completedAt))
+
+ /** Alias for calling [Builder.completedAt] with `completedAt.orElse(null)`. */
+ fun completedAt(completedAt: Optional) =
+ completedAt(completedAt.getOrNull())
+
+ /**
+ * Sets [Builder.completedAt] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.completedAt] with a well-typed [OffsetDateTime]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun completedAt(completedAt: JsonField) = apply {
+ this.completedAt = completedAt
+ }
+
+ /** The date and time when the Authorization Challenge was created in UTC */
+ fun created(created: OffsetDateTime) = created(JsonField.of(created))
+
+ /**
+ * Sets [Builder.created] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.created] with a well-typed [OffsetDateTime] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun created(created: JsonField) = apply { this.created = created }
+
/**
* The method used to deliver the challenge to the cardholder
* * `SMS` - Challenge was delivered via SMS
@@ -5830,23 +6759,6 @@ private constructor(
*/
fun status(status: JsonField) = apply { this.status = status }
- /**
- * The date and time when the Authorization Challenge was completed in UTC. Present only
- * if the status is `COMPLETED`.
- */
- fun completedAt(completedAt: OffsetDateTime) = completedAt(JsonField.of(completedAt))
-
- /**
- * Sets [Builder.completedAt] to an arbitrary JSON value.
- *
- * You should usually call [Builder.completedAt] with a well-typed [OffsetDateTime]
- * value instead. This method is primarily for setting the field to an undocumented or
- * not yet supported value.
- */
- fun completedAt(completedAt: JsonField) = apply {
- this.completedAt = completedAt
- }
-
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -5873,6 +6785,8 @@ private constructor(
*
* The following fields are required:
* ```java
+ * .completedAt()
+ * .created()
* .method()
* .phoneNumber()
* .status()
@@ -5882,10 +6796,11 @@ private constructor(
*/
fun build(): LatestChallenge =
LatestChallenge(
+ checkRequired("completedAt", completedAt),
+ checkRequired("created", created),
checkRequired("method", method),
checkRequired("phoneNumber", phoneNumber),
checkRequired("status", status),
- completedAt,
additionalProperties.toMutableMap(),
)
}
@@ -5906,10 +6821,11 @@ private constructor(
return@apply
}
+ completedAt()
+ created()
method().validate()
phoneNumber()
status().validate()
- completedAt()
validated = true
}
@@ -5929,10 +6845,11 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (method.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (completedAt.asKnown().isPresent) 1 else 0) +
+ (if (created.asKnown().isPresent) 1 else 0) +
+ (method.asKnown().getOrNull()?.validity() ?: 0) +
(if (phoneNumber.asKnown().isPresent) 1 else 0) +
- (status.asKnown().getOrNull()?.validity() ?: 0) +
- (if (completedAt.asKnown().isPresent) 1 else 0)
+ (status.asKnown().getOrNull()?.validity() ?: 0)
/**
* The method used to deliver the challenge to the cardholder
@@ -6249,21 +7166,22 @@ private constructor(
}
return other is LatestChallenge &&
+ completedAt == other.completedAt &&
+ created == other.created &&
method == other.method &&
phoneNumber == other.phoneNumber &&
status == other.status &&
- completedAt == other.completedAt &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(method, phoneNumber, status, completedAt, additionalProperties)
+ Objects.hash(completedAt, created, method, phoneNumber, status, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "LatestChallenge{method=$method, phoneNumber=$phoneNumber, status=$status, completedAt=$completedAt, additionalProperties=$additionalProperties}"
+ "LatestChallenge{completedAt=$completedAt, created=$created, method=$method, phoneNumber=$phoneNumber, status=$status, additionalProperties=$additionalProperties}"
}
/** Card network of the authorization. */
@@ -9585,6 +10503,7 @@ private constructor(
merchant == other.merchant &&
merchantAmount == other.merchantAmount &&
merchantCurrency == other.merchantCurrency &&
+ nameValidation == other.nameValidation &&
serviceLocation == other.serviceLocation &&
settledAmount == other.settledAmount &&
status == other.status &&
@@ -9620,6 +10539,7 @@ private constructor(
merchant,
merchantAmount,
merchantCurrency,
+ nameValidation,
serviceLocation,
settledAmount,
status,
@@ -9644,5 +10564,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardAuthorization{token=$token, acquirerFee=$acquirerFee, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, avs=$avs, card=$card, cardholderCurrency=$cardholderCurrency, cashAmount=$cashAmount, created=$created, merchant=$merchant, merchantAmount=$merchantAmount, merchantCurrency=$merchantCurrency, serviceLocation=$serviceLocation, settledAmount=$settledAmount, status=$status, transactionInitiator=$transactionInitiator, accountType=$accountType, cardholderAuthentication=$cardholderAuthentication, cashback=$cashback, conversionRate=$conversionRate, eventToken=$eventToken, fleetInfo=$fleetInfo, latestChallenge=$latestChallenge, network=$network, networkRiskScore=$networkRiskScore, networkSpecificData=$networkSpecificData, pos=$pos, tokenInfo=$tokenInfo, ttl=$ttl, additionalProperties=$additionalProperties}"
+ "CardAuthorization{token=$token, acquirerFee=$acquirerFee, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, avs=$avs, card=$card, cardholderCurrency=$cardholderCurrency, cashAmount=$cashAmount, created=$created, merchant=$merchant, merchantAmount=$merchantAmount, merchantCurrency=$merchantCurrency, nameValidation=$nameValidation, serviceLocation=$serviceLocation, settledAmount=$settledAmount, status=$status, transactionInitiator=$transactionInitiator, accountType=$accountType, cardholderAuthentication=$cardholderAuthentication, cashback=$cashback, conversionRate=$conversionRate, eventToken=$eventToken, fleetInfo=$fleetInfo, latestChallenge=$latestChallenge, network=$network, networkRiskScore=$networkRiskScore, networkSpecificData=$networkSpecificData, pos=$pos, tokenInfo=$tokenInfo, ttl=$ttl, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
index a43d7f34..c0908798 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
@@ -36,6 +36,7 @@ private constructor(
private val merchant: JsonField,
private val merchantAmount: JsonField,
private val merchantCurrency: JsonField,
+ private val nameValidation: JsonField,
private val serviceLocation: JsonField,
private val settledAmount: JsonField,
private val status: JsonField,
@@ -92,6 +93,9 @@ private constructor(
@JsonProperty("merchant_currency")
@ExcludeMissing
merchantCurrency: JsonField = JsonMissing.of(),
+ @JsonProperty("name_validation")
+ @ExcludeMissing
+ nameValidation: JsonField = JsonMissing.of(),
@JsonProperty("service_location")
@ExcludeMissing
serviceLocation: JsonField = JsonMissing.of(),
@@ -156,6 +160,7 @@ private constructor(
merchant,
merchantAmount,
merchantCurrency,
+ nameValidation,
serviceLocation,
settledAmount,
status,
@@ -192,6 +197,7 @@ private constructor(
.merchant(merchant)
.merchantAmount(merchantAmount)
.merchantCurrency(merchantCurrency)
+ .nameValidation(nameValidation)
.serviceLocation(serviceLocation)
.settledAmount(settledAmount)
.status(status)
@@ -334,6 +340,17 @@ private constructor(
@Deprecated("deprecated")
fun merchantCurrency(): String = merchantCurrency.getRequired("merchant_currency")
+ /**
+ * Network name validation data, present when the card network requested name validation for
+ * this transaction. Contains the cardholder name provided by the network and Lithic's computed
+ * match result against KYC data on file.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun nameValidation(): Optional =
+ nameValidation.getOptional("name_validation")
+
/**
* Where the cardholder received the service, when different from the card acceptor location.
* This is populated from network data elements such as Mastercard DE-122 SE1 SF9-14 and Visa
@@ -610,6 +627,15 @@ private constructor(
@ExcludeMissing
fun _merchantCurrency(): JsonField = merchantCurrency
+ /**
+ * Returns the raw JSON value of [nameValidation].
+ *
+ * Unlike [nameValidation], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("name_validation")
+ @ExcludeMissing
+ fun _nameValidation(): JsonField = nameValidation
+
/**
* Returns the raw JSON value of [serviceLocation].
*
@@ -801,6 +827,7 @@ private constructor(
* .merchant()
* .merchantAmount()
* .merchantCurrency()
+ * .nameValidation()
* .serviceLocation()
* .settledAmount()
* .status()
@@ -827,6 +854,7 @@ private constructor(
private var merchant: JsonField? = null
private var merchantAmount: JsonField? = null
private var merchantCurrency: JsonField? = null
+ private var nameValidation: JsonField? = null
private var serviceLocation: JsonField? = null
private var settledAmount: JsonField? = null
private var status: JsonField? = null
@@ -866,6 +894,7 @@ private constructor(
merchant = cardAuthorizationApprovalRequestWebhookEvent.merchant
merchantAmount = cardAuthorizationApprovalRequestWebhookEvent.merchantAmount
merchantCurrency = cardAuthorizationApprovalRequestWebhookEvent.merchantCurrency
+ nameValidation = cardAuthorizationApprovalRequestWebhookEvent.nameValidation
serviceLocation = cardAuthorizationApprovalRequestWebhookEvent.serviceLocation
settledAmount = cardAuthorizationApprovalRequestWebhookEvent.settledAmount
status = cardAuthorizationApprovalRequestWebhookEvent.status
@@ -1098,6 +1127,29 @@ private constructor(
this.merchantCurrency = merchantCurrency
}
+ /**
+ * Network name validation data, present when the card network requested name validation for
+ * this transaction. Contains the cardholder name provided by the network and Lithic's
+ * computed match result against KYC data on file.
+ */
+ fun nameValidation(nameValidation: CardAuthorization.NameValidation?) =
+ nameValidation(JsonField.ofNullable(nameValidation))
+
+ /** Alias for calling [Builder.nameValidation] with `nameValidation.orElse(null)`. */
+ fun nameValidation(nameValidation: Optional) =
+ nameValidation(nameValidation.getOrNull())
+
+ /**
+ * Sets [Builder.nameValidation] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.nameValidation] with a well-typed
+ * [CardAuthorization.NameValidation] value instead. This method is primarily for setting
+ * the field to an undocumented or not yet supported value.
+ */
+ fun nameValidation(nameValidation: JsonField) = apply {
+ this.nameValidation = nameValidation
+ }
+
/**
* Where the cardholder received the service, when different from the card acceptor
* location. This is populated from network data elements such as Mastercard DE-122 SE1
@@ -1448,6 +1500,7 @@ private constructor(
* .merchant()
* .merchantAmount()
* .merchantCurrency()
+ * .nameValidation()
* .serviceLocation()
* .settledAmount()
* .status()
@@ -1472,6 +1525,7 @@ private constructor(
checkRequired("merchant", merchant),
checkRequired("merchantAmount", merchantAmount),
checkRequired("merchantCurrency", merchantCurrency),
+ checkRequired("nameValidation", nameValidation),
checkRequired("serviceLocation", serviceLocation),
checkRequired("settledAmount", settledAmount),
checkRequired("status", status),
@@ -1522,6 +1576,7 @@ private constructor(
merchant().validate()
merchantAmount()
merchantCurrency()
+ nameValidation().ifPresent { it.validate() }
serviceLocation().ifPresent { it.validate() }
settledAmount()
status().validate()
@@ -1571,6 +1626,7 @@ private constructor(
(merchant.asKnown().getOrNull()?.validity() ?: 0) +
(if (merchantAmount.asKnown().isPresent) 1 else 0) +
(if (merchantCurrency.asKnown().isPresent) 1 else 0) +
+ (nameValidation.asKnown().getOrNull()?.validity() ?: 0) +
(serviceLocation.asKnown().getOrNull()?.validity() ?: 0) +
(if (settledAmount.asKnown().isPresent) 1 else 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
@@ -1740,6 +1796,7 @@ private constructor(
merchant == other.merchant &&
merchantAmount == other.merchantAmount &&
merchantCurrency == other.merchantCurrency &&
+ nameValidation == other.nameValidation &&
serviceLocation == other.serviceLocation &&
settledAmount == other.settledAmount &&
status == other.status &&
@@ -1776,6 +1833,7 @@ private constructor(
merchant,
merchantAmount,
merchantCurrency,
+ nameValidation,
serviceLocation,
settledAmount,
status,
@@ -1801,5 +1859,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardAuthorizationApprovalRequestWebhookEvent{token=$token, acquirerFee=$acquirerFee, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, avs=$avs, card=$card, cardholderCurrency=$cardholderCurrency, cashAmount=$cashAmount, created=$created, merchant=$merchant, merchantAmount=$merchantAmount, merchantCurrency=$merchantCurrency, serviceLocation=$serviceLocation, settledAmount=$settledAmount, status=$status, transactionInitiator=$transactionInitiator, accountType=$accountType, cardholderAuthentication=$cardholderAuthentication, cashback=$cashback, conversionRate=$conversionRate, eventToken=$eventToken, fleetInfo=$fleetInfo, latestChallenge=$latestChallenge, network=$network, networkRiskScore=$networkRiskScore, networkSpecificData=$networkSpecificData, pos=$pos, tokenInfo=$tokenInfo, ttl=$ttl, eventType=$eventType, additionalProperties=$additionalProperties}"
+ "CardAuthorizationApprovalRequestWebhookEvent{token=$token, acquirerFee=$acquirerFee, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, avs=$avs, card=$card, cardholderCurrency=$cardholderCurrency, cashAmount=$cashAmount, created=$created, merchant=$merchant, merchantAmount=$merchantAmount, merchantCurrency=$merchantCurrency, nameValidation=$nameValidation, serviceLocation=$serviceLocation, settledAmount=$settledAmount, status=$status, transactionInitiator=$transactionInitiator, accountType=$accountType, cardholderAuthentication=$cardholderAuthentication, cashback=$cashback, conversionRate=$conversionRate, eventToken=$eventToken, fleetInfo=$fleetInfo, latestChallenge=$latestChallenge, network=$network, networkRiskScore=$networkRiskScore, networkSpecificData=$networkSpecificData, pos=$pos, tokenInfo=$tokenInfo, ttl=$ttl, eventType=$eventType, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt
index deab4b3e..4c622e03 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt
@@ -20,7 +20,7 @@ import java.util.Objects
/**
* Get card configuration such as spend limit and state. Customers must be PCI compliant to use this
- * endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions. *Note:
+ * endpoint. Please contact [support.lithic.com](https://support.lithic.com/) for questions. *Note:
* this is a `POST` endpoint because it is more secure to send sensitive data in a request body than
* in a URL.*
*/
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationAdjustmentParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationAdjustmentParameters.kt
index f81b6dca..11e40210 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationAdjustmentParameters.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationAdjustmentParameters.kt
@@ -24,28 +24,28 @@ import kotlin.jvm.optionals.getOrNull
class ConditionalAuthorizationAdjustmentParameters
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
- private val adjustment: JsonField,
+ private val action: JsonField,
private val conditions: JsonField>,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
- @JsonProperty("adjustment")
+ @JsonProperty("action")
@ExcludeMissing
- adjustment: JsonField = JsonMissing.of(),
+ action: JsonField = JsonMissing.of(),
@JsonProperty("conditions")
@ExcludeMissing
conditions: JsonField> = JsonMissing.of(),
- ) : this(adjustment, conditions, mutableMapOf())
+ ) : this(action, conditions, mutableMapOf())
/**
- * The hold adjustment to apply if the conditions are met
+ * The hold adjustment to apply if the conditions are met.
*
* @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 adjustment(): Adjustment = adjustment.getRequired("adjustment")
+ fun action(): HoldAdjustmentAction = action.getRequired("action")
/**
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
@@ -54,13 +54,11 @@ private constructor(
fun conditions(): List = conditions.getRequired("conditions")
/**
- * Returns the raw JSON value of [adjustment].
+ * Returns the raw JSON value of [action].
*
- * Unlike [adjustment], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [action], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("adjustment")
- @ExcludeMissing
- fun _adjustment(): JsonField = adjustment
+ @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action
/**
* Returns the raw JSON value of [conditions].
@@ -91,7 +89,7 @@ private constructor(
*
* The following fields are required:
* ```java
- * .adjustment()
+ * .action()
* .conditions()
* ```
*/
@@ -101,7 +99,7 @@ private constructor(
/** A builder for [ConditionalAuthorizationAdjustmentParameters]. */
class Builder internal constructor() {
- private var adjustment: JsonField? = null
+ private var action: JsonField? = null
private var conditions: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@@ -110,24 +108,24 @@ private constructor(
conditionalAuthorizationAdjustmentParameters:
ConditionalAuthorizationAdjustmentParameters
) = apply {
- adjustment = conditionalAuthorizationAdjustmentParameters.adjustment
+ action = conditionalAuthorizationAdjustmentParameters.action
conditions =
conditionalAuthorizationAdjustmentParameters.conditions.map { it.toMutableList() }
additionalProperties =
conditionalAuthorizationAdjustmentParameters.additionalProperties.toMutableMap()
}
- /** The hold adjustment to apply if the conditions are met */
- fun adjustment(adjustment: Adjustment) = adjustment(JsonField.of(adjustment))
+ /** The hold adjustment to apply if the conditions are met. */
+ fun action(action: HoldAdjustmentAction) = action(JsonField.of(action))
/**
- * Sets [Builder.adjustment] to an arbitrary JSON value.
+ * Sets [Builder.action] to an arbitrary JSON value.
*
- * You should usually call [Builder.adjustment] with a well-typed [Adjustment] value
+ * You should usually call [Builder.action] with a well-typed [HoldAdjustmentAction] value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun adjustment(adjustment: JsonField) = apply { this.adjustment = adjustment }
+ fun action(action: JsonField) = apply { this.action = action }
fun conditions(conditions: List) = conditions(JsonField.of(conditions))
@@ -180,7 +178,7 @@ private constructor(
*
* The following fields are required:
* ```java
- * .adjustment()
+ * .action()
* .conditions()
* ```
*
@@ -188,7 +186,7 @@ private constructor(
*/
fun build(): ConditionalAuthorizationAdjustmentParameters =
ConditionalAuthorizationAdjustmentParameters(
- checkRequired("adjustment", adjustment),
+ checkRequired("action", action),
checkRequired("conditions", conditions).map { it.toImmutable() },
additionalProperties.toMutableMap(),
)
@@ -209,7 +207,7 @@ private constructor(
return@apply
}
- adjustment().validate()
+ action().validate()
conditions().forEach { it.validate() }
validated = true
}
@@ -229,11 +227,11 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (adjustment.asKnown().getOrNull()?.validity() ?: 0) +
+ (action.asKnown().getOrNull()?.validity() ?: 0) +
(conditions.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
- /** The hold adjustment to apply if the conditions are met */
- class Adjustment
+ /** The hold adjustment to apply if the conditions are met. */
+ class HoldAdjustmentAction
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val mode: JsonField,
@@ -313,7 +311,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [Adjustment].
+ * Returns a mutable builder for constructing an instance of [HoldAdjustmentAction].
*
* The following fields are required:
* ```java
@@ -325,7 +323,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [Adjustment]. */
+ /** A builder for [HoldAdjustmentAction]. */
class Builder internal constructor() {
private var mode: JsonField? = null
@@ -334,11 +332,11 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(adjustment: Adjustment) = apply {
- mode = adjustment.mode
- type = adjustment.type
- value = adjustment.value
- additionalProperties = adjustment.additionalProperties.toMutableMap()
+ internal fun from(holdAdjustmentAction: HoldAdjustmentAction) = apply {
+ mode = holdAdjustmentAction.mode
+ type = holdAdjustmentAction.type
+ value = holdAdjustmentAction.value
+ additionalProperties = holdAdjustmentAction.additionalProperties.toMutableMap()
}
/**
@@ -403,7 +401,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [Adjustment].
+ * Returns an immutable instance of [HoldAdjustmentAction].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -416,8 +414,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): Adjustment =
- Adjustment(
+ fun build(): HoldAdjustmentAction =
+ HoldAdjustmentAction(
checkRequired("mode", mode),
checkRequired("type", type),
checkRequired("value", value),
@@ -436,7 +434,7 @@ private constructor(
* @throws LithicInvalidDataException if any value type in this object doesn't match its
* expected type.
*/
- fun validate(): Adjustment = apply {
+ fun validate(): HoldAdjustmentAction = apply {
if (validated) {
return@apply
}
@@ -754,7 +752,7 @@ private constructor(
return true
}
- return other is Adjustment &&
+ return other is HoldAdjustmentAction &&
mode == other.mode &&
type == other.type &&
value == other.value &&
@@ -766,7 +764,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Adjustment{mode=$mode, type=$type, value=$value, additionalProperties=$additionalProperties}"
+ "HoldAdjustmentAction{mode=$mode, type=$type, value=$value, additionalProperties=$additionalProperties}"
}
class Condition
@@ -2521,15 +2519,15 @@ private constructor(
}
return other is ConditionalAuthorizationAdjustmentParameters &&
- adjustment == other.adjustment &&
+ action == other.action &&
conditions == other.conditions &&
additionalProperties == other.additionalProperties
}
- private val hashCode: Int by lazy { Objects.hash(adjustment, conditions, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(action, conditions, additionalProperties) }
override fun hashCode(): Int = hashCode
override fun toString() =
- "ConditionalAuthorizationAdjustmentParameters{adjustment=$adjustment, conditions=$conditions, additionalProperties=$additionalProperties}"
+ "ConditionalAuthorizationAdjustmentParameters{action=$action, conditions=$conditions, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsync.kt
index d203fac7..bc5a8759 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsync.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardServiceAsync.kt
@@ -410,9 +410,9 @@ interface CardServiceAsync {
/**
* Get card configuration such as spend limit and state. Customers must be PCI compliant to use
- * this endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions.
- * *Note: this is a `POST` endpoint because it is more secure to send sensitive data in a
- * request body than in a URL.*
+ * this endpoint. Please contact [support.lithic.com](https://support.lithic.com/) for
+ * questions. *Note: this is a `POST` endpoint because it is more secure to send sensitive data
+ * in a request body than in a URL.*
*/
fun searchByPan(params: CardSearchByPanParams): CompletableFuture =
searchByPan(params, RequestOptions.none())
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardService.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardService.kt
index 9011c4e1..4217f18e 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardService.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardService.kt
@@ -372,9 +372,9 @@ interface CardService {
/**
* Get card configuration such as spend limit and state. Customers must be PCI compliant to use
- * this endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions.
- * *Note: this is a `POST` endpoint because it is more secure to send sensitive data in a
- * request body than in a URL.*
+ * this endpoint. Please contact [support.lithic.com](https://support.lithic.com/) for
+ * questions. *Note: this is a `POST` endpoint because it is more secure to send sensitive data
+ * in a request body than in a URL.*
*/
fun searchByPan(params: CardSearchByPanParams): Card =
searchByPan(params, RequestOptions.none())
diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEventTest.kt
index 1b0f09ef..22be2d75 100644
--- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEventTest.kt
+++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEventTest.kt
@@ -86,6 +86,25 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult.FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -128,10 +147,11 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
@@ -282,6 +302,25 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
)
assertThat(cardAuthorizationApprovalRequestWebhookEvent.merchantAmount()).isEqualTo(0L)
assertThat(cardAuthorizationApprovalRequestWebhookEvent.merchantCurrency()).isEqualTo("USD")
+ assertThat(cardAuthorizationApprovalRequestWebhookEvent.nameValidation())
+ .contains(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult.FullName.MATCH
+ )
+ .build()
+ )
+ .build()
+ )
assertThat(cardAuthorizationApprovalRequestWebhookEvent.serviceLocation())
.contains(
CardAuthorization.ServiceLocation.builder()
@@ -331,10 +370,11 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
assertThat(cardAuthorizationApprovalRequestWebhookEvent.latestChallenge())
.contains(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
assertThat(cardAuthorizationApprovalRequestWebhookEvent.network())
@@ -486,6 +526,25 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult.FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -528,10 +587,11 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationChallengeWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationChallengeWebhookEventTest.kt
index 8896de88..379740a8 100644
--- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationChallengeWebhookEventTest.kt
+++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationChallengeWebhookEventTest.kt
@@ -88,6 +88,26 @@ internal class CardAuthorizationChallengeWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult
+ .FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -136,10 +156,11 @@ internal class CardAuthorizationChallengeWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
@@ -307,6 +328,26 @@ internal class CardAuthorizationChallengeWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult
+ .FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -353,10 +394,11 @@ internal class CardAuthorizationChallengeWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
@@ -521,6 +563,26 @@ internal class CardAuthorizationChallengeWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult
+ .FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -569,10 +631,11 @@ internal class CardAuthorizationChallengeWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationTest.kt
index 524ca34b..6efd1300 100644
--- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationTest.kt
+++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationTest.kt
@@ -86,6 +86,25 @@ internal class CardAuthorizationTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult.FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -128,10 +147,11 @@ internal class CardAuthorizationTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
@@ -276,6 +296,25 @@ internal class CardAuthorizationTest {
)
assertThat(cardAuthorization.merchantAmount()).isEqualTo(0L)
assertThat(cardAuthorization.merchantCurrency()).isEqualTo("USD")
+ assertThat(cardAuthorization.nameValidation())
+ .contains(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult.FullName.MATCH
+ )
+ .build()
+ )
+ .build()
+ )
assertThat(cardAuthorization.serviceLocation())
.contains(
CardAuthorization.ServiceLocation.builder()
@@ -323,10 +362,11 @@ internal class CardAuthorizationTest {
assertThat(cardAuthorization.latestChallenge())
.contains(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
assertThat(cardAuthorization.network()).contains(CardAuthorization.Network.AMEX)
@@ -472,6 +512,25 @@ internal class CardAuthorizationTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult.FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -514,10 +573,11 @@ internal class CardAuthorizationTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ConditionalAuthorizationAdjustmentParametersTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ConditionalAuthorizationAdjustmentParametersTest.kt
index cdeea562..24f9a987 100644
--- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ConditionalAuthorizationAdjustmentParametersTest.kt
+++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ConditionalAuthorizationAdjustmentParametersTest.kt
@@ -13,14 +13,14 @@ internal class ConditionalAuthorizationAdjustmentParametersTest {
fun create() {
val conditionalAuthorizationAdjustmentParameters =
ConditionalAuthorizationAdjustmentParameters.builder()
- .adjustment(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.builder()
+ .action(
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.builder()
.mode(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.Mode
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.Mode
.REPLACE_WITH_AMOUNT
)
.type(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.Type
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.Type
.HOLD_ADJUSTMENT
)
.value(0L)
@@ -60,15 +60,16 @@ internal class ConditionalAuthorizationAdjustmentParametersTest {
)
.build()
- assertThat(conditionalAuthorizationAdjustmentParameters.adjustment())
+ assertThat(conditionalAuthorizationAdjustmentParameters.action())
.isEqualTo(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.builder()
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.builder()
.mode(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.Mode
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.Mode
.REPLACE_WITH_AMOUNT
)
.type(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.Type.HOLD_ADJUSTMENT
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.Type
+ .HOLD_ADJUSTMENT
)
.value(0L)
.build()
@@ -107,14 +108,14 @@ internal class ConditionalAuthorizationAdjustmentParametersTest {
val jsonMapper = jsonMapper()
val conditionalAuthorizationAdjustmentParameters =
ConditionalAuthorizationAdjustmentParameters.builder()
- .adjustment(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.builder()
+ .action(
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.builder()
.mode(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.Mode
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.Mode
.REPLACE_WITH_AMOUNT
)
.type(
- ConditionalAuthorizationAdjustmentParameters.Adjustment.Type
+ ConditionalAuthorizationAdjustmentParameters.HoldAdjustmentAction.Type
.HOLD_ADJUSTMENT
)
.value(0L)
diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt
index fc663d4a..30749f6f 100644
--- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt
+++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt
@@ -955,6 +955,25 @@ internal class ParsedWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult.FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -997,10 +1016,11 @@ internal class ParsedWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
@@ -1217,6 +1237,26 @@ internal class ParsedWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult
+ .FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -1263,10 +1303,11 @@ internal class ParsedWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
@@ -1430,6 +1471,26 @@ internal class ParsedWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult.builder()
+ .fullName(
+ CardAuthorization.NameValidation.NameValidationResult
+ .FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -1478,10 +1539,11 @@ internal class ParsedWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)
@@ -1723,6 +1785,28 @@ internal class ParsedWebhookEventTest {
)
.merchantAmount(0L)
.merchantCurrency("USD")
+ .nameValidation(
+ CardAuthorization.NameValidation.builder()
+ .name(
+ CardAuthorization.NameValidation.Name.builder()
+ .first("first")
+ .last("last")
+ .middle("middle")
+ .build()
+ )
+ .nameOnFileMatch(
+ CardAuthorization.NameValidation.NameValidationResult
+ .builder()
+ .fullName(
+ CardAuthorization.NameValidation
+ .NameValidationResult
+ .FullName
+ .MATCH
+ )
+ .build()
+ )
+ .build()
+ )
.serviceLocation(
CardAuthorization.ServiceLocation.builder()
.city("city")
@@ -1774,10 +1858,11 @@ internal class ParsedWebhookEventTest {
)
.latestChallenge(
CardAuthorization.LatestChallenge.builder()
+ .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
+ .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.method(CardAuthorization.LatestChallenge.Method.SMS)
.phoneNumber("phone_number")
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
- .completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.build()
)
.network(CardAuthorization.Network.AMEX)