diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 4b59bd483..f86031a6a 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.405.0"
+ ".": "0.406.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 137c59756..fd48d4fba 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 232
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e0a68a396e3cad9ebb243cb823e58ccd61bf7eff388039ba3dd3a09ae72efc92.yml
-openapi_spec_hash: 4079f070e677e7b39205cfbe8c5d7637
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-92af5c57fac9c88bad16079e7b437371720d00c368fd4eea5987f94b25855fcb.yml
+openapi_spec_hash: 7831d7cdab2d8972f5193916c617c9a2
config_hash: 27e44ed36b9c5617b580ead7231a594a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1a669f7cb..4c077f71b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.406.0 (2026-01-27)
+
+Full Changelog: [v0.405.0...v0.406.0](https://github.com/Increase/increase-java/compare/v0.405.0...v0.406.0)
+
+### Features
+
+* **api:** api update ([f6d54fa](https://github.com/Increase/increase-java/commit/f6d54fa2ffd5148ad4ad3f726731111ac0c2c06d))
+
## 0.405.0 (2026-01-27)
Full Changelog: [v0.404.0...v0.405.0](https://github.com/Increase/increase-java/compare/v0.404.0...v0.405.0)
diff --git a/README.md b/README.md
index d5050fe74..e2ffce6a2 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.405.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.405.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.406.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.406.0)
@@ -13,7 +13,7 @@ The Increase Java SDK is similar to the Increase Kotlin SDK but with minor diffe
-The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.405.0).
+The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.406.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d
### Gradle
```kotlin
-implementation("com.increase.api:increase-java:0.405.0")
+implementation("com.increase.api:increase-java:0.406.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.405.0")
com.increase.api
increase-java
- 0.405.0
+ 0.406.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 635763abb..fcc205c6d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.405.0" // x-release-please-version
+ version = "0.406.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt
index 1b7f4a7b9..cc1701eb4 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt
@@ -11459,6 +11459,7 @@ private constructor(
private constructor(
private val cardVerificationCode: JsonField,
private val cardholderAddress: JsonField,
+ private val cardholderName: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -11470,7 +11471,10 @@ private constructor(
@JsonProperty("cardholder_address")
@ExcludeMissing
cardholderAddress: JsonField = JsonMissing.of(),
- ) : this(cardVerificationCode, cardholderAddress, mutableMapOf())
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ cardholderName: JsonField = JsonMissing.of(),
+ ) : this(cardVerificationCode, cardholderAddress, cardholderName, mutableMapOf())
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -11494,6 +11498,15 @@ private constructor(
fun cardholderAddress(): CardholderAddress =
cardholderAddress.getRequired("cardholder_address")
+ /**
+ * Cardholder name provided in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun cardholderName(): Optional =
+ cardholderName.getOptional("cardholder_name")
+
/**
* Returns the raw JSON value of [cardVerificationCode].
*
@@ -11514,6 +11527,16 @@ private constructor(
@ExcludeMissing
fun _cardholderAddress(): JsonField = cardholderAddress
+ /**
+ * Returns the raw JSON value of [cardholderName].
+ *
+ * Unlike [cardholderName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ fun _cardholderName(): JsonField = cardholderName
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -11535,6 +11558,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -11545,12 +11569,14 @@ private constructor(
private var cardVerificationCode: JsonField? = null
private var cardholderAddress: JsonField? = null
+ private var cardholderName: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(verification: Verification) = apply {
cardVerificationCode = verification.cardVerificationCode
cardholderAddress = verification.cardholderAddress
+ cardholderName = verification.cardholderName
additionalProperties = verification.additionalProperties.toMutableMap()
}
@@ -11590,6 +11616,28 @@ private constructor(
this.cardholderAddress = cardholderAddress
}
+ /** Cardholder name provided in the authorization request. */
+ fun cardholderName(cardholderName: CardholderName?) =
+ cardholderName(JsonField.ofNullable(cardholderName))
+
+ /**
+ * Alias for calling [Builder.cardholderName] with
+ * `cardholderName.orElse(null)`.
+ */
+ fun cardholderName(cardholderName: Optional) =
+ cardholderName(cardholderName.getOrNull())
+
+ /**
+ * Sets [Builder.cardholderName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardholderName] with a well-typed
+ * [CardholderName] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun cardholderName(cardholderName: JsonField) = apply {
+ this.cardholderName = cardholderName
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -11621,6 +11669,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -11629,6 +11678,7 @@ private constructor(
Verification(
checkRequired("cardVerificationCode", cardVerificationCode),
checkRequired("cardholderAddress", cardholderAddress),
+ checkRequired("cardholderName", cardholderName),
additionalProperties.toMutableMap(),
)
}
@@ -11642,6 +11692,7 @@ private constructor(
cardVerificationCode().validate()
cardholderAddress().validate()
+ cardholderName().ifPresent { it.validate() }
validated = true
}
@@ -11662,7 +11713,8 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(cardVerificationCode.asKnown().getOrNull()?.validity() ?: 0) +
- (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0)
+ (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (cardholderName.asKnown().getOrNull()?.validity() ?: 0)
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -12625,6 +12677,312 @@ private constructor(
"CardholderAddress{actualLine1=$actualLine1, actualPostalCode=$actualPostalCode, providedLine1=$providedLine1, providedPostalCode=$providedPostalCode, result=$result, additionalProperties=$additionalProperties}"
}
+ /** Cardholder name provided in the authorization request. */
+ class CardholderName
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val providedFirstName: JsonField,
+ private val providedLastName: JsonField,
+ private val providedMiddleName: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ providedFirstName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ providedLastName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ providedMiddleName: JsonField = JsonMissing.of(),
+ ) : this(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ mutableMapOf(),
+ )
+
+ /**
+ * The first name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedFirstName(): Optional =
+ providedFirstName.getOptional("provided_first_name")
+
+ /**
+ * The last name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedLastName(): Optional =
+ providedLastName.getOptional("provided_last_name")
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedMiddleName(): Optional =
+ providedMiddleName.getOptional("provided_middle_name")
+
+ /**
+ * Returns the raw JSON value of [providedFirstName].
+ *
+ * Unlike [providedFirstName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ fun _providedFirstName(): JsonField = providedFirstName
+
+ /**
+ * Returns the raw JSON value of [providedLastName].
+ *
+ * Unlike [providedLastName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ fun _providedLastName(): JsonField = providedLastName
+
+ /**
+ * Returns the raw JSON value of [providedMiddleName].
+ *
+ * Unlike [providedMiddleName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ fun _providedMiddleName(): JsonField = providedMiddleName
+
+ @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
+ * [CardholderName].
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CardholderName]. */
+ class Builder internal constructor() {
+
+ private var providedFirstName: JsonField? = null
+ private var providedLastName: JsonField? = null
+ private var providedMiddleName: JsonField? = null
+ private var additionalProperties: MutableMap =
+ mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(cardholderName: CardholderName) = apply {
+ providedFirstName = cardholderName.providedFirstName
+ providedLastName = cardholderName.providedLastName
+ providedMiddleName = cardholderName.providedMiddleName
+ additionalProperties =
+ cardholderName.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The first name provided for verification in the authorization request.
+ */
+ fun providedFirstName(providedFirstName: String?) =
+ providedFirstName(JsonField.ofNullable(providedFirstName))
+
+ /**
+ * Alias for calling [Builder.providedFirstName] with
+ * `providedFirstName.orElse(null)`.
+ */
+ fun providedFirstName(providedFirstName: Optional) =
+ providedFirstName(providedFirstName.getOrNull())
+
+ /**
+ * Sets [Builder.providedFirstName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedFirstName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedFirstName(providedFirstName: JsonField) = apply {
+ this.providedFirstName = providedFirstName
+ }
+
+ /** The last name provided for verification in the authorization request. */
+ fun providedLastName(providedLastName: String?) =
+ providedLastName(JsonField.ofNullable(providedLastName))
+
+ /**
+ * Alias for calling [Builder.providedLastName] with
+ * `providedLastName.orElse(null)`.
+ */
+ fun providedLastName(providedLastName: Optional) =
+ providedLastName(providedLastName.getOrNull())
+
+ /**
+ * Sets [Builder.providedLastName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedLastName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedLastName(providedLastName: JsonField) = apply {
+ this.providedLastName = providedLastName
+ }
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ */
+ fun providedMiddleName(providedMiddleName: String?) =
+ providedMiddleName(JsonField.ofNullable(providedMiddleName))
+
+ /**
+ * Alias for calling [Builder.providedMiddleName] with
+ * `providedMiddleName.orElse(null)`.
+ */
+ fun providedMiddleName(providedMiddleName: Optional) =
+ providedMiddleName(providedMiddleName.getOrNull())
+
+ /**
+ * Sets [Builder.providedMiddleName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedMiddleName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedMiddleName(providedMiddleName: JsonField) = apply {
+ this.providedMiddleName = providedMiddleName
+ }
+
+ 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 [CardholderName].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CardholderName =
+ CardholderName(
+ checkRequired("providedFirstName", providedFirstName),
+ checkRequired("providedLastName", providedLastName),
+ checkRequired("providedMiddleName", providedMiddleName),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CardholderName = apply {
+ if (validated) {
+ return@apply
+ }
+
+ providedFirstName()
+ providedLastName()
+ providedMiddleName()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ 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 (providedFirstName.asKnown().isPresent) 1 else 0) +
+ (if (providedLastName.asKnown().isPresent) 1 else 0) +
+ (if (providedMiddleName.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CardholderName &&
+ providedFirstName == other.providedFirstName &&
+ providedLastName == other.providedLastName &&
+ providedMiddleName == other.providedMiddleName &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CardholderName{providedFirstName=$providedFirstName, providedLastName=$providedLastName, providedMiddleName=$providedMiddleName, additionalProperties=$additionalProperties}"
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
@@ -12633,17 +12991,23 @@ private constructor(
return other is Verification &&
cardVerificationCode == other.cardVerificationCode &&
cardholderAddress == other.cardholderAddress &&
+ cardholderName == other.cardholderName &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(cardVerificationCode, cardholderAddress, additionalProperties)
+ Objects.hash(
+ cardVerificationCode,
+ cardholderAddress,
+ cardholderName,
+ additionalProperties,
+ )
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, additionalProperties=$additionalProperties}"
+ "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, cardholderName=$cardholderName, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -19929,6 +20293,7 @@ private constructor(
private constructor(
private val cardVerificationCode: JsonField,
private val cardholderAddress: JsonField,
+ private val cardholderName: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -19940,7 +20305,10 @@ private constructor(
@JsonProperty("cardholder_address")
@ExcludeMissing
cardholderAddress: JsonField = JsonMissing.of(),
- ) : this(cardVerificationCode, cardholderAddress, mutableMapOf())
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ cardholderName: JsonField = JsonMissing.of(),
+ ) : this(cardVerificationCode, cardholderAddress, cardholderName, mutableMapOf())
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -19964,6 +20332,15 @@ private constructor(
fun cardholderAddress(): CardholderAddress =
cardholderAddress.getRequired("cardholder_address")
+ /**
+ * Cardholder name provided in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun cardholderName(): Optional =
+ cardholderName.getOptional("cardholder_name")
+
/**
* Returns the raw JSON value of [cardVerificationCode].
*
@@ -19984,6 +20361,16 @@ private constructor(
@ExcludeMissing
fun _cardholderAddress(): JsonField = cardholderAddress
+ /**
+ * Returns the raw JSON value of [cardholderName].
+ *
+ * Unlike [cardholderName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ fun _cardholderName(): JsonField = cardholderName
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -20005,6 +20392,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -20015,12 +20403,14 @@ private constructor(
private var cardVerificationCode: JsonField? = null
private var cardholderAddress: JsonField? = null
+ private var cardholderName: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(verification: Verification) = apply {
cardVerificationCode = verification.cardVerificationCode
cardholderAddress = verification.cardholderAddress
+ cardholderName = verification.cardholderName
additionalProperties = verification.additionalProperties.toMutableMap()
}
@@ -20060,6 +20450,28 @@ private constructor(
this.cardholderAddress = cardholderAddress
}
+ /** Cardholder name provided in the authorization request. */
+ fun cardholderName(cardholderName: CardholderName?) =
+ cardholderName(JsonField.ofNullable(cardholderName))
+
+ /**
+ * Alias for calling [Builder.cardholderName] with
+ * `cardholderName.orElse(null)`.
+ */
+ fun cardholderName(cardholderName: Optional) =
+ cardholderName(cardholderName.getOrNull())
+
+ /**
+ * Sets [Builder.cardholderName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardholderName] with a well-typed
+ * [CardholderName] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun cardholderName(cardholderName: JsonField) = apply {
+ this.cardholderName = cardholderName
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -20091,6 +20503,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -20099,6 +20512,7 @@ private constructor(
Verification(
checkRequired("cardVerificationCode", cardVerificationCode),
checkRequired("cardholderAddress", cardholderAddress),
+ checkRequired("cardholderName", cardholderName),
additionalProperties.toMutableMap(),
)
}
@@ -20112,6 +20526,7 @@ private constructor(
cardVerificationCode().validate()
cardholderAddress().validate()
+ cardholderName().ifPresent { it.validate() }
validated = true
}
@@ -20132,7 +20547,8 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(cardVerificationCode.asKnown().getOrNull()?.validity() ?: 0) +
- (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0)
+ (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (cardholderName.asKnown().getOrNull()?.validity() ?: 0)
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -21095,6 +21511,312 @@ private constructor(
"CardholderAddress{actualLine1=$actualLine1, actualPostalCode=$actualPostalCode, providedLine1=$providedLine1, providedPostalCode=$providedPostalCode, result=$result, additionalProperties=$additionalProperties}"
}
+ /** Cardholder name provided in the authorization request. */
+ class CardholderName
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val providedFirstName: JsonField,
+ private val providedLastName: JsonField,
+ private val providedMiddleName: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ providedFirstName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ providedLastName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ providedMiddleName: JsonField = JsonMissing.of(),
+ ) : this(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ mutableMapOf(),
+ )
+
+ /**
+ * The first name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedFirstName(): Optional =
+ providedFirstName.getOptional("provided_first_name")
+
+ /**
+ * The last name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedLastName(): Optional =
+ providedLastName.getOptional("provided_last_name")
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedMiddleName(): Optional =
+ providedMiddleName.getOptional("provided_middle_name")
+
+ /**
+ * Returns the raw JSON value of [providedFirstName].
+ *
+ * Unlike [providedFirstName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ fun _providedFirstName(): JsonField = providedFirstName
+
+ /**
+ * Returns the raw JSON value of [providedLastName].
+ *
+ * Unlike [providedLastName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ fun _providedLastName(): JsonField = providedLastName
+
+ /**
+ * Returns the raw JSON value of [providedMiddleName].
+ *
+ * Unlike [providedMiddleName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ fun _providedMiddleName(): JsonField = providedMiddleName
+
+ @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
+ * [CardholderName].
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CardholderName]. */
+ class Builder internal constructor() {
+
+ private var providedFirstName: JsonField? = null
+ private var providedLastName: JsonField? = null
+ private var providedMiddleName: JsonField? = null
+ private var additionalProperties: MutableMap =
+ mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(cardholderName: CardholderName) = apply {
+ providedFirstName = cardholderName.providedFirstName
+ providedLastName = cardholderName.providedLastName
+ providedMiddleName = cardholderName.providedMiddleName
+ additionalProperties =
+ cardholderName.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The first name provided for verification in the authorization request.
+ */
+ fun providedFirstName(providedFirstName: String?) =
+ providedFirstName(JsonField.ofNullable(providedFirstName))
+
+ /**
+ * Alias for calling [Builder.providedFirstName] with
+ * `providedFirstName.orElse(null)`.
+ */
+ fun providedFirstName(providedFirstName: Optional) =
+ providedFirstName(providedFirstName.getOrNull())
+
+ /**
+ * Sets [Builder.providedFirstName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedFirstName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedFirstName(providedFirstName: JsonField) = apply {
+ this.providedFirstName = providedFirstName
+ }
+
+ /** The last name provided for verification in the authorization request. */
+ fun providedLastName(providedLastName: String?) =
+ providedLastName(JsonField.ofNullable(providedLastName))
+
+ /**
+ * Alias for calling [Builder.providedLastName] with
+ * `providedLastName.orElse(null)`.
+ */
+ fun providedLastName(providedLastName: Optional) =
+ providedLastName(providedLastName.getOrNull())
+
+ /**
+ * Sets [Builder.providedLastName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedLastName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedLastName(providedLastName: JsonField) = apply {
+ this.providedLastName = providedLastName
+ }
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ */
+ fun providedMiddleName(providedMiddleName: String?) =
+ providedMiddleName(JsonField.ofNullable(providedMiddleName))
+
+ /**
+ * Alias for calling [Builder.providedMiddleName] with
+ * `providedMiddleName.orElse(null)`.
+ */
+ fun providedMiddleName(providedMiddleName: Optional) =
+ providedMiddleName(providedMiddleName.getOrNull())
+
+ /**
+ * Sets [Builder.providedMiddleName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedMiddleName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedMiddleName(providedMiddleName: JsonField) = apply {
+ this.providedMiddleName = providedMiddleName
+ }
+
+ 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 [CardholderName].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CardholderName =
+ CardholderName(
+ checkRequired("providedFirstName", providedFirstName),
+ checkRequired("providedLastName", providedLastName),
+ checkRequired("providedMiddleName", providedMiddleName),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CardholderName = apply {
+ if (validated) {
+ return@apply
+ }
+
+ providedFirstName()
+ providedLastName()
+ providedMiddleName()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ 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 (providedFirstName.asKnown().isPresent) 1 else 0) +
+ (if (providedLastName.asKnown().isPresent) 1 else 0) +
+ (if (providedMiddleName.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CardholderName &&
+ providedFirstName == other.providedFirstName &&
+ providedLastName == other.providedLastName &&
+ providedMiddleName == other.providedMiddleName &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CardholderName{providedFirstName=$providedFirstName, providedLastName=$providedLastName, providedMiddleName=$providedMiddleName, additionalProperties=$additionalProperties}"
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
@@ -21103,17 +21825,23 @@ private constructor(
return other is Verification &&
cardVerificationCode == other.cardVerificationCode &&
cardholderAddress == other.cardholderAddress &&
+ cardholderName == other.cardholderName &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(cardVerificationCode, cardholderAddress, additionalProperties)
+ Objects.hash(
+ cardVerificationCode,
+ cardholderAddress,
+ cardholderName,
+ additionalProperties,
+ )
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, additionalProperties=$additionalProperties}"
+ "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, cardholderName=$cardholderName, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -29002,6 +29730,7 @@ private constructor(
private constructor(
private val cardVerificationCode: JsonField,
private val cardholderAddress: JsonField,
+ private val cardholderName: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -29013,7 +29742,10 @@ private constructor(
@JsonProperty("cardholder_address")
@ExcludeMissing
cardholderAddress: JsonField = JsonMissing.of(),
- ) : this(cardVerificationCode, cardholderAddress, mutableMapOf())
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ cardholderName: JsonField = JsonMissing.of(),
+ ) : this(cardVerificationCode, cardholderAddress, cardholderName, mutableMapOf())
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -29037,6 +29769,15 @@ private constructor(
fun cardholderAddress(): CardholderAddress =
cardholderAddress.getRequired("cardholder_address")
+ /**
+ * Cardholder name provided in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun cardholderName(): Optional =
+ cardholderName.getOptional("cardholder_name")
+
/**
* Returns the raw JSON value of [cardVerificationCode].
*
@@ -29057,6 +29798,16 @@ private constructor(
@ExcludeMissing
fun _cardholderAddress(): JsonField = cardholderAddress
+ /**
+ * Returns the raw JSON value of [cardholderName].
+ *
+ * Unlike [cardholderName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ fun _cardholderName(): JsonField = cardholderName
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -29078,6 +29829,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -29088,12 +29840,14 @@ private constructor(
private var cardVerificationCode: JsonField? = null
private var cardholderAddress: JsonField? = null
+ private var cardholderName: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(verification: Verification) = apply {
cardVerificationCode = verification.cardVerificationCode
cardholderAddress = verification.cardholderAddress
+ cardholderName = verification.cardholderName
additionalProperties = verification.additionalProperties.toMutableMap()
}
@@ -29133,6 +29887,28 @@ private constructor(
this.cardholderAddress = cardholderAddress
}
+ /** Cardholder name provided in the authorization request. */
+ fun cardholderName(cardholderName: CardholderName?) =
+ cardholderName(JsonField.ofNullable(cardholderName))
+
+ /**
+ * Alias for calling [Builder.cardholderName] with
+ * `cardholderName.orElse(null)`.
+ */
+ fun cardholderName(cardholderName: Optional) =
+ cardholderName(cardholderName.getOrNull())
+
+ /**
+ * Sets [Builder.cardholderName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardholderName] with a well-typed
+ * [CardholderName] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun cardholderName(cardholderName: JsonField) = apply {
+ this.cardholderName = cardholderName
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -29164,6 +29940,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -29172,6 +29949,7 @@ private constructor(
Verification(
checkRequired("cardVerificationCode", cardVerificationCode),
checkRequired("cardholderAddress", cardholderAddress),
+ checkRequired("cardholderName", cardholderName),
additionalProperties.toMutableMap(),
)
}
@@ -29185,6 +29963,7 @@ private constructor(
cardVerificationCode().validate()
cardholderAddress().validate()
+ cardholderName().ifPresent { it.validate() }
validated = true
}
@@ -29205,7 +29984,8 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(cardVerificationCode.asKnown().getOrNull()?.validity() ?: 0) +
- (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0)
+ (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (cardholderName.asKnown().getOrNull()?.validity() ?: 0)
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -29856,44 +30636,574 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardholderAddress].
+ * Returns an immutable instance of [CardholderAddress].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .actualLine1()
+ * .actualPostalCode()
+ * .providedLine1()
+ * .providedPostalCode()
+ * .result()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CardholderAddress =
+ CardholderAddress(
+ checkRequired("actualLine1", actualLine1),
+ checkRequired("actualPostalCode", actualPostalCode),
+ checkRequired("providedLine1", providedLine1),
+ checkRequired("providedPostalCode", providedPostalCode),
+ checkRequired("result", result),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CardholderAddress = apply {
+ if (validated) {
+ return@apply
+ }
+
+ actualLine1()
+ actualPostalCode()
+ providedLine1()
+ providedPostalCode()
+ result().validate()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ 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 (actualLine1.asKnown().isPresent) 1 else 0) +
+ (if (actualPostalCode.asKnown().isPresent) 1 else 0) +
+ (if (providedLine1.asKnown().isPresent) 1 else 0) +
+ (if (providedPostalCode.asKnown().isPresent) 1 else 0) +
+ (result.asKnown().getOrNull()?.validity() ?: 0)
+
+ /** The address verification result returned to the card network. */
+ class Result
+ @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 {
+
+ /** No address information was provided in the authorization request. */
+ @JvmField val NOT_CHECKED = of("not_checked")
+
+ /**
+ * Postal code matches, but the street address does not match or was not
+ * provided.
+ */
+ @JvmField
+ val POSTAL_CODE_MATCH_ADDRESS_NO_MATCH =
+ of("postal_code_match_address_no_match")
+
+ /**
+ * Postal code does not match, but the street address matches or was not
+ * provided.
+ */
+ @JvmField
+ val POSTAL_CODE_NO_MATCH_ADDRESS_MATCH =
+ of("postal_code_no_match_address_match")
+
+ /** Postal code and street address match. */
+ @JvmField val MATCH = of("match")
+
+ /** Postal code and street address do not match. */
+ @JvmField val NO_MATCH = of("no_match")
+
+ /**
+ * Postal code matches, but the street address was not verified.
+ * (deprecated)
+ */
+ @JvmField
+ val POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED =
+ of("postal_code_match_address_not_checked")
+
+ @JvmStatic fun of(value: String) = Result(JsonField.of(value))
+ }
+
+ /** An enum containing [Result]'s known values. */
+ enum class Known {
+ /** No address information was provided in the authorization request. */
+ NOT_CHECKED,
+ /**
+ * Postal code matches, but the street address does not match or was not
+ * provided.
+ */
+ POSTAL_CODE_MATCH_ADDRESS_NO_MATCH,
+ /**
+ * Postal code does not match, but the street address matches or was not
+ * provided.
+ */
+ POSTAL_CODE_NO_MATCH_ADDRESS_MATCH,
+ /** Postal code and street address match. */
+ MATCH,
+ /** Postal code and street address do not match. */
+ NO_MATCH,
+ /**
+ * Postal code matches, but the street address was not verified.
+ * (deprecated)
+ */
+ POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED,
+ }
+
+ /**
+ * An enum containing [Result]'s known values, as well as an [_UNKNOWN]
+ * member.
+ *
+ * An instance of [Result] 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 {
+ /** No address information was provided in the authorization request. */
+ NOT_CHECKED,
+ /**
+ * Postal code matches, but the street address does not match or was not
+ * provided.
+ */
+ POSTAL_CODE_MATCH_ADDRESS_NO_MATCH,
+ /**
+ * Postal code does not match, but the street address matches or was not
+ * provided.
+ */
+ POSTAL_CODE_NO_MATCH_ADDRESS_MATCH,
+ /** Postal code and street address match. */
+ MATCH,
+ /** Postal code and street address do not match. */
+ NO_MATCH,
+ /**
+ * Postal code matches, but the street address was not verified.
+ * (deprecated)
+ */
+ POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED,
+ /**
+ * An enum member indicating that [Result] 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) {
+ NOT_CHECKED -> Value.NOT_CHECKED
+ POSTAL_CODE_MATCH_ADDRESS_NO_MATCH ->
+ Value.POSTAL_CODE_MATCH_ADDRESS_NO_MATCH
+ POSTAL_CODE_NO_MATCH_ADDRESS_MATCH ->
+ Value.POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
+ MATCH -> Value.MATCH
+ NO_MATCH -> Value.NO_MATCH
+ POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED ->
+ Value.POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED
+ 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 IncreaseInvalidDataException if this class instance's value is a
+ * not a known member.
+ */
+ fun known(): Known =
+ when (this) {
+ NOT_CHECKED -> Known.NOT_CHECKED
+ POSTAL_CODE_MATCH_ADDRESS_NO_MATCH ->
+ Known.POSTAL_CODE_MATCH_ADDRESS_NO_MATCH
+ POSTAL_CODE_NO_MATCH_ADDRESS_MATCH ->
+ Known.POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
+ MATCH -> Known.MATCH
+ NO_MATCH -> Known.NO_MATCH
+ POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED ->
+ Known.POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED
+ else -> throw IncreaseInvalidDataException("Unknown Result: $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 IncreaseInvalidDataException if this class instance's value does
+ * not have the expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow {
+ IncreaseInvalidDataException("Value is not a String")
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Result = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ 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 Result && 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 CardholderAddress &&
+ actualLine1 == other.actualLine1 &&
+ actualPostalCode == other.actualPostalCode &&
+ providedLine1 == other.providedLine1 &&
+ providedPostalCode == other.providedPostalCode &&
+ result == other.result &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ actualLine1,
+ actualPostalCode,
+ providedLine1,
+ providedPostalCode,
+ result,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CardholderAddress{actualLine1=$actualLine1, actualPostalCode=$actualPostalCode, providedLine1=$providedLine1, providedPostalCode=$providedPostalCode, result=$result, additionalProperties=$additionalProperties}"
+ }
+
+ /** Cardholder name provided in the authorization request. */
+ class CardholderName
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val providedFirstName: JsonField,
+ private val providedLastName: JsonField,
+ private val providedMiddleName: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ providedFirstName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ providedLastName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ providedMiddleName: JsonField = JsonMissing.of(),
+ ) : this(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ mutableMapOf(),
+ )
+
+ /**
+ * The first name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedFirstName(): Optional =
+ providedFirstName.getOptional("provided_first_name")
+
+ /**
+ * The last name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedLastName(): Optional =
+ providedLastName.getOptional("provided_last_name")
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedMiddleName(): Optional =
+ providedMiddleName.getOptional("provided_middle_name")
+
+ /**
+ * Returns the raw JSON value of [providedFirstName].
+ *
+ * Unlike [providedFirstName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ fun _providedFirstName(): JsonField = providedFirstName
+
+ /**
+ * Returns the raw JSON value of [providedLastName].
+ *
+ * Unlike [providedLastName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ fun _providedLastName(): JsonField = providedLastName
+
+ /**
+ * Returns the raw JSON value of [providedMiddleName].
+ *
+ * Unlike [providedMiddleName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ fun _providedMiddleName(): JsonField = providedMiddleName
+
+ @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
+ * [CardholderName].
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CardholderName]. */
+ class Builder internal constructor() {
+
+ private var providedFirstName: JsonField? = null
+ private var providedLastName: JsonField? = null
+ private var providedMiddleName: JsonField? = null
+ private var additionalProperties: MutableMap =
+ mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(cardholderName: CardholderName) = apply {
+ providedFirstName = cardholderName.providedFirstName
+ providedLastName = cardholderName.providedLastName
+ providedMiddleName = cardholderName.providedMiddleName
+ additionalProperties =
+ cardholderName.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The first name provided for verification in the authorization request.
+ */
+ fun providedFirstName(providedFirstName: String?) =
+ providedFirstName(JsonField.ofNullable(providedFirstName))
+
+ /**
+ * Alias for calling [Builder.providedFirstName] with
+ * `providedFirstName.orElse(null)`.
+ */
+ fun providedFirstName(providedFirstName: Optional) =
+ providedFirstName(providedFirstName.getOrNull())
+
+ /**
+ * Sets [Builder.providedFirstName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedFirstName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedFirstName(providedFirstName: JsonField) = apply {
+ this.providedFirstName = providedFirstName
+ }
+
+ /** The last name provided for verification in the authorization request. */
+ fun providedLastName(providedLastName: String?) =
+ providedLastName(JsonField.ofNullable(providedLastName))
+
+ /**
+ * Alias for calling [Builder.providedLastName] with
+ * `providedLastName.orElse(null)`.
+ */
+ fun providedLastName(providedLastName: Optional) =
+ providedLastName(providedLastName.getOrNull())
+
+ /**
+ * Sets [Builder.providedLastName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedLastName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedLastName(providedLastName: JsonField) = apply {
+ this.providedLastName = providedLastName
+ }
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ */
+ fun providedMiddleName(providedMiddleName: String?) =
+ providedMiddleName(JsonField.ofNullable(providedMiddleName))
+
+ /**
+ * Alias for calling [Builder.providedMiddleName] with
+ * `providedMiddleName.orElse(null)`.
+ */
+ fun providedMiddleName(providedMiddleName: Optional) =
+ providedMiddleName(providedMiddleName.getOrNull())
+
+ /**
+ * Sets [Builder.providedMiddleName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedMiddleName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedMiddleName(providedMiddleName: JsonField) = apply {
+ this.providedMiddleName = providedMiddleName
+ }
+
+ 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 [CardholderName].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
- * .actualLine1()
- * .actualPostalCode()
- * .providedLine1()
- * .providedPostalCode()
- * .result()
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): CardholderAddress =
- CardholderAddress(
- checkRequired("actualLine1", actualLine1),
- checkRequired("actualPostalCode", actualPostalCode),
- checkRequired("providedLine1", providedLine1),
- checkRequired("providedPostalCode", providedPostalCode),
- checkRequired("result", result),
+ fun build(): CardholderName =
+ CardholderName(
+ checkRequired("providedFirstName", providedFirstName),
+ checkRequired("providedLastName", providedLastName),
+ checkRequired("providedMiddleName", providedMiddleName),
additionalProperties.toMutableMap(),
)
}
private var validated: Boolean = false
- fun validate(): CardholderAddress = apply {
+ fun validate(): CardholderName = apply {
if (validated) {
return@apply
}
- actualLine1()
- actualPostalCode()
- providedLine1()
- providedPostalCode()
- result().validate()
+ providedFirstName()
+ providedLastName()
+ providedMiddleName()
validated = true
}
@@ -29913,251 +31223,27 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (if (actualLine1.asKnown().isPresent) 1 else 0) +
- (if (actualPostalCode.asKnown().isPresent) 1 else 0) +
- (if (providedLine1.asKnown().isPresent) 1 else 0) +
- (if (providedPostalCode.asKnown().isPresent) 1 else 0) +
- (result.asKnown().getOrNull()?.validity() ?: 0)
-
- /** The address verification result returned to the card network. */
- class Result
- @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 {
-
- /** No address information was provided in the authorization request. */
- @JvmField val NOT_CHECKED = of("not_checked")
-
- /**
- * Postal code matches, but the street address does not match or was not
- * provided.
- */
- @JvmField
- val POSTAL_CODE_MATCH_ADDRESS_NO_MATCH =
- of("postal_code_match_address_no_match")
-
- /**
- * Postal code does not match, but the street address matches or was not
- * provided.
- */
- @JvmField
- val POSTAL_CODE_NO_MATCH_ADDRESS_MATCH =
- of("postal_code_no_match_address_match")
-
- /** Postal code and street address match. */
- @JvmField val MATCH = of("match")
-
- /** Postal code and street address do not match. */
- @JvmField val NO_MATCH = of("no_match")
-
- /**
- * Postal code matches, but the street address was not verified.
- * (deprecated)
- */
- @JvmField
- val POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED =
- of("postal_code_match_address_not_checked")
-
- @JvmStatic fun of(value: String) = Result(JsonField.of(value))
- }
-
- /** An enum containing [Result]'s known values. */
- enum class Known {
- /** No address information was provided in the authorization request. */
- NOT_CHECKED,
- /**
- * Postal code matches, but the street address does not match or was not
- * provided.
- */
- POSTAL_CODE_MATCH_ADDRESS_NO_MATCH,
- /**
- * Postal code does not match, but the street address matches or was not
- * provided.
- */
- POSTAL_CODE_NO_MATCH_ADDRESS_MATCH,
- /** Postal code and street address match. */
- MATCH,
- /** Postal code and street address do not match. */
- NO_MATCH,
- /**
- * Postal code matches, but the street address was not verified.
- * (deprecated)
- */
- POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED,
- }
-
- /**
- * An enum containing [Result]'s known values, as well as an [_UNKNOWN]
- * member.
- *
- * An instance of [Result] 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 {
- /** No address information was provided in the authorization request. */
- NOT_CHECKED,
- /**
- * Postal code matches, but the street address does not match or was not
- * provided.
- */
- POSTAL_CODE_MATCH_ADDRESS_NO_MATCH,
- /**
- * Postal code does not match, but the street address matches or was not
- * provided.
- */
- POSTAL_CODE_NO_MATCH_ADDRESS_MATCH,
- /** Postal code and street address match. */
- MATCH,
- /** Postal code and street address do not match. */
- NO_MATCH,
- /**
- * Postal code matches, but the street address was not verified.
- * (deprecated)
- */
- POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED,
- /**
- * An enum member indicating that [Result] 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) {
- NOT_CHECKED -> Value.NOT_CHECKED
- POSTAL_CODE_MATCH_ADDRESS_NO_MATCH ->
- Value.POSTAL_CODE_MATCH_ADDRESS_NO_MATCH
- POSTAL_CODE_NO_MATCH_ADDRESS_MATCH ->
- Value.POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
- MATCH -> Value.MATCH
- NO_MATCH -> Value.NO_MATCH
- POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED ->
- Value.POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED
- 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 IncreaseInvalidDataException if this class instance's value is a
- * not a known member.
- */
- fun known(): Known =
- when (this) {
- NOT_CHECKED -> Known.NOT_CHECKED
- POSTAL_CODE_MATCH_ADDRESS_NO_MATCH ->
- Known.POSTAL_CODE_MATCH_ADDRESS_NO_MATCH
- POSTAL_CODE_NO_MATCH_ADDRESS_MATCH ->
- Known.POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
- MATCH -> Known.MATCH
- NO_MATCH -> Known.NO_MATCH
- POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED ->
- Known.POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED
- else -> throw IncreaseInvalidDataException("Unknown Result: $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 IncreaseInvalidDataException if this class instance's value does
- * not have the expected primitive type.
- */
- fun asString(): String =
- _value().asString().orElseThrow {
- IncreaseInvalidDataException("Value is not a String")
- }
-
- private var validated: Boolean = false
-
- fun validate(): Result = apply {
- if (validated) {
- return@apply
- }
-
- known()
- validated = true
- }
-
- fun isValid(): Boolean =
- try {
- validate()
- true
- } catch (e: IncreaseInvalidDataException) {
- 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 Result && value == other.value
- }
-
- override fun hashCode() = value.hashCode()
-
- override fun toString() = value.toString()
- }
+ (if (providedFirstName.asKnown().isPresent) 1 else 0) +
+ (if (providedLastName.asKnown().isPresent) 1 else 0) +
+ (if (providedMiddleName.asKnown().isPresent) 1 else 0)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
- return other is CardholderAddress &&
- actualLine1 == other.actualLine1 &&
- actualPostalCode == other.actualPostalCode &&
- providedLine1 == other.providedLine1 &&
- providedPostalCode == other.providedPostalCode &&
- result == other.result &&
+ return other is CardholderName &&
+ providedFirstName == other.providedFirstName &&
+ providedLastName == other.providedLastName &&
+ providedMiddleName == other.providedMiddleName &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
Objects.hash(
- actualLine1,
- actualPostalCode,
- providedLine1,
- providedPostalCode,
- result,
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
additionalProperties,
)
}
@@ -30165,7 +31251,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardholderAddress{actualLine1=$actualLine1, actualPostalCode=$actualPostalCode, providedLine1=$providedLine1, providedPostalCode=$providedPostalCode, result=$result, additionalProperties=$additionalProperties}"
+ "CardholderName{providedFirstName=$providedFirstName, providedLastName=$providedLastName, providedMiddleName=$providedMiddleName, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -30176,17 +31262,23 @@ private constructor(
return other is Verification &&
cardVerificationCode == other.cardVerificationCode &&
cardholderAddress == other.cardholderAddress &&
+ cardholderName == other.cardholderName &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(cardVerificationCode, cardholderAddress, additionalProperties)
+ Objects.hash(
+ cardVerificationCode,
+ cardholderAddress,
+ cardholderName,
+ additionalProperties,
+ )
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, additionalProperties=$additionalProperties}"
+ "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, cardholderName=$cardholderName, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -37522,6 +38614,7 @@ private constructor(
private constructor(
private val cardVerificationCode: JsonField,
private val cardholderAddress: JsonField,
+ private val cardholderName: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -37533,7 +38626,10 @@ private constructor(
@JsonProperty("cardholder_address")
@ExcludeMissing
cardholderAddress: JsonField = JsonMissing.of(),
- ) : this(cardVerificationCode, cardholderAddress, mutableMapOf())
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ cardholderName: JsonField = JsonMissing.of(),
+ ) : this(cardVerificationCode, cardholderAddress, cardholderName, mutableMapOf())
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -37557,6 +38653,15 @@ private constructor(
fun cardholderAddress(): CardholderAddress =
cardholderAddress.getRequired("cardholder_address")
+ /**
+ * Cardholder name provided in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun cardholderName(): Optional =
+ cardholderName.getOptional("cardholder_name")
+
/**
* Returns the raw JSON value of [cardVerificationCode].
*
@@ -37577,6 +38682,16 @@ private constructor(
@ExcludeMissing
fun _cardholderAddress(): JsonField = cardholderAddress
+ /**
+ * Returns the raw JSON value of [cardholderName].
+ *
+ * Unlike [cardholderName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ fun _cardholderName(): JsonField = cardholderName
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -37598,6 +38713,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -37608,12 +38724,14 @@ private constructor(
private var cardVerificationCode: JsonField? = null
private var cardholderAddress: JsonField? = null
+ private var cardholderName: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(verification: Verification) = apply {
cardVerificationCode = verification.cardVerificationCode
cardholderAddress = verification.cardholderAddress
+ cardholderName = verification.cardholderName
additionalProperties = verification.additionalProperties.toMutableMap()
}
@@ -37653,6 +38771,28 @@ private constructor(
this.cardholderAddress = cardholderAddress
}
+ /** Cardholder name provided in the authorization request. */
+ fun cardholderName(cardholderName: CardholderName?) =
+ cardholderName(JsonField.ofNullable(cardholderName))
+
+ /**
+ * Alias for calling [Builder.cardholderName] with
+ * `cardholderName.orElse(null)`.
+ */
+ fun cardholderName(cardholderName: Optional) =
+ cardholderName(cardholderName.getOrNull())
+
+ /**
+ * Sets [Builder.cardholderName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardholderName] with a well-typed
+ * [CardholderName] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun cardholderName(cardholderName: JsonField) = apply {
+ this.cardholderName = cardholderName
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -37684,6 +38824,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -37692,6 +38833,7 @@ private constructor(
Verification(
checkRequired("cardVerificationCode", cardVerificationCode),
checkRequired("cardholderAddress", cardholderAddress),
+ checkRequired("cardholderName", cardholderName),
additionalProperties.toMutableMap(),
)
}
@@ -37705,6 +38847,7 @@ private constructor(
cardVerificationCode().validate()
cardholderAddress().validate()
+ cardholderName().ifPresent { it.validate() }
validated = true
}
@@ -37725,7 +38868,8 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(cardVerificationCode.asKnown().getOrNull()?.validity() ?: 0) +
- (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0)
+ (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (cardholderName.asKnown().getOrNull()?.validity() ?: 0)
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -38688,6 +39832,312 @@ private constructor(
"CardholderAddress{actualLine1=$actualLine1, actualPostalCode=$actualPostalCode, providedLine1=$providedLine1, providedPostalCode=$providedPostalCode, result=$result, additionalProperties=$additionalProperties}"
}
+ /** Cardholder name provided in the authorization request. */
+ class CardholderName
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val providedFirstName: JsonField,
+ private val providedLastName: JsonField,
+ private val providedMiddleName: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ providedFirstName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ providedLastName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ providedMiddleName: JsonField = JsonMissing.of(),
+ ) : this(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ mutableMapOf(),
+ )
+
+ /**
+ * The first name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedFirstName(): Optional =
+ providedFirstName.getOptional("provided_first_name")
+
+ /**
+ * The last name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedLastName(): Optional =
+ providedLastName.getOptional("provided_last_name")
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedMiddleName(): Optional =
+ providedMiddleName.getOptional("provided_middle_name")
+
+ /**
+ * Returns the raw JSON value of [providedFirstName].
+ *
+ * Unlike [providedFirstName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ fun _providedFirstName(): JsonField = providedFirstName
+
+ /**
+ * Returns the raw JSON value of [providedLastName].
+ *
+ * Unlike [providedLastName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ fun _providedLastName(): JsonField = providedLastName
+
+ /**
+ * Returns the raw JSON value of [providedMiddleName].
+ *
+ * Unlike [providedMiddleName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ fun _providedMiddleName(): JsonField = providedMiddleName
+
+ @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
+ * [CardholderName].
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CardholderName]. */
+ class Builder internal constructor() {
+
+ private var providedFirstName: JsonField? = null
+ private var providedLastName: JsonField? = null
+ private var providedMiddleName: JsonField? = null
+ private var additionalProperties: MutableMap =
+ mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(cardholderName: CardholderName) = apply {
+ providedFirstName = cardholderName.providedFirstName
+ providedLastName = cardholderName.providedLastName
+ providedMiddleName = cardholderName.providedMiddleName
+ additionalProperties =
+ cardholderName.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The first name provided for verification in the authorization request.
+ */
+ fun providedFirstName(providedFirstName: String?) =
+ providedFirstName(JsonField.ofNullable(providedFirstName))
+
+ /**
+ * Alias for calling [Builder.providedFirstName] with
+ * `providedFirstName.orElse(null)`.
+ */
+ fun providedFirstName(providedFirstName: Optional) =
+ providedFirstName(providedFirstName.getOrNull())
+
+ /**
+ * Sets [Builder.providedFirstName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedFirstName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedFirstName(providedFirstName: JsonField) = apply {
+ this.providedFirstName = providedFirstName
+ }
+
+ /** The last name provided for verification in the authorization request. */
+ fun providedLastName(providedLastName: String?) =
+ providedLastName(JsonField.ofNullable(providedLastName))
+
+ /**
+ * Alias for calling [Builder.providedLastName] with
+ * `providedLastName.orElse(null)`.
+ */
+ fun providedLastName(providedLastName: Optional) =
+ providedLastName(providedLastName.getOrNull())
+
+ /**
+ * Sets [Builder.providedLastName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedLastName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedLastName(providedLastName: JsonField) = apply {
+ this.providedLastName = providedLastName
+ }
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ */
+ fun providedMiddleName(providedMiddleName: String?) =
+ providedMiddleName(JsonField.ofNullable(providedMiddleName))
+
+ /**
+ * Alias for calling [Builder.providedMiddleName] with
+ * `providedMiddleName.orElse(null)`.
+ */
+ fun providedMiddleName(providedMiddleName: Optional) =
+ providedMiddleName(providedMiddleName.getOrNull())
+
+ /**
+ * Sets [Builder.providedMiddleName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedMiddleName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedMiddleName(providedMiddleName: JsonField) = apply {
+ this.providedMiddleName = providedMiddleName
+ }
+
+ 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 [CardholderName].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CardholderName =
+ CardholderName(
+ checkRequired("providedFirstName", providedFirstName),
+ checkRequired("providedLastName", providedLastName),
+ checkRequired("providedMiddleName", providedMiddleName),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CardholderName = apply {
+ if (validated) {
+ return@apply
+ }
+
+ providedFirstName()
+ providedLastName()
+ providedMiddleName()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ 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 (providedFirstName.asKnown().isPresent) 1 else 0) +
+ (if (providedLastName.asKnown().isPresent) 1 else 0) +
+ (if (providedMiddleName.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CardholderName &&
+ providedFirstName == other.providedFirstName &&
+ providedLastName == other.providedLastName &&
+ providedMiddleName == other.providedMiddleName &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CardholderName{providedFirstName=$providedFirstName, providedLastName=$providedLastName, providedMiddleName=$providedMiddleName, additionalProperties=$additionalProperties}"
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
@@ -38696,17 +40146,23 @@ private constructor(
return other is Verification &&
cardVerificationCode == other.cardVerificationCode &&
cardholderAddress == other.cardholderAddress &&
+ cardholderName == other.cardholderName &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(cardVerificationCode, cardholderAddress, additionalProperties)
+ Objects.hash(
+ cardVerificationCode,
+ cardholderAddress,
+ cardholderName,
+ additionalProperties,
+ )
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, additionalProperties=$additionalProperties}"
+ "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, cardholderName=$cardholderName, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -73075,6 +74531,7 @@ private constructor(
private constructor(
private val cardVerificationCode: JsonField,
private val cardholderAddress: JsonField,
+ private val cardholderName: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -73086,7 +74543,10 @@ private constructor(
@JsonProperty("cardholder_address")
@ExcludeMissing
cardholderAddress: JsonField = JsonMissing.of(),
- ) : this(cardVerificationCode, cardholderAddress, mutableMapOf())
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ cardholderName: JsonField = JsonMissing.of(),
+ ) : this(cardVerificationCode, cardholderAddress, cardholderName, mutableMapOf())
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -73110,6 +74570,15 @@ private constructor(
fun cardholderAddress(): CardholderAddress =
cardholderAddress.getRequired("cardholder_address")
+ /**
+ * Cardholder name provided in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun cardholderName(): Optional =
+ cardholderName.getOptional("cardholder_name")
+
/**
* Returns the raw JSON value of [cardVerificationCode].
*
@@ -73130,6 +74599,16 @@ private constructor(
@ExcludeMissing
fun _cardholderAddress(): JsonField = cardholderAddress
+ /**
+ * Returns the raw JSON value of [cardholderName].
+ *
+ * Unlike [cardholderName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ fun _cardholderName(): JsonField = cardholderName
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -73151,6 +74630,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -73161,12 +74641,14 @@ private constructor(
private var cardVerificationCode: JsonField? = null
private var cardholderAddress: JsonField? = null
+ private var cardholderName: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(verification: Verification) = apply {
cardVerificationCode = verification.cardVerificationCode
cardholderAddress = verification.cardholderAddress
+ cardholderName = verification.cardholderName
additionalProperties = verification.additionalProperties.toMutableMap()
}
@@ -73206,6 +74688,28 @@ private constructor(
this.cardholderAddress = cardholderAddress
}
+ /** Cardholder name provided in the authorization request. */
+ fun cardholderName(cardholderName: CardholderName?) =
+ cardholderName(JsonField.ofNullable(cardholderName))
+
+ /**
+ * Alias for calling [Builder.cardholderName] with
+ * `cardholderName.orElse(null)`.
+ */
+ fun cardholderName(cardholderName: Optional) =
+ cardholderName(cardholderName.getOrNull())
+
+ /**
+ * Sets [Builder.cardholderName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardholderName] with a well-typed
+ * [CardholderName] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun cardholderName(cardholderName: JsonField) = apply {
+ this.cardholderName = cardholderName
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -73237,6 +74741,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -73245,6 +74750,7 @@ private constructor(
Verification(
checkRequired("cardVerificationCode", cardVerificationCode),
checkRequired("cardholderAddress", cardholderAddress),
+ checkRequired("cardholderName", cardholderName),
additionalProperties.toMutableMap(),
)
}
@@ -73258,6 +74764,7 @@ private constructor(
cardVerificationCode().validate()
cardholderAddress().validate()
+ cardholderName().ifPresent { it.validate() }
validated = true
}
@@ -73278,7 +74785,8 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(cardVerificationCode.asKnown().getOrNull()?.validity() ?: 0) +
- (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0)
+ (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (cardholderName.asKnown().getOrNull()?.validity() ?: 0)
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -74241,6 +75749,312 @@ private constructor(
"CardholderAddress{actualLine1=$actualLine1, actualPostalCode=$actualPostalCode, providedLine1=$providedLine1, providedPostalCode=$providedPostalCode, result=$result, additionalProperties=$additionalProperties}"
}
+ /** Cardholder name provided in the authorization request. */
+ class CardholderName
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val providedFirstName: JsonField,
+ private val providedLastName: JsonField,
+ private val providedMiddleName: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ providedFirstName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ providedLastName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ providedMiddleName: JsonField = JsonMissing.of(),
+ ) : this(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ mutableMapOf(),
+ )
+
+ /**
+ * The first name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedFirstName(): Optional =
+ providedFirstName.getOptional("provided_first_name")
+
+ /**
+ * The last name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedLastName(): Optional =
+ providedLastName.getOptional("provided_last_name")
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedMiddleName(): Optional =
+ providedMiddleName.getOptional("provided_middle_name")
+
+ /**
+ * Returns the raw JSON value of [providedFirstName].
+ *
+ * Unlike [providedFirstName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ fun _providedFirstName(): JsonField = providedFirstName
+
+ /**
+ * Returns the raw JSON value of [providedLastName].
+ *
+ * Unlike [providedLastName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ fun _providedLastName(): JsonField = providedLastName
+
+ /**
+ * Returns the raw JSON value of [providedMiddleName].
+ *
+ * Unlike [providedMiddleName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ fun _providedMiddleName(): JsonField = providedMiddleName
+
+ @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
+ * [CardholderName].
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CardholderName]. */
+ class Builder internal constructor() {
+
+ private var providedFirstName: JsonField? = null
+ private var providedLastName: JsonField? = null
+ private var providedMiddleName: JsonField? = null
+ private var additionalProperties: MutableMap =
+ mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(cardholderName: CardholderName) = apply {
+ providedFirstName = cardholderName.providedFirstName
+ providedLastName = cardholderName.providedLastName
+ providedMiddleName = cardholderName.providedMiddleName
+ additionalProperties =
+ cardholderName.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The first name provided for verification in the authorization request.
+ */
+ fun providedFirstName(providedFirstName: String?) =
+ providedFirstName(JsonField.ofNullable(providedFirstName))
+
+ /**
+ * Alias for calling [Builder.providedFirstName] with
+ * `providedFirstName.orElse(null)`.
+ */
+ fun providedFirstName(providedFirstName: Optional) =
+ providedFirstName(providedFirstName.getOrNull())
+
+ /**
+ * Sets [Builder.providedFirstName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedFirstName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedFirstName(providedFirstName: JsonField) = apply {
+ this.providedFirstName = providedFirstName
+ }
+
+ /** The last name provided for verification in the authorization request. */
+ fun providedLastName(providedLastName: String?) =
+ providedLastName(JsonField.ofNullable(providedLastName))
+
+ /**
+ * Alias for calling [Builder.providedLastName] with
+ * `providedLastName.orElse(null)`.
+ */
+ fun providedLastName(providedLastName: Optional) =
+ providedLastName(providedLastName.getOrNull())
+
+ /**
+ * Sets [Builder.providedLastName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedLastName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedLastName(providedLastName: JsonField) = apply {
+ this.providedLastName = providedLastName
+ }
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ */
+ fun providedMiddleName(providedMiddleName: String?) =
+ providedMiddleName(JsonField.ofNullable(providedMiddleName))
+
+ /**
+ * Alias for calling [Builder.providedMiddleName] with
+ * `providedMiddleName.orElse(null)`.
+ */
+ fun providedMiddleName(providedMiddleName: Optional) =
+ providedMiddleName(providedMiddleName.getOrNull())
+
+ /**
+ * Sets [Builder.providedMiddleName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedMiddleName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedMiddleName(providedMiddleName: JsonField) = apply {
+ this.providedMiddleName = providedMiddleName
+ }
+
+ 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 [CardholderName].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CardholderName =
+ CardholderName(
+ checkRequired("providedFirstName", providedFirstName),
+ checkRequired("providedLastName", providedLastName),
+ checkRequired("providedMiddleName", providedMiddleName),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CardholderName = apply {
+ if (validated) {
+ return@apply
+ }
+
+ providedFirstName()
+ providedLastName()
+ providedMiddleName()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ 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 (providedFirstName.asKnown().isPresent) 1 else 0) +
+ (if (providedLastName.asKnown().isPresent) 1 else 0) +
+ (if (providedMiddleName.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CardholderName &&
+ providedFirstName == other.providedFirstName &&
+ providedLastName == other.providedLastName &&
+ providedMiddleName == other.providedMiddleName &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CardholderName{providedFirstName=$providedFirstName, providedLastName=$providedLastName, providedMiddleName=$providedMiddleName, additionalProperties=$additionalProperties}"
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
@@ -74249,17 +76063,23 @@ private constructor(
return other is Verification &&
cardVerificationCode == other.cardVerificationCode &&
cardholderAddress == other.cardholderAddress &&
+ cardholderName == other.cardholderName &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(cardVerificationCode, cardholderAddress, additionalProperties)
+ Objects.hash(
+ cardVerificationCode,
+ cardholderAddress,
+ cardholderName,
+ additionalProperties,
+ )
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, additionalProperties=$additionalProperties}"
+ "Verification{cardVerificationCode=$cardVerificationCode, cardholderAddress=$cardholderAddress, cardholderName=$cardholderName, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransaction.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransaction.kt
index 603dea243..7526acf21 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransaction.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransaction.kt
@@ -10425,6 +10425,7 @@ private constructor(
private constructor(
private val cardVerificationCode: JsonField,
private val cardholderAddress: JsonField,
+ private val cardholderName: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -10436,7 +10437,10 @@ private constructor(
@JsonProperty("cardholder_address")
@ExcludeMissing
cardholderAddress: JsonField = JsonMissing.of(),
- ) : this(cardVerificationCode, cardholderAddress, mutableMapOf())
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ cardholderName: JsonField = JsonMissing.of(),
+ ) : this(cardVerificationCode, cardholderAddress, cardholderName, mutableMapOf())
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -10460,6 +10464,15 @@ private constructor(
fun cardholderAddress(): CardholderAddress =
cardholderAddress.getRequired("cardholder_address")
+ /**
+ * Cardholder name provided in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun cardholderName(): Optional =
+ cardholderName.getOptional("cardholder_name")
+
/**
* Returns the raw JSON value of [cardVerificationCode].
*
@@ -10480,6 +10493,16 @@ private constructor(
@ExcludeMissing
fun _cardholderAddress(): JsonField = cardholderAddress
+ /**
+ * Returns the raw JSON value of [cardholderName].
+ *
+ * Unlike [cardholderName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ fun _cardholderName(): JsonField = cardholderName
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -10501,6 +10524,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -10511,12 +10535,14 @@ private constructor(
private var cardVerificationCode: JsonField? = null
private var cardholderAddress: JsonField? = null
+ private var cardholderName: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(verification: Verification) = apply {
cardVerificationCode = verification.cardVerificationCode
cardholderAddress = verification.cardholderAddress
+ cardholderName = verification.cardholderName
additionalProperties = verification.additionalProperties.toMutableMap()
}
@@ -10556,6 +10582,28 @@ private constructor(
this.cardholderAddress = cardholderAddress
}
+ /** Cardholder name provided in the authorization request. */
+ fun cardholderName(cardholderName: CardholderName?) =
+ cardholderName(JsonField.ofNullable(cardholderName))
+
+ /**
+ * Alias for calling [Builder.cardholderName] with
+ * `cardholderName.orElse(null)`.
+ */
+ fun cardholderName(cardholderName: Optional) =
+ cardholderName(cardholderName.getOrNull())
+
+ /**
+ * Sets [Builder.cardholderName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardholderName] with a well-typed
+ * [CardholderName] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun cardholderName(cardholderName: JsonField) = apply {
+ this.cardholderName = cardholderName
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -10587,6 +10635,7 @@ private constructor(
* ```java
* .cardVerificationCode()
* .cardholderAddress()
+ * .cardholderName()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -10595,6 +10644,7 @@ private constructor(
Verification(
checkRequired("cardVerificationCode", cardVerificationCode),
checkRequired("cardholderAddress", cardholderAddress),
+ checkRequired("cardholderName", cardholderName),
additionalProperties.toMutableMap(),
)
}
@@ -10608,6 +10658,7 @@ private constructor(
cardVerificationCode().validate()
cardholderAddress().validate()
+ cardholderName().ifPresent { it.validate() }
validated = true
}
@@ -10628,7 +10679,8 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(cardVerificationCode.asKnown().getOrNull()?.validity() ?: 0) +
- (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0)
+ (cardholderAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (cardholderName.asKnown().getOrNull()?.validity() ?: 0)
/**
* Fields related to verification of the Card Verification Code, a 3-digit code on
@@ -11591,6 +11643,312 @@ private constructor(
"CardholderAddress{actualLine1=$actualLine1, actualPostalCode=$actualPostalCode, providedLine1=$providedLine1, providedPostalCode=$providedPostalCode, result=$result, additionalProperties=$additionalProperties}"
}
+ /** Cardholder name provided in the authorization request. */
+ class CardholderName
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val providedFirstName: JsonField,
+ private val providedLastName: JsonField,
+ private val providedMiddleName: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ providedFirstName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ providedLastName: JsonField = JsonMissing.of(),
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ providedMiddleName: JsonField = JsonMissing.of(),
+ ) : this(
+ providedFirstName,
+ providedLastName,
+ providedMiddleName,
+ mutableMapOf(),
+ )
+
+ /**
+ * The first name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedFirstName(): Optional =
+ providedFirstName.getOptional("provided_first_name")
+
+ /**
+ * The last name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedLastName(): Optional =
+ providedLastName.getOptional("provided_last_name")
+
+ /**
+ * The middle name provided for verification in the authorization request.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun providedMiddleName(): Optional =
+ providedMiddleName.getOptional("provided_middle_name")
+
+ /**
+ * Returns the raw JSON value of [providedFirstName].
+ *
+ * Unlike [providedFirstName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_first_name")
+ @ExcludeMissing
+ fun _providedFirstName(): JsonField = providedFirstName
+
+ /**
+ * Returns the raw JSON value of [providedLastName].
+ *
+ * Unlike [providedLastName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("provided_last_name")
+ @ExcludeMissing
+ fun _providedLastName(): JsonField = providedLastName
+
+ /**
+ * Returns the raw JSON value of [providedMiddleName].
+ *
+ * Unlike [providedMiddleName], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("provided_middle_name")
+ @ExcludeMissing
+ fun _providedMiddleName(): JsonField = providedMiddleName
+
+ @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
+ * [CardholderName].
+ *
+ * The following fields are required:
+ * ```java
+ * .providedFirstName()
+ * .providedLastName()
+ * .providedMiddleName()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CardholderName]. */
+ class Builder internal constructor() {
+
+ private var providedFirstName: JsonField? = null
+ private var providedLastName: JsonField? = null
+ private var providedMiddleName: JsonField? = null
+ private var additionalProperties: MutableMap =
+ mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(cardholderName: CardholderName) = apply {
+ providedFirstName = cardholderName.providedFirstName
+ providedLastName = cardholderName.providedLastName
+ providedMiddleName = cardholderName.providedMiddleName
+ additionalProperties =
+ cardholderName.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The first name provided for verification in the authorization request.
+ */
+ fun providedFirstName(providedFirstName: String?) =
+ providedFirstName(JsonField.ofNullable(providedFirstName))
+
+ /**
+ * Alias for calling [Builder.providedFirstName] with
+ * `providedFirstName.orElse(null)`.
+ */
+ fun providedFirstName(providedFirstName: Optional) =
+ providedFirstName(providedFirstName.getOrNull())
+
+ /**
+ * Sets [Builder.providedFirstName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.providedFirstName] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun providedFirstName(providedFirstName: JsonField