diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 58cd7a5c4..e29156ed6 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.453.0"
+ ".": "0.454.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 507678f12..c9fd3761c 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 234
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-561b73fd99114001dc2e93ee7371e33969398e7bc5b7e78dd1b3e8eea8e254ff.yml
-openapi_spec_hash: 3b0ba693d170e8b422ba9255cdc96853
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-946ad9479adebd282fe6122c780bc4d062ff9ce0e8794c74bd1ec4aa330aab04.yml
+openapi_spec_hash: eb1f88706f7c87c9f72903c7a7c96026
config_hash: 890ca5fa6b8209d4eaac90550c7dc62c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01841dfb4..baddd344d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.454.0 (2026-03-06)
+
+Full Changelog: [v0.453.0...v0.454.0](https://github.com/Increase/increase-java/compare/v0.453.0...v0.454.0)
+
+### Features
+
+* **api:** api update ([5100fe7](https://github.com/Increase/increase-java/commit/5100fe73c315a434195ee1ab50c9b789c625f89c))
+
## 0.453.0 (2026-03-05)
Full Changelog: [v0.452.0...v0.453.0](https://github.com/Increase/increase-java/compare/v0.452.0...v0.453.0)
diff --git a/README.md b/README.md
index 9dce5321d..11da4e0ba 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.453.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.453.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.454.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.454.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.453.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.454.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.453.0")
+implementation("com.increase.api:increase-java:0.454.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.453.0")
com.increase.api
increase-java
- 0.453.0
+ 0.454.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 2b0f1e1e5..833f3a52b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.453.0" // x-release-please-version
+ version = "0.454.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimedecisions/RealTimeDecision.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimedecisions/RealTimeDecision.kt
index ec95e5bd3..427fd99f5 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimedecisions/RealTimeDecision.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimedecisions/RealTimeDecision.kt
@@ -691,26 +691,207 @@ private constructor(
class CardAuthentication
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
+ private val accessControlServerTransactionId: JsonField,
private val accountId: JsonField,
+ private val billingAddressCity: JsonField,
+ private val billingAddressCountry: JsonField,
+ private val billingAddressLine1: JsonField,
+ private val billingAddressLine2: JsonField,
+ private val billingAddressLine3: JsonField,
+ private val billingAddressPostalCode: JsonField,
+ private val billingAddressState: JsonField,
private val cardId: JsonField,
+ private val cardholderEmail: JsonField,
+ private val cardholderName: JsonField,
+ private val category: JsonField,
private val decision: JsonField,
+ private val deviceChannel: JsonField,
+ private val directoryServerTransactionId: JsonField,
+ private val merchantAcceptorId: JsonField,
+ private val merchantCategoryCode: JsonField,
+ private val merchantCountry: JsonField,
+ private val merchantName: JsonField,
+ private val priorCardAuthenticationId: JsonField,
+ private val purchaseAmount: JsonField,
+ private val purchaseCurrency: JsonField,
+ private val requestorAuthenticationIndicator: JsonField,
+ private val requestorChallengeIndicator: JsonField,
+ private val requestorName: JsonField,
+ private val requestorUrl: JsonField,
+ private val shippingAddressCity: JsonField,
+ private val shippingAddressCountry: JsonField,
+ private val shippingAddressLine1: JsonField,
+ private val shippingAddressLine2: JsonField,
+ private val shippingAddressLine3: JsonField,
+ private val shippingAddressPostalCode: JsonField,
+ private val shippingAddressState: JsonField,
+ private val threeDSecureServerTransactionId: JsonField,
+ private val transactionType: JsonField,
private val upcomingCardPaymentId: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
+ @JsonProperty("access_control_server_transaction_id")
+ @ExcludeMissing
+ accessControlServerTransactionId: JsonField = JsonMissing.of(),
@JsonProperty("account_id")
@ExcludeMissing
accountId: JsonField = JsonMissing.of(),
+ @JsonProperty("billing_address_city")
+ @ExcludeMissing
+ billingAddressCity: JsonField = JsonMissing.of(),
+ @JsonProperty("billing_address_country")
+ @ExcludeMissing
+ billingAddressCountry: JsonField = JsonMissing.of(),
+ @JsonProperty("billing_address_line1")
+ @ExcludeMissing
+ billingAddressLine1: JsonField = JsonMissing.of(),
+ @JsonProperty("billing_address_line2")
+ @ExcludeMissing
+ billingAddressLine2: JsonField = JsonMissing.of(),
+ @JsonProperty("billing_address_line3")
+ @ExcludeMissing
+ billingAddressLine3: JsonField = JsonMissing.of(),
+ @JsonProperty("billing_address_postal_code")
+ @ExcludeMissing
+ billingAddressPostalCode: JsonField = JsonMissing.of(),
+ @JsonProperty("billing_address_state")
+ @ExcludeMissing
+ billingAddressState: JsonField = JsonMissing.of(),
@JsonProperty("card_id") @ExcludeMissing cardId: JsonField = JsonMissing.of(),
+ @JsonProperty("cardholder_email")
+ @ExcludeMissing
+ cardholderEmail: JsonField = JsonMissing.of(),
+ @JsonProperty("cardholder_name")
+ @ExcludeMissing
+ cardholderName: JsonField = JsonMissing.of(),
+ @JsonProperty("category")
+ @ExcludeMissing
+ category: JsonField = JsonMissing.of(),
@JsonProperty("decision")
@ExcludeMissing
decision: JsonField = JsonMissing.of(),
+ @JsonProperty("device_channel")
+ @ExcludeMissing
+ deviceChannel: JsonField = JsonMissing.of(),
+ @JsonProperty("directory_server_transaction_id")
+ @ExcludeMissing
+ directoryServerTransactionId: JsonField = JsonMissing.of(),
+ @JsonProperty("merchant_acceptor_id")
+ @ExcludeMissing
+ merchantAcceptorId: JsonField = JsonMissing.of(),
+ @JsonProperty("merchant_category_code")
+ @ExcludeMissing
+ merchantCategoryCode: JsonField = JsonMissing.of(),
+ @JsonProperty("merchant_country")
+ @ExcludeMissing
+ merchantCountry: JsonField = JsonMissing.of(),
+ @JsonProperty("merchant_name")
+ @ExcludeMissing
+ merchantName: JsonField = JsonMissing.of(),
+ @JsonProperty("prior_card_authentication_id")
+ @ExcludeMissing
+ priorCardAuthenticationId: JsonField = JsonMissing.of(),
+ @JsonProperty("purchase_amount")
+ @ExcludeMissing
+ purchaseAmount: JsonField = JsonMissing.of(),
+ @JsonProperty("purchase_currency")
+ @ExcludeMissing
+ purchaseCurrency: JsonField = JsonMissing.of(),
+ @JsonProperty("requestor_authentication_indicator")
+ @ExcludeMissing
+ requestorAuthenticationIndicator: JsonField =
+ JsonMissing.of(),
+ @JsonProperty("requestor_challenge_indicator")
+ @ExcludeMissing
+ requestorChallengeIndicator: JsonField = JsonMissing.of(),
+ @JsonProperty("requestor_name")
+ @ExcludeMissing
+ requestorName: JsonField = JsonMissing.of(),
+ @JsonProperty("requestor_url")
+ @ExcludeMissing
+ requestorUrl: JsonField = JsonMissing.of(),
+ @JsonProperty("shipping_address_city")
+ @ExcludeMissing
+ shippingAddressCity: JsonField = JsonMissing.of(),
+ @JsonProperty("shipping_address_country")
+ @ExcludeMissing
+ shippingAddressCountry: JsonField = JsonMissing.of(),
+ @JsonProperty("shipping_address_line1")
+ @ExcludeMissing
+ shippingAddressLine1: JsonField = JsonMissing.of(),
+ @JsonProperty("shipping_address_line2")
+ @ExcludeMissing
+ shippingAddressLine2: JsonField = JsonMissing.of(),
+ @JsonProperty("shipping_address_line3")
+ @ExcludeMissing
+ shippingAddressLine3: JsonField = JsonMissing.of(),
+ @JsonProperty("shipping_address_postal_code")
+ @ExcludeMissing
+ shippingAddressPostalCode: JsonField = JsonMissing.of(),
+ @JsonProperty("shipping_address_state")
+ @ExcludeMissing
+ shippingAddressState: JsonField = JsonMissing.of(),
+ @JsonProperty("three_d_secure_server_transaction_id")
+ @ExcludeMissing
+ threeDSecureServerTransactionId: JsonField = JsonMissing.of(),
+ @JsonProperty("transaction_type")
+ @ExcludeMissing
+ transactionType: JsonField = JsonMissing.of(),
@JsonProperty("upcoming_card_payment_id")
@ExcludeMissing
upcomingCardPaymentId: JsonField = JsonMissing.of(),
- ) : this(accountId, cardId, decision, upcomingCardPaymentId, mutableMapOf())
+ ) : this(
+ accessControlServerTransactionId,
+ accountId,
+ billingAddressCity,
+ billingAddressCountry,
+ billingAddressLine1,
+ billingAddressLine2,
+ billingAddressLine3,
+ billingAddressPostalCode,
+ billingAddressState,
+ cardId,
+ cardholderEmail,
+ cardholderName,
+ category,
+ decision,
+ deviceChannel,
+ directoryServerTransactionId,
+ merchantAcceptorId,
+ merchantCategoryCode,
+ merchantCountry,
+ merchantName,
+ priorCardAuthenticationId,
+ purchaseAmount,
+ purchaseCurrency,
+ requestorAuthenticationIndicator,
+ requestorChallengeIndicator,
+ requestorName,
+ requestorUrl,
+ shippingAddressCity,
+ shippingAddressCountry,
+ shippingAddressLine1,
+ shippingAddressLine2,
+ shippingAddressLine3,
+ shippingAddressPostalCode,
+ shippingAddressState,
+ threeDSecureServerTransactionId,
+ transactionType,
+ upcomingCardPaymentId,
+ mutableMapOf(),
+ )
+
+ /**
+ * A unique identifier assigned by the Access Control Server (us) for this transaction.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun accessControlServerTransactionId(): String =
+ accessControlServerTransactionId.getRequired("access_control_server_transaction_id")
/**
* The identifier of the Account the card belongs to.
@@ -721,13 +902,107 @@ private constructor(
fun accountId(): String = accountId.getRequired("account_id")
/**
- * The identifier of the Card that is being tokenized.
+ * The city of the cardholder billing address associated with the card used for this
+ * purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun billingAddressCity(): Optional =
+ billingAddressCity.getOptional("billing_address_city")
+
+ /**
+ * The country of the cardholder billing address associated with the card used for this
+ * purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun billingAddressCountry(): Optional =
+ billingAddressCountry.getOptional("billing_address_country")
+
+ /**
+ * The first line of the cardholder billing address associated with the card used for this
+ * purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun billingAddressLine1(): Optional =
+ billingAddressLine1.getOptional("billing_address_line1")
+
+ /**
+ * The second line of the cardholder billing address associated with the card used for this
+ * purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun billingAddressLine2(): Optional =
+ billingAddressLine2.getOptional("billing_address_line2")
+
+ /**
+ * The third line of the cardholder billing address associated with the card used for this
+ * purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun billingAddressLine3(): Optional =
+ billingAddressLine3.getOptional("billing_address_line3")
+
+ /**
+ * The postal code of the cardholder billing address associated with the card used for this
+ * purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun billingAddressPostalCode(): Optional =
+ billingAddressPostalCode.getOptional("billing_address_postal_code")
+
+ /**
+ * The US state of the cardholder billing address associated with the card used for this
+ * purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun billingAddressState(): Optional =
+ billingAddressState.getOptional("billing_address_state")
+
+ /**
+ * The identifier of the Card.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
fun cardId(): String = cardId.getRequired("card_id")
+ /**
+ * The email address of the cardholder.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun cardholderEmail(): Optional = cardholderEmail.getOptional("cardholder_email")
+
+ /**
+ * The name of the cardholder.
+ *
+ * @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")
+
+ /**
+ * The category of the card authentication attempt.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun category(): Optional = category.getOptional("category")
+
/**
* Whether or not the authentication attempt was approved.
*
@@ -737,231 +1012,3832 @@ private constructor(
fun decision(): Optional = decision.getOptional("decision")
/**
- * The identifier of the Card Payment this authentication attempt will belong to. Available
- * in the API once the card authentication has completed.
+ * The device channel of the card authentication attempt.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun upcomingCardPaymentId(): String =
- upcomingCardPaymentId.getRequired("upcoming_card_payment_id")
+ fun deviceChannel(): DeviceChannel = deviceChannel.getRequired("device_channel")
/**
- * Returns the raw JSON value of [accountId].
+ * A unique identifier assigned by the Directory Server (the card network) for this
+ * transaction.
*
- * Unlike [accountId], this method doesn't throw if the JSON field has an unexpected type.
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- @JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId
+ fun directoryServerTransactionId(): String =
+ directoryServerTransactionId.getRequired("directory_server_transaction_id")
/**
- * Returns the raw JSON value of [cardId].
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card is
+ * transacting with.
*
- * Unlike [cardId], this method doesn't throw if the JSON field has an unexpected type.
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- @JsonProperty("card_id") @ExcludeMissing fun _cardId(): JsonField = cardId
+ fun merchantAcceptorId(): String = merchantAcceptorId.getRequired("merchant_acceptor_id")
/**
- * Returns the raw JSON value of [decision].
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is
+ * transacting with.
*
- * Unlike [decision], this method doesn't throw if the JSON field has an unexpected type.
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- @JsonProperty("decision") @ExcludeMissing fun _decision(): JsonField = decision
+ fun merchantCategoryCode(): String =
+ merchantCategoryCode.getRequired("merchant_category_code")
/**
- * Returns the raw JSON value of [upcomingCardPaymentId].
+ * The country the merchant resides in.
*
- * Unlike [upcomingCardPaymentId], this method doesn't throw if the JSON field has an
- * unexpected type.
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- @JsonProperty("upcoming_card_payment_id")
- @ExcludeMissing
- fun _upcomingCardPaymentId(): JsonField = upcomingCardPaymentId
+ fun merchantCountry(): String = merchantCountry.getRequired("merchant_country")
- @JsonAnySetter
- private fun putAdditionalProperty(key: String, value: JsonValue) {
- additionalProperties.put(key, value)
- }
+ /**
+ * The name of the merchant.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun merchantName(): String = merchantName.getRequired("merchant_name")
- @JsonAnyGetter
- @ExcludeMissing
- fun _additionalProperties(): Map =
- Collections.unmodifiableMap(additionalProperties)
+ /**
+ * The ID of a prior Card Authentication that the requestor used to authenticate this
+ * cardholder for a previous transaction.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun priorCardAuthenticationId(): Optional =
+ priorCardAuthenticationId.getOptional("prior_card_authentication_id")
- fun toBuilder() = Builder().from(this)
+ /**
+ * The purchase amount in minor units.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun purchaseAmount(): Optional = purchaseAmount.getOptional("purchase_amount")
- companion object {
+ /**
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the authentication
+ * attempt's purchase currency.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun purchaseCurrency(): Optional = purchaseCurrency.getOptional("purchase_currency")
- /**
- * Returns a mutable builder for constructing an instance of [CardAuthentication].
- *
- * The following fields are required:
- * ```java
- * .accountId()
- * .cardId()
- * .decision()
- * .upcomingCardPaymentId()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
+ /**
+ * The 3DS requestor authentication indicator describes why the authentication attempt is
+ * performed, such as for a recurring transaction.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun requestorAuthenticationIndicator(): Optional =
+ requestorAuthenticationIndicator.getOptional("requestor_authentication_indicator")
- /** A builder for [CardAuthentication]. */
- class Builder internal constructor() {
+ /**
+ * Indicates whether a challenge is requested for this transaction.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun requestorChallengeIndicator(): Optional =
+ requestorChallengeIndicator.getOptional("requestor_challenge_indicator")
- private var accountId: JsonField? = null
- private var cardId: JsonField? = null
- private var decision: JsonField? = null
- private var upcomingCardPaymentId: JsonField? = null
- private var additionalProperties: MutableMap = mutableMapOf()
+ /**
+ * The name of the 3DS requestor.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun requestorName(): String = requestorName.getRequired("requestor_name")
- @JvmSynthetic
- internal fun from(cardAuthentication: CardAuthentication) = apply {
- accountId = cardAuthentication.accountId
- cardId = cardAuthentication.cardId
- decision = cardAuthentication.decision
- upcomingCardPaymentId = cardAuthentication.upcomingCardPaymentId
- additionalProperties = cardAuthentication.additionalProperties.toMutableMap()
+ /**
+ * The URL of the 3DS requestor.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun requestorUrl(): String = requestorUrl.getRequired("requestor_url")
+
+ /**
+ * The city of the shipping address associated with this purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun shippingAddressCity(): Optional =
+ shippingAddressCity.getOptional("shipping_address_city")
+
+ /**
+ * The country of the shipping address associated with this purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun shippingAddressCountry(): Optional =
+ shippingAddressCountry.getOptional("shipping_address_country")
+
+ /**
+ * The first line of the shipping address associated with this purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun shippingAddressLine1(): Optional =
+ shippingAddressLine1.getOptional("shipping_address_line1")
+
+ /**
+ * The second line of the shipping address associated with this purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun shippingAddressLine2(): Optional =
+ shippingAddressLine2.getOptional("shipping_address_line2")
+
+ /**
+ * The third line of the shipping address associated with this purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun shippingAddressLine3(): Optional =
+ shippingAddressLine3.getOptional("shipping_address_line3")
+
+ /**
+ * The postal code of the shipping address associated with this purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun shippingAddressPostalCode(): Optional =
+ shippingAddressPostalCode.getOptional("shipping_address_postal_code")
+
+ /**
+ * The US state of the shipping address associated with this purchase.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun shippingAddressState(): Optional =
+ shippingAddressState.getOptional("shipping_address_state")
+
+ /**
+ * A unique identifier assigned by the 3DS Server initiating the authentication attempt for
+ * this transaction.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun threeDSecureServerTransactionId(): String =
+ threeDSecureServerTransactionId.getRequired("three_d_secure_server_transaction_id")
+
+ /**
+ * The type of transaction being authenticated.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun transactionType(): Optional =
+ transactionType.getOptional("transaction_type")
+
+ /**
+ * The identifier of the Card Payment this authentication attempt will belong to. Available
+ * in the API once the card authentication has completed.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun upcomingCardPaymentId(): String =
+ upcomingCardPaymentId.getRequired("upcoming_card_payment_id")
+
+ /**
+ * Returns the raw JSON value of [accessControlServerTransactionId].
+ *
+ * Unlike [accessControlServerTransactionId], this method doesn't throw if the JSON field
+ * has an unexpected type.
+ */
+ @JsonProperty("access_control_server_transaction_id")
+ @ExcludeMissing
+ fun _accessControlServerTransactionId(): JsonField =
+ accessControlServerTransactionId
+
+ /**
+ * Returns the raw JSON value of [accountId].
+ *
+ * Unlike [accountId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId
+
+ /**
+ * Returns the raw JSON value of [billingAddressCity].
+ *
+ * Unlike [billingAddressCity], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("billing_address_city")
+ @ExcludeMissing
+ fun _billingAddressCity(): JsonField = billingAddressCity
+
+ /**
+ * Returns the raw JSON value of [billingAddressCountry].
+ *
+ * Unlike [billingAddressCountry], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("billing_address_country")
+ @ExcludeMissing
+ fun _billingAddressCountry(): JsonField = billingAddressCountry
+
+ /**
+ * Returns the raw JSON value of [billingAddressLine1].
+ *
+ * Unlike [billingAddressLine1], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("billing_address_line1")
+ @ExcludeMissing
+ fun _billingAddressLine1(): JsonField = billingAddressLine1
+
+ /**
+ * Returns the raw JSON value of [billingAddressLine2].
+ *
+ * Unlike [billingAddressLine2], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("billing_address_line2")
+ @ExcludeMissing
+ fun _billingAddressLine2(): JsonField = billingAddressLine2
+
+ /**
+ * Returns the raw JSON value of [billingAddressLine3].
+ *
+ * Unlike [billingAddressLine3], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("billing_address_line3")
+ @ExcludeMissing
+ fun _billingAddressLine3(): JsonField = billingAddressLine3
+
+ /**
+ * Returns the raw JSON value of [billingAddressPostalCode].
+ *
+ * Unlike [billingAddressPostalCode], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("billing_address_postal_code")
+ @ExcludeMissing
+ fun _billingAddressPostalCode(): JsonField = billingAddressPostalCode
+
+ /**
+ * Returns the raw JSON value of [billingAddressState].
+ *
+ * Unlike [billingAddressState], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("billing_address_state")
+ @ExcludeMissing
+ fun _billingAddressState(): JsonField = billingAddressState
+
+ /**
+ * Returns the raw JSON value of [cardId].
+ *
+ * Unlike [cardId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("card_id") @ExcludeMissing fun _cardId(): JsonField = cardId
+
+ /**
+ * Returns the raw JSON value of [cardholderEmail].
+ *
+ * Unlike [cardholderEmail], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("cardholder_email")
+ @ExcludeMissing
+ fun _cardholderEmail(): JsonField = cardholderEmail
+
+ /**
+ * 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
+
+ /**
+ * Returns the raw JSON value of [category].
+ *
+ * Unlike [category], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("category") @ExcludeMissing fun _category(): JsonField = category
+
+ /**
+ * Returns the raw JSON value of [decision].
+ *
+ * Unlike [decision], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("decision") @ExcludeMissing fun _decision(): JsonField = decision
+
+ /**
+ * Returns the raw JSON value of [deviceChannel].
+ *
+ * Unlike [deviceChannel], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("device_channel")
+ @ExcludeMissing
+ fun _deviceChannel(): JsonField = deviceChannel
+
+ /**
+ * Returns the raw JSON value of [directoryServerTransactionId].
+ *
+ * Unlike [directoryServerTransactionId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("directory_server_transaction_id")
+ @ExcludeMissing
+ fun _directoryServerTransactionId(): JsonField = directoryServerTransactionId
+
+ /**
+ * Returns the raw JSON value of [merchantAcceptorId].
+ *
+ * Unlike [merchantAcceptorId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("merchant_acceptor_id")
+ @ExcludeMissing
+ fun _merchantAcceptorId(): JsonField = merchantAcceptorId
+
+ /**
+ * Returns the raw JSON value of [merchantCategoryCode].
+ *
+ * Unlike [merchantCategoryCode], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("merchant_category_code")
+ @ExcludeMissing
+ fun _merchantCategoryCode(): JsonField = merchantCategoryCode
+
+ /**
+ * Returns the raw JSON value of [merchantCountry].
+ *
+ * Unlike [merchantCountry], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("merchant_country")
+ @ExcludeMissing
+ fun _merchantCountry(): JsonField = merchantCountry
+
+ /**
+ * Returns the raw JSON value of [merchantName].
+ *
+ * Unlike [merchantName], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("merchant_name")
+ @ExcludeMissing
+ fun _merchantName(): JsonField = merchantName
+
+ /**
+ * Returns the raw JSON value of [priorCardAuthenticationId].
+ *
+ * Unlike [priorCardAuthenticationId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("prior_card_authentication_id")
+ @ExcludeMissing
+ fun _priorCardAuthenticationId(): JsonField = priorCardAuthenticationId
+
+ /**
+ * Returns the raw JSON value of [purchaseAmount].
+ *
+ * Unlike [purchaseAmount], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("purchase_amount")
+ @ExcludeMissing
+ fun _purchaseAmount(): JsonField = purchaseAmount
+
+ /**
+ * Returns the raw JSON value of [purchaseCurrency].
+ *
+ * Unlike [purchaseCurrency], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("purchase_currency")
+ @ExcludeMissing
+ fun _purchaseCurrency(): JsonField = purchaseCurrency
+
+ /**
+ * Returns the raw JSON value of [requestorAuthenticationIndicator].
+ *
+ * Unlike [requestorAuthenticationIndicator], this method doesn't throw if the JSON field
+ * has an unexpected type.
+ */
+ @JsonProperty("requestor_authentication_indicator")
+ @ExcludeMissing
+ fun _requestorAuthenticationIndicator(): JsonField =
+ requestorAuthenticationIndicator
+
+ /**
+ * Returns the raw JSON value of [requestorChallengeIndicator].
+ *
+ * Unlike [requestorChallengeIndicator], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("requestor_challenge_indicator")
+ @ExcludeMissing
+ fun _requestorChallengeIndicator(): JsonField =
+ requestorChallengeIndicator
+
+ /**
+ * Returns the raw JSON value of [requestorName].
+ *
+ * Unlike [requestorName], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("requestor_name")
+ @ExcludeMissing
+ fun _requestorName(): JsonField = requestorName
+
+ /**
+ * Returns the raw JSON value of [requestorUrl].
+ *
+ * Unlike [requestorUrl], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("requestor_url")
+ @ExcludeMissing
+ fun _requestorUrl(): JsonField = requestorUrl
+
+ /**
+ * Returns the raw JSON value of [shippingAddressCity].
+ *
+ * Unlike [shippingAddressCity], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("shipping_address_city")
+ @ExcludeMissing
+ fun _shippingAddressCity(): JsonField = shippingAddressCity
+
+ /**
+ * Returns the raw JSON value of [shippingAddressCountry].
+ *
+ * Unlike [shippingAddressCountry], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("shipping_address_country")
+ @ExcludeMissing
+ fun _shippingAddressCountry(): JsonField = shippingAddressCountry
+
+ /**
+ * Returns the raw JSON value of [shippingAddressLine1].
+ *
+ * Unlike [shippingAddressLine1], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("shipping_address_line1")
+ @ExcludeMissing
+ fun _shippingAddressLine1(): JsonField = shippingAddressLine1
+
+ /**
+ * Returns the raw JSON value of [shippingAddressLine2].
+ *
+ * Unlike [shippingAddressLine2], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("shipping_address_line2")
+ @ExcludeMissing
+ fun _shippingAddressLine2(): JsonField = shippingAddressLine2
+
+ /**
+ * Returns the raw JSON value of [shippingAddressLine3].
+ *
+ * Unlike [shippingAddressLine3], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("shipping_address_line3")
+ @ExcludeMissing
+ fun _shippingAddressLine3(): JsonField = shippingAddressLine3
+
+ /**
+ * Returns the raw JSON value of [shippingAddressPostalCode].
+ *
+ * Unlike [shippingAddressPostalCode], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("shipping_address_postal_code")
+ @ExcludeMissing
+ fun _shippingAddressPostalCode(): JsonField = shippingAddressPostalCode
+
+ /**
+ * Returns the raw JSON value of [shippingAddressState].
+ *
+ * Unlike [shippingAddressState], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("shipping_address_state")
+ @ExcludeMissing
+ fun _shippingAddressState(): JsonField = shippingAddressState
+
+ /**
+ * Returns the raw JSON value of [threeDSecureServerTransactionId].
+ *
+ * Unlike [threeDSecureServerTransactionId], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("three_d_secure_server_transaction_id")
+ @ExcludeMissing
+ fun _threeDSecureServerTransactionId(): JsonField = threeDSecureServerTransactionId
+
+ /**
+ * Returns the raw JSON value of [transactionType].
+ *
+ * Unlike [transactionType], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("transaction_type")
+ @ExcludeMissing
+ fun _transactionType(): JsonField = transactionType
+
+ /**
+ * Returns the raw JSON value of [upcomingCardPaymentId].
+ *
+ * Unlike [upcomingCardPaymentId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("upcoming_card_payment_id")
+ @ExcludeMissing
+ fun _upcomingCardPaymentId(): JsonField = upcomingCardPaymentId
+
+ @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 [CardAuthentication].
+ *
+ * The following fields are required:
+ * ```java
+ * .accessControlServerTransactionId()
+ * .accountId()
+ * .billingAddressCity()
+ * .billingAddressCountry()
+ * .billingAddressLine1()
+ * .billingAddressLine2()
+ * .billingAddressLine3()
+ * .billingAddressPostalCode()
+ * .billingAddressState()
+ * .cardId()
+ * .cardholderEmail()
+ * .cardholderName()
+ * .category()
+ * .decision()
+ * .deviceChannel()
+ * .directoryServerTransactionId()
+ * .merchantAcceptorId()
+ * .merchantCategoryCode()
+ * .merchantCountry()
+ * .merchantName()
+ * .priorCardAuthenticationId()
+ * .purchaseAmount()
+ * .purchaseCurrency()
+ * .requestorAuthenticationIndicator()
+ * .requestorChallengeIndicator()
+ * .requestorName()
+ * .requestorUrl()
+ * .shippingAddressCity()
+ * .shippingAddressCountry()
+ * .shippingAddressLine1()
+ * .shippingAddressLine2()
+ * .shippingAddressLine3()
+ * .shippingAddressPostalCode()
+ * .shippingAddressState()
+ * .threeDSecureServerTransactionId()
+ * .transactionType()
+ * .upcomingCardPaymentId()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CardAuthentication]. */
+ class Builder internal constructor() {
+
+ private var accessControlServerTransactionId: JsonField? = null
+ private var accountId: JsonField? = null
+ private var billingAddressCity: JsonField? = null
+ private var billingAddressCountry: JsonField? = null
+ private var billingAddressLine1: JsonField? = null
+ private var billingAddressLine2: JsonField? = null
+ private var billingAddressLine3: JsonField? = null
+ private var billingAddressPostalCode: JsonField? = null
+ private var billingAddressState: JsonField? = null
+ private var cardId: JsonField? = null
+ private var cardholderEmail: JsonField? = null
+ private var cardholderName: JsonField? = null
+ private var category: JsonField? = null
+ private var decision: JsonField? = null
+ private var deviceChannel: JsonField? = null
+ private var directoryServerTransactionId: JsonField? = null
+ private var merchantAcceptorId: JsonField? = null
+ private var merchantCategoryCode: JsonField? = null
+ private var merchantCountry: JsonField? = null
+ private var merchantName: JsonField? = null
+ private var priorCardAuthenticationId: JsonField? = null
+ private var purchaseAmount: JsonField? = null
+ private var purchaseCurrency: JsonField? = null
+ private var requestorAuthenticationIndicator:
+ JsonField? =
+ null
+ private var requestorChallengeIndicator: JsonField? = null
+ private var requestorName: JsonField? = null
+ private var requestorUrl: JsonField? = null
+ private var shippingAddressCity: JsonField? = null
+ private var shippingAddressCountry: JsonField? = null
+ private var shippingAddressLine1: JsonField? = null
+ private var shippingAddressLine2: JsonField? = null
+ private var shippingAddressLine3: JsonField? = null
+ private var shippingAddressPostalCode: JsonField? = null
+ private var shippingAddressState: JsonField? = null
+ private var threeDSecureServerTransactionId: JsonField? = null
+ private var transactionType: JsonField? = null
+ private var upcomingCardPaymentId: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(cardAuthentication: CardAuthentication) = apply {
+ accessControlServerTransactionId =
+ cardAuthentication.accessControlServerTransactionId
+ accountId = cardAuthentication.accountId
+ billingAddressCity = cardAuthentication.billingAddressCity
+ billingAddressCountry = cardAuthentication.billingAddressCountry
+ billingAddressLine1 = cardAuthentication.billingAddressLine1
+ billingAddressLine2 = cardAuthentication.billingAddressLine2
+ billingAddressLine3 = cardAuthentication.billingAddressLine3
+ billingAddressPostalCode = cardAuthentication.billingAddressPostalCode
+ billingAddressState = cardAuthentication.billingAddressState
+ cardId = cardAuthentication.cardId
+ cardholderEmail = cardAuthentication.cardholderEmail
+ cardholderName = cardAuthentication.cardholderName
+ category = cardAuthentication.category
+ decision = cardAuthentication.decision
+ deviceChannel = cardAuthentication.deviceChannel
+ directoryServerTransactionId = cardAuthentication.directoryServerTransactionId
+ merchantAcceptorId = cardAuthentication.merchantAcceptorId
+ merchantCategoryCode = cardAuthentication.merchantCategoryCode
+ merchantCountry = cardAuthentication.merchantCountry
+ merchantName = cardAuthentication.merchantName
+ priorCardAuthenticationId = cardAuthentication.priorCardAuthenticationId
+ purchaseAmount = cardAuthentication.purchaseAmount
+ purchaseCurrency = cardAuthentication.purchaseCurrency
+ requestorAuthenticationIndicator =
+ cardAuthentication.requestorAuthenticationIndicator
+ requestorChallengeIndicator = cardAuthentication.requestorChallengeIndicator
+ requestorName = cardAuthentication.requestorName
+ requestorUrl = cardAuthentication.requestorUrl
+ shippingAddressCity = cardAuthentication.shippingAddressCity
+ shippingAddressCountry = cardAuthentication.shippingAddressCountry
+ shippingAddressLine1 = cardAuthentication.shippingAddressLine1
+ shippingAddressLine2 = cardAuthentication.shippingAddressLine2
+ shippingAddressLine3 = cardAuthentication.shippingAddressLine3
+ shippingAddressPostalCode = cardAuthentication.shippingAddressPostalCode
+ shippingAddressState = cardAuthentication.shippingAddressState
+ threeDSecureServerTransactionId = cardAuthentication.threeDSecureServerTransactionId
+ transactionType = cardAuthentication.transactionType
+ upcomingCardPaymentId = cardAuthentication.upcomingCardPaymentId
+ additionalProperties = cardAuthentication.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * A unique identifier assigned by the Access Control Server (us) for this transaction.
+ */
+ fun accessControlServerTransactionId(accessControlServerTransactionId: String) =
+ accessControlServerTransactionId(JsonField.of(accessControlServerTransactionId))
+
+ /**
+ * Sets [Builder.accessControlServerTransactionId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accessControlServerTransactionId] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun accessControlServerTransactionId(
+ accessControlServerTransactionId: JsonField
+ ) = apply { this.accessControlServerTransactionId = accessControlServerTransactionId }
+
+ /** The identifier of the Account the card belongs to. */
+ fun accountId(accountId: String) = accountId(JsonField.of(accountId))
+
+ /**
+ * Sets [Builder.accountId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accountId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun accountId(accountId: JsonField) = apply { this.accountId = accountId }
+
+ /**
+ * The city of the cardholder billing address associated with the card used for this
+ * purchase.
+ */
+ fun billingAddressCity(billingAddressCity: String?) =
+ billingAddressCity(JsonField.ofNullable(billingAddressCity))
+
+ /**
+ * Alias for calling [Builder.billingAddressCity] with
+ * `billingAddressCity.orElse(null)`.
+ */
+ fun billingAddressCity(billingAddressCity: Optional) =
+ billingAddressCity(billingAddressCity.getOrNull())
+
+ /**
+ * Sets [Builder.billingAddressCity] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.billingAddressCity] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun billingAddressCity(billingAddressCity: JsonField) = apply {
+ this.billingAddressCity = billingAddressCity
+ }
+
+ /**
+ * The country of the cardholder billing address associated with the card used for this
+ * purchase.
+ */
+ fun billingAddressCountry(billingAddressCountry: String?) =
+ billingAddressCountry(JsonField.ofNullable(billingAddressCountry))
+
+ /**
+ * Alias for calling [Builder.billingAddressCountry] with
+ * `billingAddressCountry.orElse(null)`.
+ */
+ fun billingAddressCountry(billingAddressCountry: Optional) =
+ billingAddressCountry(billingAddressCountry.getOrNull())
+
+ /**
+ * Sets [Builder.billingAddressCountry] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.billingAddressCountry] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun billingAddressCountry(billingAddressCountry: JsonField) = apply {
+ this.billingAddressCountry = billingAddressCountry
+ }
+
+ /**
+ * The first line of the cardholder billing address associated with the card used for
+ * this purchase.
+ */
+ fun billingAddressLine1(billingAddressLine1: String?) =
+ billingAddressLine1(JsonField.ofNullable(billingAddressLine1))
+
+ /**
+ * Alias for calling [Builder.billingAddressLine1] with
+ * `billingAddressLine1.orElse(null)`.
+ */
+ fun billingAddressLine1(billingAddressLine1: Optional) =
+ billingAddressLine1(billingAddressLine1.getOrNull())
+
+ /**
+ * Sets [Builder.billingAddressLine1] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.billingAddressLine1] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun billingAddressLine1(billingAddressLine1: JsonField) = apply {
+ this.billingAddressLine1 = billingAddressLine1
+ }
+
+ /**
+ * The second line of the cardholder billing address associated with the card used for
+ * this purchase.
+ */
+ fun billingAddressLine2(billingAddressLine2: String?) =
+ billingAddressLine2(JsonField.ofNullable(billingAddressLine2))
+
+ /**
+ * Alias for calling [Builder.billingAddressLine2] with
+ * `billingAddressLine2.orElse(null)`.
+ */
+ fun billingAddressLine2(billingAddressLine2: Optional) =
+ billingAddressLine2(billingAddressLine2.getOrNull())
+
+ /**
+ * Sets [Builder.billingAddressLine2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.billingAddressLine2] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun billingAddressLine2(billingAddressLine2: JsonField) = apply {
+ this.billingAddressLine2 = billingAddressLine2
+ }
+
+ /**
+ * The third line of the cardholder billing address associated with the card used for
+ * this purchase.
+ */
+ fun billingAddressLine3(billingAddressLine3: String?) =
+ billingAddressLine3(JsonField.ofNullable(billingAddressLine3))
+
+ /**
+ * Alias for calling [Builder.billingAddressLine3] with
+ * `billingAddressLine3.orElse(null)`.
+ */
+ fun billingAddressLine3(billingAddressLine3: Optional) =
+ billingAddressLine3(billingAddressLine3.getOrNull())
+
+ /**
+ * Sets [Builder.billingAddressLine3] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.billingAddressLine3] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun billingAddressLine3(billingAddressLine3: JsonField) = apply {
+ this.billingAddressLine3 = billingAddressLine3
+ }
+
+ /**
+ * The postal code of the cardholder billing address associated with the card used for
+ * this purchase.
+ */
+ fun billingAddressPostalCode(billingAddressPostalCode: String?) =
+ billingAddressPostalCode(JsonField.ofNullable(billingAddressPostalCode))
+
+ /**
+ * Alias for calling [Builder.billingAddressPostalCode] with
+ * `billingAddressPostalCode.orElse(null)`.
+ */
+ fun billingAddressPostalCode(billingAddressPostalCode: Optional) =
+ billingAddressPostalCode(billingAddressPostalCode.getOrNull())
+
+ /**
+ * Sets [Builder.billingAddressPostalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.billingAddressPostalCode] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun billingAddressPostalCode(billingAddressPostalCode: JsonField) = apply {
+ this.billingAddressPostalCode = billingAddressPostalCode
+ }
+
+ /**
+ * The US state of the cardholder billing address associated with the card used for this
+ * purchase.
+ */
+ fun billingAddressState(billingAddressState: String?) =
+ billingAddressState(JsonField.ofNullable(billingAddressState))
+
+ /**
+ * Alias for calling [Builder.billingAddressState] with
+ * `billingAddressState.orElse(null)`.
+ */
+ fun billingAddressState(billingAddressState: Optional) =
+ billingAddressState(billingAddressState.getOrNull())
+
+ /**
+ * Sets [Builder.billingAddressState] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.billingAddressState] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun billingAddressState(billingAddressState: JsonField) = apply {
+ this.billingAddressState = billingAddressState
+ }
+
+ /** The identifier of the Card. */
+ fun cardId(cardId: String) = cardId(JsonField.of(cardId))
+
+ /**
+ * Sets [Builder.cardId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun cardId(cardId: JsonField) = apply { this.cardId = cardId }
+
+ /** The email address of the cardholder. */
+ fun cardholderEmail(cardholderEmail: String?) =
+ cardholderEmail(JsonField.ofNullable(cardholderEmail))
+
+ /** Alias for calling [Builder.cardholderEmail] with `cardholderEmail.orElse(null)`. */
+ fun cardholderEmail(cardholderEmail: Optional) =
+ cardholderEmail(cardholderEmail.getOrNull())
+
+ /**
+ * Sets [Builder.cardholderEmail] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardholderEmail] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun cardholderEmail(cardholderEmail: JsonField) = apply {
+ this.cardholderEmail = cardholderEmail
+ }
+
+ /** The name of the cardholder. */
+ fun cardholderName(cardholderName: String?) =
+ 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 [String] 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
+ }
+
+ /** The category of the card authentication attempt. */
+ fun category(category: Category?) = category(JsonField.ofNullable(category))
+
+ /** Alias for calling [Builder.category] with `category.orElse(null)`. */
+ fun category(category: Optional) = category(category.getOrNull())
+
+ /**
+ * Sets [Builder.category] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.category] with a well-typed [Category] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun category(category: JsonField) = apply { this.category = category }
+
+ /** Whether or not the authentication attempt was approved. */
+ fun decision(decision: Decision?) = decision(JsonField.ofNullable(decision))
+
+ /** Alias for calling [Builder.decision] with `decision.orElse(null)`. */
+ fun decision(decision: Optional) = decision(decision.getOrNull())
+
+ /**
+ * Sets [Builder.decision] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.decision] with a well-typed [Decision] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun decision(decision: JsonField) = apply { this.decision = decision }
+
+ /** The device channel of the card authentication attempt. */
+ fun deviceChannel(deviceChannel: DeviceChannel) =
+ deviceChannel(JsonField.of(deviceChannel))
+
+ /**
+ * Sets [Builder.deviceChannel] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.deviceChannel] with a well-typed [DeviceChannel]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun deviceChannel(deviceChannel: JsonField) = apply {
+ this.deviceChannel = deviceChannel
+ }
+
+ /**
+ * A unique identifier assigned by the Directory Server (the card network) for this
+ * transaction.
+ */
+ fun directoryServerTransactionId(directoryServerTransactionId: String) =
+ directoryServerTransactionId(JsonField.of(directoryServerTransactionId))
+
+ /**
+ * Sets [Builder.directoryServerTransactionId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.directoryServerTransactionId] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun directoryServerTransactionId(directoryServerTransactionId: JsonField) =
+ apply {
+ this.directoryServerTransactionId = directoryServerTransactionId
+ }
+
+ /**
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card is
+ * transacting with.
+ */
+ fun merchantAcceptorId(merchantAcceptorId: String) =
+ merchantAcceptorId(JsonField.of(merchantAcceptorId))
+
+ /**
+ * Sets [Builder.merchantAcceptorId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.merchantAcceptorId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun merchantAcceptorId(merchantAcceptorId: JsonField) = apply {
+ this.merchantAcceptorId = merchantAcceptorId
+ }
+
+ /**
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is
+ * transacting with.
+ */
+ fun merchantCategoryCode(merchantCategoryCode: String) =
+ merchantCategoryCode(JsonField.of(merchantCategoryCode))
+
+ /**
+ * Sets [Builder.merchantCategoryCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.merchantCategoryCode] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun merchantCategoryCode(merchantCategoryCode: JsonField) = apply {
+ this.merchantCategoryCode = merchantCategoryCode
+ }
+
+ /** The country the merchant resides in. */
+ fun merchantCountry(merchantCountry: String) =
+ merchantCountry(JsonField.of(merchantCountry))
+
+ /**
+ * Sets [Builder.merchantCountry] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.merchantCountry] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun merchantCountry(merchantCountry: JsonField) = apply {
+ this.merchantCountry = merchantCountry
+ }
+
+ /** The name of the merchant. */
+ fun merchantName(merchantName: String) = merchantName(JsonField.of(merchantName))
+
+ /**
+ * Sets [Builder.merchantName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.merchantName] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun merchantName(merchantName: JsonField) = apply {
+ this.merchantName = merchantName
+ }
+
+ /**
+ * The ID of a prior Card Authentication that the requestor used to authenticate this
+ * cardholder for a previous transaction.
+ */
+ fun priorCardAuthenticationId(priorCardAuthenticationId: String?) =
+ priorCardAuthenticationId(JsonField.ofNullable(priorCardAuthenticationId))
+
+ /**
+ * Alias for calling [Builder.priorCardAuthenticationId] with
+ * `priorCardAuthenticationId.orElse(null)`.
+ */
+ fun priorCardAuthenticationId(priorCardAuthenticationId: Optional) =
+ priorCardAuthenticationId(priorCardAuthenticationId.getOrNull())
+
+ /**
+ * Sets [Builder.priorCardAuthenticationId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.priorCardAuthenticationId] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun priorCardAuthenticationId(priorCardAuthenticationId: JsonField) = apply {
+ this.priorCardAuthenticationId = priorCardAuthenticationId
+ }
+
+ /** The purchase amount in minor units. */
+ fun purchaseAmount(purchaseAmount: Long?) =
+ purchaseAmount(JsonField.ofNullable(purchaseAmount))
+
+ /**
+ * Alias for [Builder.purchaseAmount].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun purchaseAmount(purchaseAmount: Long) = purchaseAmount(purchaseAmount as Long?)
+
+ /** Alias for calling [Builder.purchaseAmount] with `purchaseAmount.orElse(null)`. */
+ fun purchaseAmount(purchaseAmount: Optional) =
+ purchaseAmount(purchaseAmount.getOrNull())
+
+ /**
+ * Sets [Builder.purchaseAmount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.purchaseAmount] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun purchaseAmount(purchaseAmount: JsonField) = apply {
+ this.purchaseAmount = purchaseAmount
+ }
+
+ /**
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the authentication
+ * attempt's purchase currency.
+ */
+ fun purchaseCurrency(purchaseCurrency: String?) =
+ purchaseCurrency(JsonField.ofNullable(purchaseCurrency))
+
+ /**
+ * Alias for calling [Builder.purchaseCurrency] with `purchaseCurrency.orElse(null)`.
+ */
+ fun purchaseCurrency(purchaseCurrency: Optional) =
+ purchaseCurrency(purchaseCurrency.getOrNull())
+
+ /**
+ * Sets [Builder.purchaseCurrency] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.purchaseCurrency] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun purchaseCurrency(purchaseCurrency: JsonField) = apply {
+ this.purchaseCurrency = purchaseCurrency
+ }
+
+ /**
+ * The 3DS requestor authentication indicator describes why the authentication attempt
+ * is performed, such as for a recurring transaction.
+ */
+ fun requestorAuthenticationIndicator(
+ requestorAuthenticationIndicator: RequestorAuthenticationIndicator?
+ ) =
+ requestorAuthenticationIndicator(
+ JsonField.ofNullable(requestorAuthenticationIndicator)
+ )
+
+ /**
+ * Alias for calling [Builder.requestorAuthenticationIndicator] with
+ * `requestorAuthenticationIndicator.orElse(null)`.
+ */
+ fun requestorAuthenticationIndicator(
+ requestorAuthenticationIndicator: Optional
+ ) = requestorAuthenticationIndicator(requestorAuthenticationIndicator.getOrNull())
+
+ /**
+ * Sets [Builder.requestorAuthenticationIndicator] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.requestorAuthenticationIndicator] with a well-typed
+ * [RequestorAuthenticationIndicator] value instead. This method is primarily for
+ * setting the field to an undocumented or not yet supported value.
+ */
+ fun requestorAuthenticationIndicator(
+ requestorAuthenticationIndicator: JsonField
+ ) = apply { this.requestorAuthenticationIndicator = requestorAuthenticationIndicator }
+
+ /** Indicates whether a challenge is requested for this transaction. */
+ fun requestorChallengeIndicator(
+ requestorChallengeIndicator: RequestorChallengeIndicator?
+ ) = requestorChallengeIndicator(JsonField.ofNullable(requestorChallengeIndicator))
+
+ /**
+ * Alias for calling [Builder.requestorChallengeIndicator] with
+ * `requestorChallengeIndicator.orElse(null)`.
+ */
+ fun requestorChallengeIndicator(
+ requestorChallengeIndicator: Optional
+ ) = requestorChallengeIndicator(requestorChallengeIndicator.getOrNull())
+
+ /**
+ * Sets [Builder.requestorChallengeIndicator] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.requestorChallengeIndicator] with a well-typed
+ * [RequestorChallengeIndicator] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun requestorChallengeIndicator(
+ requestorChallengeIndicator: JsonField
+ ) = apply { this.requestorChallengeIndicator = requestorChallengeIndicator }
+
+ /** The name of the 3DS requestor. */
+ fun requestorName(requestorName: String) = requestorName(JsonField.of(requestorName))
+
+ /**
+ * Sets [Builder.requestorName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.requestorName] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun requestorName(requestorName: JsonField) = apply {
+ this.requestorName = requestorName
+ }
+
+ /** The URL of the 3DS requestor. */
+ fun requestorUrl(requestorUrl: String) = requestorUrl(JsonField.of(requestorUrl))
+
+ /**
+ * Sets [Builder.requestorUrl] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.requestorUrl] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun requestorUrl(requestorUrl: JsonField) = apply {
+ this.requestorUrl = requestorUrl
+ }
+
+ /** The city of the shipping address associated with this purchase. */
+ fun shippingAddressCity(shippingAddressCity: String?) =
+ shippingAddressCity(JsonField.ofNullable(shippingAddressCity))
+
+ /**
+ * Alias for calling [Builder.shippingAddressCity] with
+ * `shippingAddressCity.orElse(null)`.
+ */
+ fun shippingAddressCity(shippingAddressCity: Optional) =
+ shippingAddressCity(shippingAddressCity.getOrNull())
+
+ /**
+ * Sets [Builder.shippingAddressCity] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.shippingAddressCity] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun shippingAddressCity(shippingAddressCity: JsonField) = apply {
+ this.shippingAddressCity = shippingAddressCity
+ }
+
+ /** The country of the shipping address associated with this purchase. */
+ fun shippingAddressCountry(shippingAddressCountry: String?) =
+ shippingAddressCountry(JsonField.ofNullable(shippingAddressCountry))
+
+ /**
+ * Alias for calling [Builder.shippingAddressCountry] with
+ * `shippingAddressCountry.orElse(null)`.
+ */
+ fun shippingAddressCountry(shippingAddressCountry: Optional) =
+ shippingAddressCountry(shippingAddressCountry.getOrNull())
+
+ /**
+ * Sets [Builder.shippingAddressCountry] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.shippingAddressCountry] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun shippingAddressCountry(shippingAddressCountry: JsonField) = apply {
+ this.shippingAddressCountry = shippingAddressCountry
+ }
+
+ /** The first line of the shipping address associated with this purchase. */
+ fun shippingAddressLine1(shippingAddressLine1: String?) =
+ shippingAddressLine1(JsonField.ofNullable(shippingAddressLine1))
+
+ /**
+ * Alias for calling [Builder.shippingAddressLine1] with
+ * `shippingAddressLine1.orElse(null)`.
+ */
+ fun shippingAddressLine1(shippingAddressLine1: Optional) =
+ shippingAddressLine1(shippingAddressLine1.getOrNull())
+
+ /**
+ * Sets [Builder.shippingAddressLine1] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.shippingAddressLine1] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun shippingAddressLine1(shippingAddressLine1: JsonField) = apply {
+ this.shippingAddressLine1 = shippingAddressLine1
+ }
+
+ /** The second line of the shipping address associated with this purchase. */
+ fun shippingAddressLine2(shippingAddressLine2: String?) =
+ shippingAddressLine2(JsonField.ofNullable(shippingAddressLine2))
+
+ /**
+ * Alias for calling [Builder.shippingAddressLine2] with
+ * `shippingAddressLine2.orElse(null)`.
+ */
+ fun shippingAddressLine2(shippingAddressLine2: Optional) =
+ shippingAddressLine2(shippingAddressLine2.getOrNull())
+
+ /**
+ * Sets [Builder.shippingAddressLine2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.shippingAddressLine2] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun shippingAddressLine2(shippingAddressLine2: JsonField) = apply {
+ this.shippingAddressLine2 = shippingAddressLine2
+ }
+
+ /** The third line of the shipping address associated with this purchase. */
+ fun shippingAddressLine3(shippingAddressLine3: String?) =
+ shippingAddressLine3(JsonField.ofNullable(shippingAddressLine3))
+
+ /**
+ * Alias for calling [Builder.shippingAddressLine3] with
+ * `shippingAddressLine3.orElse(null)`.
+ */
+ fun shippingAddressLine3(shippingAddressLine3: Optional) =
+ shippingAddressLine3(shippingAddressLine3.getOrNull())
+
+ /**
+ * Sets [Builder.shippingAddressLine3] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.shippingAddressLine3] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun shippingAddressLine3(shippingAddressLine3: JsonField) = apply {
+ this.shippingAddressLine3 = shippingAddressLine3
+ }
+
+ /** The postal code of the shipping address associated with this purchase. */
+ fun shippingAddressPostalCode(shippingAddressPostalCode: String?) =
+ shippingAddressPostalCode(JsonField.ofNullable(shippingAddressPostalCode))
+
+ /**
+ * Alias for calling [Builder.shippingAddressPostalCode] with
+ * `shippingAddressPostalCode.orElse(null)`.
+ */
+ fun shippingAddressPostalCode(shippingAddressPostalCode: Optional) =
+ shippingAddressPostalCode(shippingAddressPostalCode.getOrNull())
+
+ /**
+ * Sets [Builder.shippingAddressPostalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.shippingAddressPostalCode] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun shippingAddressPostalCode(shippingAddressPostalCode: JsonField) = apply {
+ this.shippingAddressPostalCode = shippingAddressPostalCode
+ }
+
+ /** The US state of the shipping address associated with this purchase. */
+ fun shippingAddressState(shippingAddressState: String?) =
+ shippingAddressState(JsonField.ofNullable(shippingAddressState))
+
+ /**
+ * Alias for calling [Builder.shippingAddressState] with
+ * `shippingAddressState.orElse(null)`.
+ */
+ fun shippingAddressState(shippingAddressState: Optional) =
+ shippingAddressState(shippingAddressState.getOrNull())
+
+ /**
+ * Sets [Builder.shippingAddressState] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.shippingAddressState] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun shippingAddressState(shippingAddressState: JsonField) = apply {
+ this.shippingAddressState = shippingAddressState
+ }
+
+ /**
+ * A unique identifier assigned by the 3DS Server initiating the authentication attempt
+ * for this transaction.
+ */
+ fun threeDSecureServerTransactionId(threeDSecureServerTransactionId: String) =
+ threeDSecureServerTransactionId(JsonField.of(threeDSecureServerTransactionId))
+
+ /**
+ * Sets [Builder.threeDSecureServerTransactionId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.threeDSecureServerTransactionId] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun threeDSecureServerTransactionId(
+ threeDSecureServerTransactionId: JsonField
+ ) = apply { this.threeDSecureServerTransactionId = threeDSecureServerTransactionId }
+
+ /** The type of transaction being authenticated. */
+ fun transactionType(transactionType: TransactionType?) =
+ transactionType(JsonField.ofNullable(transactionType))
+
+ /** Alias for calling [Builder.transactionType] with `transactionType.orElse(null)`. */
+ fun transactionType(transactionType: Optional) =
+ transactionType(transactionType.getOrNull())
+
+ /**
+ * Sets [Builder.transactionType] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.transactionType] with a well-typed [TransactionType]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun transactionType(transactionType: JsonField) = apply {
+ this.transactionType = transactionType
+ }
+
+ /**
+ * The identifier of the Card Payment this authentication attempt will belong to.
+ * Available in the API once the card authentication has completed.
+ */
+ fun upcomingCardPaymentId(upcomingCardPaymentId: String) =
+ upcomingCardPaymentId(JsonField.of(upcomingCardPaymentId))
+
+ /**
+ * Sets [Builder.upcomingCardPaymentId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.upcomingCardPaymentId] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun upcomingCardPaymentId(upcomingCardPaymentId: JsonField) = apply {
+ this.upcomingCardPaymentId = upcomingCardPaymentId
+ }
+
+ 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 [CardAuthentication].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .accessControlServerTransactionId()
+ * .accountId()
+ * .billingAddressCity()
+ * .billingAddressCountry()
+ * .billingAddressLine1()
+ * .billingAddressLine2()
+ * .billingAddressLine3()
+ * .billingAddressPostalCode()
+ * .billingAddressState()
+ * .cardId()
+ * .cardholderEmail()
+ * .cardholderName()
+ * .category()
+ * .decision()
+ * .deviceChannel()
+ * .directoryServerTransactionId()
+ * .merchantAcceptorId()
+ * .merchantCategoryCode()
+ * .merchantCountry()
+ * .merchantName()
+ * .priorCardAuthenticationId()
+ * .purchaseAmount()
+ * .purchaseCurrency()
+ * .requestorAuthenticationIndicator()
+ * .requestorChallengeIndicator()
+ * .requestorName()
+ * .requestorUrl()
+ * .shippingAddressCity()
+ * .shippingAddressCountry()
+ * .shippingAddressLine1()
+ * .shippingAddressLine2()
+ * .shippingAddressLine3()
+ * .shippingAddressPostalCode()
+ * .shippingAddressState()
+ * .threeDSecureServerTransactionId()
+ * .transactionType()
+ * .upcomingCardPaymentId()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CardAuthentication =
+ CardAuthentication(
+ checkRequired(
+ "accessControlServerTransactionId",
+ accessControlServerTransactionId,
+ ),
+ checkRequired("accountId", accountId),
+ checkRequired("billingAddressCity", billingAddressCity),
+ checkRequired("billingAddressCountry", billingAddressCountry),
+ checkRequired("billingAddressLine1", billingAddressLine1),
+ checkRequired("billingAddressLine2", billingAddressLine2),
+ checkRequired("billingAddressLine3", billingAddressLine3),
+ checkRequired("billingAddressPostalCode", billingAddressPostalCode),
+ checkRequired("billingAddressState", billingAddressState),
+ checkRequired("cardId", cardId),
+ checkRequired("cardholderEmail", cardholderEmail),
+ checkRequired("cardholderName", cardholderName),
+ checkRequired("category", category),
+ checkRequired("decision", decision),
+ checkRequired("deviceChannel", deviceChannel),
+ checkRequired("directoryServerTransactionId", directoryServerTransactionId),
+ checkRequired("merchantAcceptorId", merchantAcceptorId),
+ checkRequired("merchantCategoryCode", merchantCategoryCode),
+ checkRequired("merchantCountry", merchantCountry),
+ checkRequired("merchantName", merchantName),
+ checkRequired("priorCardAuthenticationId", priorCardAuthenticationId),
+ checkRequired("purchaseAmount", purchaseAmount),
+ checkRequired("purchaseCurrency", purchaseCurrency),
+ checkRequired(
+ "requestorAuthenticationIndicator",
+ requestorAuthenticationIndicator,
+ ),
+ checkRequired("requestorChallengeIndicator", requestorChallengeIndicator),
+ checkRequired("requestorName", requestorName),
+ checkRequired("requestorUrl", requestorUrl),
+ checkRequired("shippingAddressCity", shippingAddressCity),
+ checkRequired("shippingAddressCountry", shippingAddressCountry),
+ checkRequired("shippingAddressLine1", shippingAddressLine1),
+ checkRequired("shippingAddressLine2", shippingAddressLine2),
+ checkRequired("shippingAddressLine3", shippingAddressLine3),
+ checkRequired("shippingAddressPostalCode", shippingAddressPostalCode),
+ checkRequired("shippingAddressState", shippingAddressState),
+ checkRequired(
+ "threeDSecureServerTransactionId",
+ threeDSecureServerTransactionId,
+ ),
+ checkRequired("transactionType", transactionType),
+ checkRequired("upcomingCardPaymentId", upcomingCardPaymentId),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CardAuthentication = apply {
+ if (validated) {
+ return@apply
+ }
+
+ accessControlServerTransactionId()
+ accountId()
+ billingAddressCity()
+ billingAddressCountry()
+ billingAddressLine1()
+ billingAddressLine2()
+ billingAddressLine3()
+ billingAddressPostalCode()
+ billingAddressState()
+ cardId()
+ cardholderEmail()
+ cardholderName()
+ category().ifPresent { it.validate() }
+ decision().ifPresent { it.validate() }
+ deviceChannel().validate()
+ directoryServerTransactionId()
+ merchantAcceptorId()
+ merchantCategoryCode()
+ merchantCountry()
+ merchantName()
+ priorCardAuthenticationId()
+ purchaseAmount()
+ purchaseCurrency()
+ requestorAuthenticationIndicator().ifPresent { it.validate() }
+ requestorChallengeIndicator().ifPresent { it.validate() }
+ requestorName()
+ requestorUrl()
+ shippingAddressCity()
+ shippingAddressCountry()
+ shippingAddressLine1()
+ shippingAddressLine2()
+ shippingAddressLine3()
+ shippingAddressPostalCode()
+ shippingAddressState()
+ threeDSecureServerTransactionId()
+ transactionType().ifPresent { it.validate() }
+ upcomingCardPaymentId()
+ 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 (accessControlServerTransactionId.asKnown().isPresent) 1 else 0) +
+ (if (accountId.asKnown().isPresent) 1 else 0) +
+ (if (billingAddressCity.asKnown().isPresent) 1 else 0) +
+ (if (billingAddressCountry.asKnown().isPresent) 1 else 0) +
+ (if (billingAddressLine1.asKnown().isPresent) 1 else 0) +
+ (if (billingAddressLine2.asKnown().isPresent) 1 else 0) +
+ (if (billingAddressLine3.asKnown().isPresent) 1 else 0) +
+ (if (billingAddressPostalCode.asKnown().isPresent) 1 else 0) +
+ (if (billingAddressState.asKnown().isPresent) 1 else 0) +
+ (if (cardId.asKnown().isPresent) 1 else 0) +
+ (if (cardholderEmail.asKnown().isPresent) 1 else 0) +
+ (if (cardholderName.asKnown().isPresent) 1 else 0) +
+ (category.asKnown().getOrNull()?.validity() ?: 0) +
+ (decision.asKnown().getOrNull()?.validity() ?: 0) +
+ (deviceChannel.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (directoryServerTransactionId.asKnown().isPresent) 1 else 0) +
+ (if (merchantAcceptorId.asKnown().isPresent) 1 else 0) +
+ (if (merchantCategoryCode.asKnown().isPresent) 1 else 0) +
+ (if (merchantCountry.asKnown().isPresent) 1 else 0) +
+ (if (merchantName.asKnown().isPresent) 1 else 0) +
+ (if (priorCardAuthenticationId.asKnown().isPresent) 1 else 0) +
+ (if (purchaseAmount.asKnown().isPresent) 1 else 0) +
+ (if (purchaseCurrency.asKnown().isPresent) 1 else 0) +
+ (requestorAuthenticationIndicator.asKnown().getOrNull()?.validity() ?: 0) +
+ (requestorChallengeIndicator.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (requestorName.asKnown().isPresent) 1 else 0) +
+ (if (requestorUrl.asKnown().isPresent) 1 else 0) +
+ (if (shippingAddressCity.asKnown().isPresent) 1 else 0) +
+ (if (shippingAddressCountry.asKnown().isPresent) 1 else 0) +
+ (if (shippingAddressLine1.asKnown().isPresent) 1 else 0) +
+ (if (shippingAddressLine2.asKnown().isPresent) 1 else 0) +
+ (if (shippingAddressLine3.asKnown().isPresent) 1 else 0) +
+ (if (shippingAddressPostalCode.asKnown().isPresent) 1 else 0) +
+ (if (shippingAddressState.asKnown().isPresent) 1 else 0) +
+ (if (threeDSecureServerTransactionId.asKnown().isPresent) 1 else 0) +
+ (transactionType.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (upcomingCardPaymentId.asKnown().isPresent) 1 else 0)
+
+ /** The category of the card authentication attempt. */
+ class Category @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 {
+
+ /** The authentication attempt is for a payment. */
+ @JvmField val PAYMENT_AUTHENTICATION = of("payment_authentication")
+
+ /** The authentication attempt is not for a payment. */
+ @JvmField val NON_PAYMENT_AUTHENTICATION = of("non_payment_authentication")
+
+ @JvmStatic fun of(value: String) = Category(JsonField.of(value))
+ }
+
+ /** An enum containing [Category]'s known values. */
+ enum class Known {
+ /** The authentication attempt is for a payment. */
+ PAYMENT_AUTHENTICATION,
+ /** The authentication attempt is not for a payment. */
+ NON_PAYMENT_AUTHENTICATION,
+ }
+
+ /**
+ * An enum containing [Category]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Category] 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 {
+ /** The authentication attempt is for a payment. */
+ PAYMENT_AUTHENTICATION,
+ /** The authentication attempt is not for a payment. */
+ NON_PAYMENT_AUTHENTICATION,
+ /**
+ * An enum member indicating that [Category] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or
+ * [Value._UNKNOWN] if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you
+ * want to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ PAYMENT_AUTHENTICATION -> Value.PAYMENT_AUTHENTICATION
+ NON_PAYMENT_AUTHENTICATION -> Value.NON_PAYMENT_AUTHENTICATION
+ 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) {
+ PAYMENT_AUTHENTICATION -> Known.PAYMENT_AUTHENTICATION
+ NON_PAYMENT_AUTHENTICATION -> Known.NON_PAYMENT_AUTHENTICATION
+ else -> throw IncreaseInvalidDataException("Unknown Category: $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(): Category = 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 Category && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Whether or not the authentication attempt was approved. */
+ class Decision @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 {
+
+ /** Approve the authentication attempt without triggering a challenge. */
+ @JvmField val APPROVE = of("approve")
+
+ /** Request further validation before approving the authentication attempt. */
+ @JvmField val CHALLENGE = of("challenge")
+
+ /** Deny the authentication attempt. */
+ @JvmField val DENY = of("deny")
+
+ @JvmStatic fun of(value: String) = Decision(JsonField.of(value))
+ }
+
+ /** An enum containing [Decision]'s known values. */
+ enum class Known {
+ /** Approve the authentication attempt without triggering a challenge. */
+ APPROVE,
+ /** Request further validation before approving the authentication attempt. */
+ CHALLENGE,
+ /** Deny the authentication attempt. */
+ DENY,
+ }
+
+ /**
+ * An enum containing [Decision]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Decision] 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 {
+ /** Approve the authentication attempt without triggering a challenge. */
+ APPROVE,
+ /** Request further validation before approving the authentication attempt. */
+ CHALLENGE,
+ /** Deny the authentication attempt. */
+ DENY,
+ /**
+ * An enum member indicating that [Decision] 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) {
+ APPROVE -> Value.APPROVE
+ CHALLENGE -> Value.CHALLENGE
+ DENY -> Value.DENY
+ 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) {
+ APPROVE -> Known.APPROVE
+ CHALLENGE -> Known.CHALLENGE
+ DENY -> Known.DENY
+ else -> throw IncreaseInvalidDataException("Unknown Decision: $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(): Decision = 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 Decision && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** The device channel of the card authentication attempt. */
+ class DeviceChannel
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val browser: JsonField,
+ private val category: JsonField