diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 585712c6f..c483112c6 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.442.0"
+ ".": "0.443.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 07ec80cbf..330830ea7 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-cc2859c7f6f2b4f9338210cf63f9c769c5ee05c677973ae0181f8e0f442806cd.yml
-openapi_spec_hash: 2fe8fbbcca41e6ff2873d9787333bd0f
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8746787e90b2f68dce823f8a9de7d73df21a9a57fbb2b9169b32704eeba38794.yml
+openapi_spec_hash: caca59ae4602cbbcbda07baf1a0165b4
config_hash: d15ecbf4dc8a7a0ef99397d11b557444
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 93cc93af7..f7a33f25a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.443.0 (2026-03-03)
+
+Full Changelog: [v0.442.0...v0.443.0](https://github.com/Increase/increase-java/compare/v0.442.0...v0.443.0)
+
+### Features
+
+* **api:** api update ([25ba92f](https://github.com/Increase/increase-java/commit/25ba92f43f6fd53a5c3c4b01f58d944854975fac))
+
## 0.442.0 (2026-03-03)
Full Changelog: [v0.441.0...v0.442.0](https://github.com/Increase/increase-java/compare/v0.441.0...v0.442.0)
diff --git a/README.md b/README.md
index 99a9ed5e1..8811a4e2e 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.442.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.442.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.443.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.443.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.442.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.443.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.442.0")
+implementation("com.increase.api:increase-java:0.443.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.442.0")
com.increase.api
increase-java
- 0.442.0
+ 0.443.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 5f8efefc3..a7db789a5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.442.0" // x-release-please-version
+ version = "0.443.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 e32a9e2ee..23051a9da 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
@@ -2039,11 +2039,11 @@ private constructor(
/**
* The device channel 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).
+ * @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 deviceChannel(): Optional =
- deviceChannel.getOptional("device_channel")
+ fun deviceChannel(): DeviceChannel = deviceChannel.getRequired("device_channel")
/**
* The merchant identifier (commonly abbreviated as MID) of the merchant the card is
@@ -2817,12 +2817,8 @@ private constructor(
}
/** The device channel of the card authentication attempt. */
- fun deviceChannel(deviceChannel: DeviceChannel?) =
- deviceChannel(JsonField.ofNullable(deviceChannel))
-
- /** Alias for calling [Builder.deviceChannel] with `deviceChannel.orElse(null)`. */
- fun deviceChannel(deviceChannel: Optional) =
- deviceChannel(deviceChannel.getOrNull())
+ fun deviceChannel(deviceChannel: DeviceChannel) =
+ deviceChannel(JsonField.of(deviceChannel))
/**
* Sets [Builder.deviceChannel] to an arbitrary JSON value.
@@ -3119,7 +3115,7 @@ private constructor(
challenge().ifPresent { it.validate() }
createdAt()
denyReason().ifPresent { it.validate() }
- deviceChannel().ifPresent { it.validate() }
+ deviceChannel().validate()
merchantAcceptorId()
merchantCategoryCode()
merchantCountry()
@@ -4412,113 +4408,170 @@ private constructor(
/** The device channel of the card authentication attempt. */
class DeviceChannel
- @JsonCreator
- private constructor(private val value: JsonField) : Enum {
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val browser: JsonField,
+ private val category: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("browser")
+ @ExcludeMissing
+ browser: JsonField = JsonMissing.of(),
+ @JsonProperty("category")
+ @ExcludeMissing
+ category: JsonField = JsonMissing.of(),
+ ) : this(browser, category, mutableMapOf())
/**
- * Returns this class instance's raw value.
+ * Fields specific to the browser device channel.
*
- * 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.
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
*/
- @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
-
- companion object {
-
- /** The authentication attempt was made from an app. */
- @JvmField val APP = of("app")
-
- /** The authentication attempt was made from a browser. */
- @JvmField val BROWSER = of("browser")
-
- /** The authentication attempt was initiated by the 3DS Requestor. */
- @JvmField val THREE_DS_REQUESTOR_INITIATED = of("three_ds_requestor_initiated")
-
- @JvmStatic fun of(value: String) = DeviceChannel(JsonField.of(value))
- }
-
- /** An enum containing [DeviceChannel]'s known values. */
- enum class Known {
- /** The authentication attempt was made from an app. */
- APP,
- /** The authentication attempt was made from a browser. */
- BROWSER,
- /** The authentication attempt was initiated by the 3DS Requestor. */
- THREE_DS_REQUESTOR_INITIATED,
- }
+ fun browser(): Optional = browser.getOptional("browser")
/**
- * An enum containing [DeviceChannel]'s known values, as well as an [_UNKNOWN]
- * member.
+ * The category of the device channel.
*
- * An instance of [DeviceChannel] 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.
+ * @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).
*/
- enum class Value {
- /** The authentication attempt was made from an app. */
- APP,
- /** The authentication attempt was made from a browser. */
- BROWSER,
- /** The authentication attempt was initiated by the 3DS Requestor. */
- THREE_DS_REQUESTOR_INITIATED,
- /**
- * An enum member indicating that [DeviceChannel] was instantiated with an
- * unknown value.
- */
- _UNKNOWN,
- }
+ fun category(): Category = category.getRequired("category")
/**
- * Returns an enum member corresponding to this class instance's value, or
- * [Value._UNKNOWN] if the class was instantiated with an unknown value.
+ * Returns the raw JSON value of [browser].
*
- * Use the [known] method instead if you're certain the value is always known or if
- * you want to throw for the unknown case.
+ * Unlike [browser], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- fun value(): Value =
- when (this) {
- APP -> Value.APP
- BROWSER -> Value.BROWSER
- THREE_DS_REQUESTOR_INITIATED -> Value.THREE_DS_REQUESTOR_INITIATED
- else -> Value._UNKNOWN
- }
+ @JsonProperty("browser")
+ @ExcludeMissing
+ fun _browser(): JsonField = browser
/**
- * 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.
+ * Returns the raw JSON value of [category].
*
- * @throws IncreaseInvalidDataException if this class instance's value is a not a
- * known member.
+ * Unlike [category], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- fun known(): Known =
- when (this) {
- APP -> Known.APP
- BROWSER -> Known.BROWSER
- THREE_DS_REQUESTOR_INITIATED -> Known.THREE_DS_REQUESTOR_INITIATED
- else -> throw IncreaseInvalidDataException("Unknown DeviceChannel: $value")
+ @JsonProperty("category")
+ @ExcludeMissing
+ fun _category(): JsonField = category
+
+ @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 [DeviceChannel].
+ *
+ * The following fields are required:
+ * ```java
+ * .browser()
+ * .category()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [DeviceChannel]. */
+ class Builder internal constructor() {
+
+ private var browser: JsonField? = null
+ private var category: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(deviceChannel: DeviceChannel) = apply {
+ browser = deviceChannel.browser
+ category = deviceChannel.category
+ additionalProperties = deviceChannel.additionalProperties.toMutableMap()
}
- /**
- * 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")
+ /** Fields specific to the browser device channel. */
+ fun browser(browser: Browser?) = browser(JsonField.ofNullable(browser))
+
+ /** Alias for calling [Builder.browser] with `browser.orElse(null)`. */
+ fun browser(browser: Optional) = browser(browser.getOrNull())
+
+ /**
+ * Sets [Builder.browser] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.browser] with a well-typed [Browser] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun browser(browser: JsonField) = apply { this.browser = browser }
+
+ /** The category of the device channel. */
+ fun category(category: Category) = category(JsonField.of(category))
+
+ /**
+ * 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 }
+
+ 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 [DeviceChannel].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .browser()
+ * .category()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): DeviceChannel =
+ DeviceChannel(
+ checkRequired("browser", browser),
+ checkRequired("category", category),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
private var validated: Boolean = false
fun validate(): DeviceChannel = apply {
@@ -4526,7 +4579,8 @@ private constructor(
return@apply
}
- known()
+ browser().ifPresent { it.validate() }
+ category().validate()
validated = true
}
@@ -4544,19 +4598,725 @@ private constructor(
*
* Used for best match union deserialization.
*/
- @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (browser.asKnown().getOrNull()?.validity() ?: 0) +
+ (category.asKnown().getOrNull()?.validity() ?: 0)
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
+ /** Fields specific to the browser device channel. */
+ class Browser
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val acceptHeader: JsonField,
+ private val ipAddress: JsonField,
+ private val javascriptEnabled: JsonField,
+ private val language: JsonField,
+ private val userAgent: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
- return other is DeviceChannel && value == other.value
- }
+ @JsonCreator
+ private constructor(
+ @JsonProperty("accept_header")
+ @ExcludeMissing
+ acceptHeader: JsonField = JsonMissing.of(),
+ @JsonProperty("ip_address")
+ @ExcludeMissing
+ ipAddress: JsonField = JsonMissing.of(),
+ @JsonProperty("javascript_enabled")
+ @ExcludeMissing
+ javascriptEnabled: JsonField = JsonMissing.of(),
+ @JsonProperty("language")
+ @ExcludeMissing
+ language: JsonField = JsonMissing.of(),
+ @JsonProperty("user_agent")
+ @ExcludeMissing
+ userAgent: JsonField = JsonMissing.of(),
+ ) : this(
+ acceptHeader,
+ ipAddress,
+ javascriptEnabled,
+ language,
+ userAgent,
+ mutableMapOf(),
+ )
- override fun hashCode() = value.hashCode()
+ /**
+ * The accept header from the cardholder's browser.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun acceptHeader(): Optional = acceptHeader.getOptional("accept_header")
- override fun toString() = value.toString()
+ /**
+ * The IP address of the cardholder's browser.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun ipAddress(): Optional = ipAddress.getOptional("ip_address")
+
+ /**
+ * Whether JavaScript is enabled in the cardholder's browser.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun javascriptEnabled(): Optional =
+ javascriptEnabled.getOptional("javascript_enabled")
+
+ /**
+ * The language of the cardholder's browser.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun language(): Optional = language.getOptional("language")
+
+ /**
+ * The user agent of the cardholder's browser.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun userAgent(): Optional = userAgent.getOptional("user_agent")
+
+ /**
+ * Returns the raw JSON value of [acceptHeader].
+ *
+ * Unlike [acceptHeader], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("accept_header")
+ @ExcludeMissing
+ fun _acceptHeader(): JsonField = acceptHeader
+
+ /**
+ * Returns the raw JSON value of [ipAddress].
+ *
+ * Unlike [ipAddress], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("ip_address")
+ @ExcludeMissing
+ fun _ipAddress(): JsonField = ipAddress
+
+ /**
+ * Returns the raw JSON value of [javascriptEnabled].
+ *
+ * Unlike [javascriptEnabled], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("javascript_enabled")
+ @ExcludeMissing
+ fun _javascriptEnabled(): JsonField = javascriptEnabled
+
+ /**
+ * Returns the raw JSON value of [language].
+ *
+ * Unlike [language], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("language")
+ @ExcludeMissing
+ fun _language(): JsonField = language
+
+ /**
+ * Returns the raw JSON value of [userAgent].
+ *
+ * Unlike [userAgent], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("user_agent")
+ @ExcludeMissing
+ fun _userAgent(): JsonField = userAgent
+
+ @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 [Browser].
+ *
+ * The following fields are required:
+ * ```java
+ * .acceptHeader()
+ * .ipAddress()
+ * .javascriptEnabled()
+ * .language()
+ * .userAgent()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Browser]. */
+ class Builder internal constructor() {
+
+ private var acceptHeader: JsonField? = null
+ private var ipAddress: JsonField? = null
+ private var javascriptEnabled: JsonField? = null
+ private var language: JsonField? = null
+ private var userAgent: JsonField? = null
+ private var additionalProperties: MutableMap =
+ mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(browser: Browser) = apply {
+ acceptHeader = browser.acceptHeader
+ ipAddress = browser.ipAddress
+ javascriptEnabled = browser.javascriptEnabled
+ language = browser.language
+ userAgent = browser.userAgent
+ additionalProperties = browser.additionalProperties.toMutableMap()
+ }
+
+ /** The accept header from the cardholder's browser. */
+ fun acceptHeader(acceptHeader: String?) =
+ acceptHeader(JsonField.ofNullable(acceptHeader))
+
+ /**
+ * Alias for calling [Builder.acceptHeader] with
+ * `acceptHeader.orElse(null)`.
+ */
+ fun acceptHeader(acceptHeader: Optional) =
+ acceptHeader(acceptHeader.getOrNull())
+
+ /**
+ * Sets [Builder.acceptHeader] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.acceptHeader] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun acceptHeader(acceptHeader: JsonField) = apply {
+ this.acceptHeader = acceptHeader
+ }
+
+ /** The IP address of the cardholder's browser. */
+ fun ipAddress(ipAddress: String?) =
+ ipAddress(JsonField.ofNullable(ipAddress))
+
+ /** Alias for calling [Builder.ipAddress] with `ipAddress.orElse(null)`. */
+ fun ipAddress(ipAddress: Optional) =
+ ipAddress(ipAddress.getOrNull())
+
+ /**
+ * Sets [Builder.ipAddress] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.ipAddress] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun ipAddress(ipAddress: JsonField) = apply {
+ this.ipAddress = ipAddress
+ }
+
+ /** Whether JavaScript is enabled in the cardholder's browser. */
+ fun javascriptEnabled(javascriptEnabled: JavascriptEnabled?) =
+ javascriptEnabled(JsonField.ofNullable(javascriptEnabled))
+
+ /**
+ * Alias for calling [Builder.javascriptEnabled] with
+ * `javascriptEnabled.orElse(null)`.
+ */
+ fun javascriptEnabled(javascriptEnabled: Optional) =
+ javascriptEnabled(javascriptEnabled.getOrNull())
+
+ /**
+ * Sets [Builder.javascriptEnabled] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.javascriptEnabled] with a well-typed
+ * [JavascriptEnabled] value instead. This method is primarily for setting
+ * the field to an undocumented or not yet supported value.
+ */
+ fun javascriptEnabled(javascriptEnabled: JsonField) =
+ apply {
+ this.javascriptEnabled = javascriptEnabled
+ }
+
+ /** The language of the cardholder's browser. */
+ fun language(language: String?) = language(JsonField.ofNullable(language))
+
+ /** Alias for calling [Builder.language] with `language.orElse(null)`. */
+ fun language(language: Optional) = language(language.getOrNull())
+
+ /**
+ * Sets [Builder.language] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.language] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun language(language: JsonField) = apply {
+ this.language = language
+ }
+
+ /** The user agent of the cardholder's browser. */
+ fun userAgent(userAgent: String?) =
+ userAgent(JsonField.ofNullable(userAgent))
+
+ /** Alias for calling [Builder.userAgent] with `userAgent.orElse(null)`. */
+ fun userAgent(userAgent: Optional) =
+ userAgent(userAgent.getOrNull())
+
+ /**
+ * Sets [Builder.userAgent] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.userAgent] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun userAgent(userAgent: JsonField) = apply {
+ this.userAgent = userAgent
+ }
+
+ 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 [Browser].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .acceptHeader()
+ * .ipAddress()
+ * .javascriptEnabled()
+ * .language()
+ * .userAgent()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Browser =
+ Browser(
+ checkRequired("acceptHeader", acceptHeader),
+ checkRequired("ipAddress", ipAddress),
+ checkRequired("javascriptEnabled", javascriptEnabled),
+ checkRequired("language", language),
+ checkRequired("userAgent", userAgent),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Browser = apply {
+ if (validated) {
+ return@apply
+ }
+
+ acceptHeader()
+ ipAddress()
+ javascriptEnabled().ifPresent { it.validate() }
+ language()
+ userAgent()
+ 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 (acceptHeader.asKnown().isPresent) 1 else 0) +
+ (if (ipAddress.asKnown().isPresent) 1 else 0) +
+ (javascriptEnabled.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (language.asKnown().isPresent) 1 else 0) +
+ (if (userAgent.asKnown().isPresent) 1 else 0)
+
+ /** Whether JavaScript is enabled in the cardholder's browser. */
+ class JavascriptEnabled
+ @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 {
+
+ /** JavaScript is enabled in the cardholder's browser. */
+ @JvmField val ENABLED = of("enabled")
+
+ /** JavaScript is not enabled in the cardholder's browser. */
+ @JvmField val DISABLED = of("disabled")
+
+ @JvmStatic
+ fun of(value: String) = JavascriptEnabled(JsonField.of(value))
+ }
+
+ /** An enum containing [JavascriptEnabled]'s known values. */
+ enum class Known {
+ /** JavaScript is enabled in the cardholder's browser. */
+ ENABLED,
+ /** JavaScript is not enabled in the cardholder's browser. */
+ DISABLED,
+ }
+
+ /**
+ * An enum containing [JavascriptEnabled]'s known values, as well as an
+ * [_UNKNOWN] member.
+ *
+ * An instance of [JavascriptEnabled] 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 {
+ /** JavaScript is enabled in the cardholder's browser. */
+ ENABLED,
+ /** JavaScript is not enabled in the cardholder's browser. */
+ DISABLED,
+ /**
+ * An enum member indicating that [JavascriptEnabled] 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) {
+ ENABLED -> Value.ENABLED
+ DISABLED -> Value.DISABLED
+ 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) {
+ ENABLED -> Known.ENABLED
+ DISABLED -> Known.DISABLED
+ else ->
+ throw IncreaseInvalidDataException(
+ "Unknown JavascriptEnabled: $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(): JavascriptEnabled = 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 JavascriptEnabled && 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 Browser &&
+ acceptHeader == other.acceptHeader &&
+ ipAddress == other.ipAddress &&
+ javascriptEnabled == other.javascriptEnabled &&
+ language == other.language &&
+ userAgent == other.userAgent &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ acceptHeader,
+ ipAddress,
+ javascriptEnabled,
+ language,
+ userAgent,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Browser{acceptHeader=$acceptHeader, ipAddress=$ipAddress, javascriptEnabled=$javascriptEnabled, language=$language, userAgent=$userAgent, additionalProperties=$additionalProperties}"
+ }
+
+ /** The category of the device channel. */
+ 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 was made from an app. */
+ @JvmField val APP = of("app")
+
+ /** The authentication attempt was made from a browser. */
+ @JvmField val BROWSER = of("browser")
+
+ /** The authentication attempt was initiated by the 3DS Requestor. */
+ @JvmField
+ val THREE_DS_REQUESTOR_INITIATED = of("three_ds_requestor_initiated")
+
+ @JvmStatic fun of(value: String) = Category(JsonField.of(value))
+ }
+
+ /** An enum containing [Category]'s known values. */
+ enum class Known {
+ /** The authentication attempt was made from an app. */
+ APP,
+ /** The authentication attempt was made from a browser. */
+ BROWSER,
+ /** The authentication attempt was initiated by the 3DS Requestor. */
+ THREE_DS_REQUESTOR_INITIATED,
+ }
+
+ /**
+ * 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 was made from an app. */
+ APP,
+ /** The authentication attempt was made from a browser. */
+ BROWSER,
+ /** The authentication attempt was initiated by the 3DS Requestor. */
+ THREE_DS_REQUESTOR_INITIATED,
+ /**
+ * 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) {
+ APP -> Value.APP
+ BROWSER -> Value.BROWSER
+ THREE_DS_REQUESTOR_INITIATED -> Value.THREE_DS_REQUESTOR_INITIATED
+ 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) {
+ APP -> Known.APP
+ BROWSER -> Known.BROWSER
+ THREE_DS_REQUESTOR_INITIATED -> Known.THREE_DS_REQUESTOR_INITIATED
+ 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()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is DeviceChannel &&
+ browser == other.browser &&
+ category == other.category &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(browser, category, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "DeviceChannel{browser=$browser, category=$category, additionalProperties=$additionalProperties}"
}
/** The status of the card authentication. */
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt
index 7970d2960..4b06f0d4d 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt
@@ -85,7 +85,33 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element
+ .CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -2158,7 +2184,33 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element
+ .CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -4231,7 +4283,33 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element
+ .CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -6304,7 +6382,33 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element
+ .CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -8416,7 +8520,32 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -10372,7 +10501,32 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -12328,7 +12482,32 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -14284,7 +14463,32 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -16287,7 +16491,33 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element
+ .CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -18360,7 +18590,33 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element
+ .CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -20433,7 +20689,33 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element
+ .CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -22506,7 +22788,33 @@ internal class CardPaymentListPageResponseTest {
.denyReason(null)
.deviceChannel(
CardPayment.Element.CardAuthentication.DeviceChannel
- .BROWSER
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element
+ .CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt
index 59137702a..3be20aa16 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt
@@ -74,7 +74,31 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -1909,7 +1933,31 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -3744,7 +3792,31 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -5579,7 +5651,31 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -7444,7 +7540,28 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel.builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel.Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -9092,7 +9209,28 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel.builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel.Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -10740,7 +10878,28 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel.builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel.Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -12388,7 +12547,28 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel.builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel.Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -14080,7 +14260,31 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -15915,7 +16119,31 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -17750,7 +17978,31 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")
@@ -19585,7 +19837,31 @@ internal class CardPaymentTest {
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.denyReason(null)
.deviceChannel(
- CardPayment.Element.CardAuthentication.DeviceChannel.BROWSER
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .builder()
+ .browser(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Browser
+ .builder()
+ .acceptHeader("text/html")
+ .ipAddress("203.0.113.0")
+ .javascriptEnabled(
+ CardPayment.Element.CardAuthentication
+ .DeviceChannel
+ .Browser
+ .JavascriptEnabled
+ .ENABLED
+ )
+ .language("en-US")
+ .userAgent("Mozilla/5.0")
+ .build()
+ )
+ .category(
+ CardPayment.Element.CardAuthentication.DeviceChannel
+ .Category
+ .BROWSER
+ )
+ .build()
)
.merchantAcceptorId("5665270011000168")
.merchantCategoryCode("5734")