diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b6f0298a6..830a65746 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.494.0"
+ ".": "0.495.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 5d64e13d4..8ba24b693 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 236
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e2a6ff4685a5e09babcce1fb8bac1f373d707d5b5aa82aae375d923de890e56e.yml
-openapi_spec_hash: 244249a4dfb6c746c161a704764d7630
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b51c9307c5fd4c662426ca9bbdbe00d0721edcb2eb899d4b9a3539aa01623873.yml
+openapi_spec_hash: e5767b8639a1573ae70b25be22cc77a3
config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a25e120fb..92df7087d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.495.0 (2026-03-25)
+
+Full Changelog: [v0.494.0...v0.495.0](https://github.com/Increase/increase-java/compare/v0.494.0...v0.495.0)
+
+### Features
+
+* **api:** api update ([3a6646a](https://github.com/Increase/increase-java/commit/3a6646a998f30469c0d7a49b2f25902ed2b35b03))
+
## 0.494.0 (2026-03-25)
Full Changelog: [v0.493.0...v0.494.0](https://github.com/Increase/increase-java/compare/v0.493.0...v0.494.0)
diff --git a/README.md b/README.md
index a3282876f..6bf195c65 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.494.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.494.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.495.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.495.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.494.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.495.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.494.0")
+implementation("com.increase.api:increase-java:0.495.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.494.0")
com.increase.api
increase-java
- 0.494.0
+ 0.495.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 46629b1af..7e1a01e1c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.494.0" // x-release-please-version
+ version = "0.495.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/Entity.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/Entity.kt
index c8dfc175f..81b85df6d 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/Entity.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/Entity.kt
@@ -1488,6 +1488,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
private val line2: JsonField,
private val state: JsonField,
@@ -1498,20 +1499,31 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
@JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
@JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
- ) : this(city, line1, line2, state, zip, mutableMapOf())
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
/**
- * The city of the address.
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
+
+ /**
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
*
* @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 city(): String = city.getRequired("city")
+ fun country(): String = country.getRequired("country")
/**
* The first line of the address.
@@ -1531,23 +1543,21 @@ private constructor(
fun line2(): Optional = line2.getOptional("line2")
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of the
- * address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun state(): String = state.getRequired("state")
+ fun state(): Optional = state.getOptional("state")
/**
- * The ZIP code of the address.
+ * The ZIP or postal code of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun zip(): String = zip.getRequired("zip")
+ fun zip(): Optional = zip.getOptional("zip")
/**
* Returns the raw JSON value of [city].
@@ -1556,6 +1566,13 @@ private constructor(
*/
@JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
/**
* Returns the raw JSON value of [line1].
*
@@ -1604,6 +1621,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -1617,6 +1635,7 @@ private constructor(
class Builder internal constructor() {
private var city: JsonField? = null
+ private var country: JsonField? = null
private var line1: JsonField? = null
private var line2: JsonField? = null
private var state: JsonField? = null
@@ -1626,6 +1645,7 @@ private constructor(
@JvmSynthetic
internal fun from(address: Address) = apply {
city = address.city
+ country = address.country
line1 = address.line1
line2 = address.line2
state = address.state
@@ -1633,8 +1653,11 @@ private constructor(
additionalProperties = address.additionalProperties.toMutableMap()
}
- /** The city of the address. */
- fun city(city: String) = city(JsonField.of(city))
+ /** The city, district, town, or village of the address. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
/**
* Sets [Builder.city] to an arbitrary JSON value.
@@ -1645,6 +1668,18 @@ private constructor(
*/
fun city(city: JsonField) = apply { this.city = city }
+ /** The two-letter ISO 3166-1 alpha-2 code for the country of the address. */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
/** The first line of the address. */
fun line1(line1: String) = line1(JsonField.of(line1))
@@ -1673,10 +1708,13 @@ private constructor(
fun line2(line2: JsonField) = apply { this.line2 = line2 }
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of
- * the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*/
- fun state(state: String) = state(JsonField.of(state))
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
/**
* Sets [Builder.state] to an arbitrary JSON value.
@@ -1687,8 +1725,11 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
- /** The ZIP code of the address. */
- fun zip(zip: String) = zip(JsonField.of(zip))
+ /** The ZIP or postal code of the address. */
+ fun zip(zip: String?) = zip(JsonField.ofNullable(zip))
+
+ /** Alias for calling [Builder.zip] with `zip.orElse(null)`. */
+ fun zip(zip: Optional) = zip(zip.getOrNull())
/**
* Sets [Builder.zip] to an arbitrary JSON value.
@@ -1729,6 +1770,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -1740,6 +1782,7 @@ private constructor(
fun build(): Address =
Address(
checkRequired("city", city),
+ checkRequired("country", country),
checkRequired("line1", line1),
checkRequired("line2", line2),
checkRequired("state", state),
@@ -1756,6 +1799,7 @@ private constructor(
}
city()
+ country()
line1()
line2()
state()
@@ -1780,6 +1824,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
(if (line1.asKnown().isPresent) 1 else 0) +
(if (line2.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0) +
@@ -1792,6 +1837,7 @@ private constructor(
return other is Address &&
city == other.city &&
+ country == other.country &&
line1 == other.line1 &&
line2 == other.line2 &&
state == other.state &&
@@ -1800,13 +1846,13 @@ private constructor(
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, line2, state, zip, additionalProperties)
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
}
class BeneficialOwner
@@ -4132,6 +4178,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
private val line2: JsonField,
private val state: JsonField,
@@ -4142,20 +4189,31 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
@JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
@JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
- ) : this(city, line1, line2, state, zip, mutableMapOf())
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
+
+ /**
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
/**
- * The city of the address.
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
*
* @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 city(): String = city.getRequired("city")
+ fun country(): String = country.getRequired("country")
/**
* The first line of the address.
@@ -4175,23 +4233,21 @@ private constructor(
fun line2(): Optional = line2.getOptional("line2")
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of the
- * address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun state(): String = state.getRequired("state")
+ fun state(): Optional = state.getOptional("state")
/**
- * The ZIP code of the address.
+ * The ZIP or postal code of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun zip(): String = zip.getRequired("zip")
+ fun zip(): Optional = zip.getOptional("zip")
/**
* Returns the raw JSON value of [city].
@@ -4200,6 +4256,13 @@ private constructor(
*/
@JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
/**
* Returns the raw JSON value of [line1].
*
@@ -4248,6 +4311,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -4261,6 +4325,7 @@ private constructor(
class Builder internal constructor() {
private var city: JsonField? = null
+ private var country: JsonField? = null
private var line1: JsonField? = null
private var line2: JsonField? = null
private var state: JsonField? = null
@@ -4270,6 +4335,7 @@ private constructor(
@JvmSynthetic
internal fun from(address: Address) = apply {
city = address.city
+ country = address.country
line1 = address.line1
line2 = address.line2
state = address.state
@@ -4277,8 +4343,11 @@ private constructor(
additionalProperties = address.additionalProperties.toMutableMap()
}
- /** The city of the address. */
- fun city(city: String) = city(JsonField.of(city))
+ /** The city, district, town, or village of the address. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
/**
* Sets [Builder.city] to an arbitrary JSON value.
@@ -4289,6 +4358,18 @@ private constructor(
*/
fun city(city: JsonField) = apply { this.city = city }
+ /** The two-letter ISO 3166-1 alpha-2 code for the country of the address. */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
/** The first line of the address. */
fun line1(line1: String) = line1(JsonField.of(line1))
@@ -4317,10 +4398,13 @@ private constructor(
fun line2(line2: JsonField) = apply { this.line2 = line2 }
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of
- * the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*/
- fun state(state: String) = state(JsonField.of(state))
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
/**
* Sets [Builder.state] to an arbitrary JSON value.
@@ -4331,8 +4415,11 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
- /** The ZIP code of the address. */
- fun zip(zip: String) = zip(JsonField.of(zip))
+ /** The ZIP or postal code of the address. */
+ fun zip(zip: String?) = zip(JsonField.ofNullable(zip))
+
+ /** Alias for calling [Builder.zip] with `zip.orElse(null)`. */
+ fun zip(zip: Optional) = zip(zip.getOrNull())
/**
* Sets [Builder.zip] to an arbitrary JSON value.
@@ -4373,6 +4460,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -4384,6 +4472,7 @@ private constructor(
fun build(): Address =
Address(
checkRequired("city", city),
+ checkRequired("country", country),
checkRequired("line1", line1),
checkRequired("line2", line2),
checkRequired("state", state),
@@ -4400,6 +4489,7 @@ private constructor(
}
city()
+ country()
line1()
line2()
state()
@@ -4424,6 +4514,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
(if (line1.asKnown().isPresent) 1 else 0) +
(if (line2.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0) +
@@ -4436,6 +4527,7 @@ private constructor(
return other is Address &&
city == other.city &&
+ country == other.country &&
line1 == other.line1 &&
line2 == other.line2 &&
state == other.state &&
@@ -4444,13 +4536,13 @@ private constructor(
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, line2, state, zip, additionalProperties)
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
}
class AuthorizedPerson
@@ -5333,6 +5425,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
private val line2: JsonField,
private val state: JsonField,
@@ -5345,6 +5438,9 @@ private constructor(
@JsonProperty("city")
@ExcludeMissing
city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1")
@ExcludeMissing
line1: JsonField = JsonMissing.of(),
@@ -5355,16 +5451,24 @@ private constructor(
@ExcludeMissing
state: JsonField = JsonMissing.of(),
@JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
- ) : this(city, line1, line2, state, zip, mutableMapOf())
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
/**
- * The city of the address.
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
+
+ /**
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
*
* @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 city(): String = city.getRequired("city")
+ fun country(): String = country.getRequired("country")
/**
* The first line of the address.
@@ -5384,23 +5488,21 @@ private constructor(
fun line2(): Optional = line2.getOptional("line2")
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of
- * the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
*/
- fun state(): String = state.getRequired("state")
+ fun state(): Optional = state.getOptional("state")
/**
- * The ZIP code of the address.
+ * The ZIP or postal code of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
*/
- fun zip(): String = zip.getRequired("zip")
+ fun zip(): Optional = zip.getOptional("zip")
/**
* Returns the raw JSON value of [city].
@@ -5410,6 +5512,14 @@ private constructor(
*/
@JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
/**
* Returns the raw JSON value of [line1].
*
@@ -5461,6 +5571,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -5474,6 +5585,7 @@ private constructor(
class Builder internal constructor() {
private var city: JsonField? = null
+ private var country: JsonField? = null
private var line1: JsonField? = null
private var line2: JsonField? = null
private var state: JsonField? = null
@@ -5483,6 +5595,7 @@ private constructor(
@JvmSynthetic
internal fun from(address: Address) = apply {
city = address.city
+ country = address.country
line1 = address.line1
line2 = address.line2
state = address.state
@@ -5490,8 +5603,11 @@ private constructor(
additionalProperties = address.additionalProperties.toMutableMap()
}
- /** The city of the address. */
- fun city(city: String) = city(JsonField.of(city))
+ /** The city, district, town, or village of the address. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
/**
* Sets [Builder.city] to an arbitrary JSON value.
@@ -5502,6 +5618,18 @@ private constructor(
*/
fun city(city: JsonField) = apply { this.city = city }
+ /** The two-letter ISO 3166-1 alpha-2 code for the country of the address. */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
/** The first line of the address. */
fun line1(line1: String) = line1(JsonField.of(line1))
@@ -5530,10 +5658,13 @@ private constructor(
fun line2(line2: JsonField) = apply { this.line2 = line2 }
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state
- * of the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US
+ * state, province, or region of the address.
*/
- fun state(state: String) = state(JsonField.of(state))
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
/**
* Sets [Builder.state] to an arbitrary JSON value.
@@ -5544,8 +5675,11 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
- /** The ZIP code of the address. */
- fun zip(zip: String) = zip(JsonField.of(zip))
+ /** The ZIP or postal code of the address. */
+ fun zip(zip: String?) = zip(JsonField.ofNullable(zip))
+
+ /** Alias for calling [Builder.zip] with `zip.orElse(null)`. */
+ fun zip(zip: Optional) = zip(zip.getOrNull())
/**
* Sets [Builder.zip] to an arbitrary JSON value.
@@ -5586,6 +5720,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -5597,6 +5732,7 @@ private constructor(
fun build(): Address =
Address(
checkRequired("city", city),
+ checkRequired("country", country),
checkRequired("line1", line1),
checkRequired("line2", line2),
checkRequired("state", state),
@@ -5613,6 +5749,7 @@ private constructor(
}
city()
+ country()
line1()
line2()
state()
@@ -5637,6 +5774,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
(if (line1.asKnown().isPresent) 1 else 0) +
(if (line2.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0) +
@@ -5649,6 +5787,7 @@ private constructor(
return other is Address &&
city == other.city &&
+ country == other.country &&
line1 == other.line1 &&
line2 == other.line2 &&
state == other.state &&
@@ -5657,13 +5796,13 @@ private constructor(
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, line2, state, zip, additionalProperties)
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
}
/** A means of verifying the person's identity. */
@@ -6374,6 +6513,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
private val line2: JsonField,
private val state: JsonField,
@@ -6384,20 +6524,31 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
@JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
@JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
- ) : this(city, line1, line2, state, zip, mutableMapOf())
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
/**
- * The city of the address.
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
+
+ /**
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
*
* @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 city(): String = city.getRequired("city")
+ fun country(): String = country.getRequired("country")
/**
* The first line of the address.
@@ -6417,23 +6568,21 @@ private constructor(
fun line2(): Optional = line2.getOptional("line2")
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of the
- * address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun state(): String = state.getRequired("state")
+ fun state(): Optional = state.getOptional("state")
/**
- * The ZIP code of the address.
+ * The ZIP or postal code of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun zip(): String = zip.getRequired("zip")
+ fun zip(): Optional = zip.getOptional("zip")
/**
* Returns the raw JSON value of [city].
@@ -6442,6 +6591,13 @@ private constructor(
*/
@JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
/**
* Returns the raw JSON value of [line1].
*
@@ -6490,6 +6646,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -6503,6 +6660,7 @@ private constructor(
class Builder internal constructor() {
private var city: JsonField? = null
+ private var country: JsonField? = null
private var line1: JsonField? = null
private var line2: JsonField? = null
private var state: JsonField? = null
@@ -6512,6 +6670,7 @@ private constructor(
@JvmSynthetic
internal fun from(address: Address) = apply {
city = address.city
+ country = address.country
line1 = address.line1
line2 = address.line2
state = address.state
@@ -6519,8 +6678,11 @@ private constructor(
additionalProperties = address.additionalProperties.toMutableMap()
}
- /** The city of the address. */
- fun city(city: String) = city(JsonField.of(city))
+ /** The city, district, town, or village of the address. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
/**
* Sets [Builder.city] to an arbitrary JSON value.
@@ -6531,6 +6693,18 @@ private constructor(
*/
fun city(city: JsonField) = apply { this.city = city }
+ /** The two-letter ISO 3166-1 alpha-2 code for the country of the address. */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
/** The first line of the address. */
fun line1(line1: String) = line1(JsonField.of(line1))
@@ -6559,10 +6733,13 @@ private constructor(
fun line2(line2: JsonField) = apply { this.line2 = line2 }
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of
- * the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*/
- fun state(state: String) = state(JsonField.of(state))
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
/**
* Sets [Builder.state] to an arbitrary JSON value.
@@ -6573,8 +6750,11 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
- /** The ZIP code of the address. */
- fun zip(zip: String) = zip(JsonField.of(zip))
+ /** The ZIP or postal code of the address. */
+ fun zip(zip: String?) = zip(JsonField.ofNullable(zip))
+
+ /** Alias for calling [Builder.zip] with `zip.orElse(null)`. */
+ fun zip(zip: Optional) = zip(zip.getOrNull())
/**
* Sets [Builder.zip] to an arbitrary JSON value.
@@ -6615,6 +6795,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -6626,6 +6807,7 @@ private constructor(
fun build(): Address =
Address(
checkRequired("city", city),
+ checkRequired("country", country),
checkRequired("line1", line1),
checkRequired("line2", line2),
checkRequired("state", state),
@@ -6642,6 +6824,7 @@ private constructor(
}
city()
+ country()
line1()
line2()
state()
@@ -6666,6 +6849,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
(if (line1.asKnown().isPresent) 1 else 0) +
(if (line2.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0) +
@@ -6678,6 +6862,7 @@ private constructor(
return other is Address &&
city == other.city &&
+ country == other.country &&
line1 == other.line1 &&
line2 == other.line2 &&
state == other.state &&
@@ -6686,13 +6871,13 @@ private constructor(
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, line2, state, zip, additionalProperties)
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
}
/** A means of verifying the person's identity. */
@@ -8857,6 +9042,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
private val line2: JsonField,
private val state: JsonField,
@@ -8867,20 +9053,31 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
@JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
@JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
- ) : this(city, line1, line2, state, zip, mutableMapOf())
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
+
+ /**
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
/**
- * The city of the address.
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
*
* @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 city(): String = city.getRequired("city")
+ fun country(): String = country.getRequired("country")
/**
* The first line of the address.
@@ -8900,23 +9097,21 @@ private constructor(
fun line2(): Optional = line2.getOptional("line2")
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of the
- * address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun state(): String = state.getRequired("state")
+ fun state(): Optional = state.getOptional("state")
/**
- * The ZIP code of the address.
+ * The ZIP or postal code of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun zip(): String = zip.getRequired("zip")
+ fun zip(): Optional = zip.getOptional("zip")
/**
* Returns the raw JSON value of [city].
@@ -8925,6 +9120,13 @@ private constructor(
*/
@JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
/**
* Returns the raw JSON value of [line1].
*
@@ -8973,6 +9175,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -8986,6 +9189,7 @@ private constructor(
class Builder internal constructor() {
private var city: JsonField? = null
+ private var country: JsonField? = null
private var line1: JsonField? = null
private var line2: JsonField? = null
private var state: JsonField? = null
@@ -8995,6 +9199,7 @@ private constructor(
@JvmSynthetic
internal fun from(address: Address) = apply {
city = address.city
+ country = address.country
line1 = address.line1
line2 = address.line2
state = address.state
@@ -9002,8 +9207,11 @@ private constructor(
additionalProperties = address.additionalProperties.toMutableMap()
}
- /** The city of the address. */
- fun city(city: String) = city(JsonField.of(city))
+ /** The city, district, town, or village of the address. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
/**
* Sets [Builder.city] to an arbitrary JSON value.
@@ -9014,6 +9222,18 @@ private constructor(
*/
fun city(city: JsonField) = apply { this.city = city }
+ /** The two-letter ISO 3166-1 alpha-2 code for the country of the address. */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
/** The first line of the address. */
fun line1(line1: String) = line1(JsonField.of(line1))
@@ -9042,10 +9262,13 @@ private constructor(
fun line2(line2: JsonField) = apply { this.line2 = line2 }
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of
- * the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*/
- fun state(state: String) = state(JsonField.of(state))
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
/**
* Sets [Builder.state] to an arbitrary JSON value.
@@ -9056,8 +9279,11 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
- /** The ZIP code of the address. */
- fun zip(zip: String) = zip(JsonField.of(zip))
+ /** The ZIP or postal code of the address. */
+ fun zip(zip: String?) = zip(JsonField.ofNullable(zip))
+
+ /** Alias for calling [Builder.zip] with `zip.orElse(null)`. */
+ fun zip(zip: Optional) = zip(zip.getOrNull())
/**
* Sets [Builder.zip] to an arbitrary JSON value.
@@ -9098,6 +9324,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -9109,6 +9336,7 @@ private constructor(
fun build(): Address =
Address(
checkRequired("city", city),
+ checkRequired("country", country),
checkRequired("line1", line1),
checkRequired("line2", line2),
checkRequired("state", state),
@@ -9125,6 +9353,7 @@ private constructor(
}
city()
+ country()
line1()
line2()
state()
@@ -9149,6 +9378,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
(if (line1.asKnown().isPresent) 1 else 0) +
(if (line2.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0) +
@@ -9161,6 +9391,7 @@ private constructor(
return other is Address &&
city == other.city &&
+ country == other.country &&
line1 == other.line1 &&
line2 == other.line2 &&
state == other.state &&
@@ -9169,13 +9400,13 @@ private constructor(
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, line2, state, zip, additionalProperties)
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
}
/** Whether the trust is `revocable` or `irrevocable`. */
@@ -9596,6 +9827,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
private val line2: JsonField,
private val state: JsonField,
@@ -9608,6 +9840,9 @@ private constructor(
@JsonProperty("city")
@ExcludeMissing
city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1")
@ExcludeMissing
line1: JsonField = JsonMissing.of(),
@@ -9618,16 +9853,24 @@ private constructor(
@ExcludeMissing
state: JsonField = JsonMissing.of(),
@JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
- ) : this(city, line1, line2, state, zip, mutableMapOf())
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
/**
- * The city of the address.
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
+
+ /**
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
*
* @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 city(): String = city.getRequired("city")
+ fun country(): String = country.getRequired("country")
/**
* The first line of the address.
@@ -9647,23 +9890,21 @@ private constructor(
fun line2(): Optional = line2.getOptional("line2")
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of
- * the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
*/
- fun state(): String = state.getRequired("state")
+ fun state(): Optional = state.getOptional("state")
/**
- * The ZIP code of the address.
+ * The ZIP or postal code of the address.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
*/
- fun zip(): String = zip.getRequired("zip")
+ fun zip(): Optional = zip.getOptional("zip")
/**
* Returns the raw JSON value of [city].
@@ -9673,6 +9914,14 @@ private constructor(
*/
@JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
/**
* Returns the raw JSON value of [line1].
*
@@ -9724,6 +9973,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -9737,6 +9987,7 @@ private constructor(
class Builder internal constructor() {
private var city: JsonField? = null
+ private var country: JsonField? = null
private var line1: JsonField? = null
private var line2: JsonField? = null
private var state: JsonField? = null
@@ -9746,6 +9997,7 @@ private constructor(
@JvmSynthetic
internal fun from(address: Address) = apply {
city = address.city
+ country = address.country
line1 = address.line1
line2 = address.line2
state = address.state
@@ -9753,8 +10005,11 @@ private constructor(
additionalProperties = address.additionalProperties.toMutableMap()
}
- /** The city of the address. */
- fun city(city: String) = city(JsonField.of(city))
+ /** The city, district, town, or village of the address. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
/**
* Sets [Builder.city] to an arbitrary JSON value.
@@ -9765,6 +10020,18 @@ private constructor(
*/
fun city(city: JsonField) = apply { this.city = city }
+ /** The two-letter ISO 3166-1 alpha-2 code for the country of the address. */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
/** The first line of the address. */
fun line1(line1: String) = line1(JsonField.of(line1))
@@ -9793,10 +10060,13 @@ private constructor(
fun line2(line2: JsonField) = apply { this.line2 = line2 }
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state
- * of the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US
+ * state, province, or region of the address.
*/
- fun state(state: String) = state(JsonField.of(state))
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
/**
* Sets [Builder.state] to an arbitrary JSON value.
@@ -9807,8 +10077,11 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
- /** The ZIP code of the address. */
- fun zip(zip: String) = zip(JsonField.of(zip))
+ /** The ZIP or postal code of the address. */
+ fun zip(zip: String?) = zip(JsonField.ofNullable(zip))
+
+ /** Alias for calling [Builder.zip] with `zip.orElse(null)`. */
+ fun zip(zip: Optional) = zip(zip.getOrNull())
/**
* Sets [Builder.zip] to an arbitrary JSON value.
@@ -9849,6 +10122,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -9860,6 +10134,7 @@ private constructor(
fun build(): Address =
Address(
checkRequired("city", city),
+ checkRequired("country", country),
checkRequired("line1", line1),
checkRequired("line2", line2),
checkRequired("state", state),
@@ -9876,6 +10151,7 @@ private constructor(
}
city()
+ country()
line1()
line2()
state()
@@ -9900,6 +10176,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
(if (line1.asKnown().isPresent) 1 else 0) +
(if (line2.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0) +
@@ -9912,6 +10189,7 @@ private constructor(
return other is Address &&
city == other.city &&
+ country == other.country &&
line1 == other.line1 &&
line2 == other.line2 &&
state == other.state &&
@@ -9920,13 +10198,13 @@ private constructor(
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, line2, state, zip, additionalProperties)
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
}
/** A means of verifying the person's identity. */
@@ -10838,6 +11116,7 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
private val line2: JsonField,
private val state: JsonField,
@@ -10850,6 +11129,9 @@ private constructor(
@JsonProperty("city")
@ExcludeMissing
city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1")
@ExcludeMissing
line1: JsonField = JsonMissing.of(),
@@ -10862,16 +11144,24 @@ private constructor(
@JsonProperty("zip")
@ExcludeMissing
zip: JsonField = JsonMissing.of(),
- ) : this(city, line1, line2, state, zip, mutableMapOf())
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
+
+ /**
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
/**
- * The city of the address.
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
*
* @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 city(): String = city.getRequired("city")
+ fun country(): String = country.getRequired("country")
/**
* The first line of the address.
@@ -10891,23 +11181,21 @@ private constructor(
fun line2(): Optional = line2.getOptional("line2")
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state
- * of the address.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US
+ * state, province, or region of the address.
*
* @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).
+ * (e.g. if the server responded with an unexpected value).
*/
- fun state(): String = state.getRequired("state")
+ fun state(): Optional = state.getOptional("state")
/**
- * The ZIP code of the address.
+ * The ZIP or postal code of the address.
*
* @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).
+ * (e.g. if the server responded with an unexpected value).
*/
- fun zip(): String = zip.getRequired("zip")
+ fun zip(): Optional = zip.getOptional("zip")
/**
* Returns the raw JSON value of [city].
@@ -10917,6 +11205,16 @@ private constructor(
*/
@JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("country")
+ @ExcludeMissing
+ fun _country(): JsonField = country
+
/**
* Returns the raw JSON value of [line1].
*
@@ -10969,6 +11267,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -10982,6 +11281,7 @@ private constructor(
class Builder internal constructor() {
private var city: JsonField? = null
+ private var country: JsonField? = null
private var line1: JsonField? = null
private var line2: JsonField? = null
private var state: JsonField? = null
@@ -10992,6 +11292,7 @@ private constructor(
@JvmSynthetic
internal fun from(address: Address) = apply {
city = address.city
+ country = address.country
line1 = address.line1
line2 = address.line2
state = address.state
@@ -10999,8 +11300,11 @@ private constructor(
additionalProperties = address.additionalProperties.toMutableMap()
}
- /** The city of the address. */
- fun city(city: String) = city(JsonField.of(city))
+ /** The city, district, town, or village of the address. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
/**
* Sets [Builder.city] to an arbitrary JSON value.
@@ -11011,6 +11315,20 @@ private constructor(
*/
fun city(city: JsonField) = apply { this.city = city }
+ /**
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
+ */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
/** The first line of the address. */
fun line1(line1: String) = line1(JsonField.of(line1))
@@ -11040,9 +11358,12 @@ private constructor(
/**
* The two-letter United States Postal Service (USPS) abbreviation for the
- * state of the address.
+ * US state, province, or region of the address.
*/
- fun state(state: String) = state(JsonField.of(state))
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
/**
* Sets [Builder.state] to an arbitrary JSON value.
@@ -11053,8 +11374,11 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
- /** The ZIP code of the address. */
- fun zip(zip: String) = zip(JsonField.of(zip))
+ /** The ZIP or postal code of the address. */
+ fun zip(zip: String?) = zip(JsonField.ofNullable(zip))
+
+ /** Alias for calling [Builder.zip] with `zip.orElse(null)`. */
+ fun zip(zip: Optional) = zip(zip.getOrNull())
/**
* Sets [Builder.zip] to an arbitrary JSON value.
@@ -11095,6 +11419,7 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
* .line2()
* .state()
@@ -11106,6 +11431,7 @@ private constructor(
fun build(): Address =
Address(
checkRequired("city", city),
+ checkRequired("country", country),
checkRequired("line1", line1),
checkRequired("line2", line2),
checkRequired("state", state),
@@ -11122,6 +11448,7 @@ private constructor(
}
city()
+ country()
line1()
line2()
state()
@@ -11146,6 +11473,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
(if (line1.asKnown().isPresent) 1 else 0) +
(if (line2.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0) +
@@ -11158,6 +11486,7 @@ private constructor(
return other is Address &&
city == other.city &&
+ country == other.country &&
line1 == other.line1 &&
line2 == other.line2 &&
state == other.state &&
@@ -11166,13 +11495,13 @@ private constructor(
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, line2, state, zip, additionalProperties)
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
}
/** A means of verifying the person's identity. */
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityCreateParams.kt
index 3f48e653c..8eac7fde1 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityCreateParams.kt
@@ -1964,24 +1964,28 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
+ private val line2: JsonField,
private val state: JsonField,
private val zip: JsonField,
- private val line2: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
@JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
+ @JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
@JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
- @JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
- ) : this(city, line1, state, zip, line2, mutableMapOf())
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
/**
- * The city of the address.
+ * The city, district, town, or village of the address.
*
* @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
@@ -1990,40 +1994,47 @@ private constructor(
fun city(): String = city.getRequired("city")
/**
- * The first line of the address. This is usually the street number and street.
+ * The two-letter ISO 3166-1 alpha-2 code for the country of the address.
*
* @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 line1(): String = line1.getRequired("line1")
+ fun country(): String = country.getRequired("country")
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of the
- * address.
+ * The first line of the address. This is usually the street number and street.
*
* @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 state(): String = state.getRequired("state")
+ fun line1(): String = line1.getRequired("line1")
/**
- * The ZIP code of the address.
+ * The second line of the address. This might be the floor or room number.
*
- * @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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
*/
- fun zip(): String = zip.getRequired("zip")
+ fun line2(): Optional = line2.getOptional("line2")
/**
- * The second line of the address. This might be the floor or room number.
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address. Required in certain countries.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
- fun line2(): Optional = line2.getOptional("line2")
+ fun state(): Optional = state.getOptional("state")
+
+ /**
+ * The ZIP or postal code of the address. Required in certain countries.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun zip(): Optional = zip.getOptional("zip")
/**
* Returns the raw JSON value of [city].
@@ -2032,6 +2043,13 @@ private constructor(
*/
@JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
/**
* Returns the raw JSON value of [line1].
*
@@ -2039,6 +2057,13 @@ private constructor(
*/
@JsonProperty("line1") @ExcludeMissing fun _line1(): JsonField = line1
+ /**
+ * Returns the raw JSON value of [line2].
+ *
+ * Unlike [line2], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("line2") @ExcludeMissing fun _line2(): JsonField = line2
+
/**
* Returns the raw JSON value of [state].
*
@@ -2053,13 +2078,6 @@ private constructor(
*/
@JsonProperty("zip") @ExcludeMissing fun _zip(): JsonField = zip
- /**
- * Returns the raw JSON value of [line2].
- *
- * Unlike [line2], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("line2") @ExcludeMissing fun _line2(): JsonField = line2
-
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -2080,9 +2098,8 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
- * .state()
- * .zip()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -2092,23 +2109,25 @@ private constructor(
class Builder internal constructor() {
private var city: JsonField? = null
+ private var country: JsonField? = null
private var line1: JsonField? = null
- private var state: JsonField? = null
- private var zip: JsonField? = null
private var line2: JsonField = JsonMissing.of()
+ private var state: JsonField = JsonMissing.of()
+ private var zip: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(address: Address) = apply {
city = address.city
+ country = address.country
line1 = address.line1
+ line2 = address.line2
state = address.state
zip = address.zip
- line2 = address.line2
additionalProperties = address.additionalProperties.toMutableMap()
}
- /** The city of the address. */
+ /** The city, district, town, or village of the address. */
fun city(city: String) = city(JsonField.of(city))
/**
@@ -2120,6 +2139,18 @@ private constructor(
*/
fun city(city: JsonField) = apply { this.city = city }
+ /** The two-letter ISO 3166-1 alpha-2 code for the country of the address. */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
/** The first line of the address. This is usually the street number and street. */
fun line1(line1: String) = line1(JsonField.of(line1))
@@ -2132,9 +2163,21 @@ private constructor(
*/
fun line1(line1: JsonField) = apply { this.line1 = line1 }
+ /** The second line of the address. This might be the floor or room number. */
+ fun line2(line2: String) = line2(JsonField.of(line2))
+
/**
- * The two-letter United States Postal Service (USPS) abbreviation for the state of
- * the address.
+ * Sets [Builder.line2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.line2] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun line2(line2: JsonField) = apply { this.line2 = line2 }
+
+ /**
+ * The two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address. Required in certain countries.
*/
fun state(state: String) = state(JsonField.of(state))
@@ -2147,7 +2190,7 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
- /** The ZIP code of the address. */
+ /** The ZIP or postal code of the address. Required in certain countries. */
fun zip(zip: String) = zip(JsonField.of(zip))
/**
@@ -2159,18 +2202,6 @@ private constructor(
*/
fun zip(zip: JsonField) = apply { this.zip = zip }
- /** The second line of the address. This might be the floor or room number. */
- fun line2(line2: String) = line2(JsonField.of(line2))
-
- /**
- * Sets [Builder.line2] to an arbitrary JSON value.
- *
- * You should usually call [Builder.line2] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun line2(line2: JsonField) = apply { this.line2 = line2 }
-
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -2201,9 +2232,8 @@ private constructor(
* The following fields are required:
* ```java
* .city()
+ * .country()
* .line1()
- * .state()
- * .zip()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -2211,10 +2241,11 @@ private constructor(
fun build(): Address =
Address(
checkRequired("city", city),
+ checkRequired("country", country),
checkRequired("line1", line1),
- checkRequired("state", state),
- checkRequired("zip", zip),
line2,
+ state,
+ zip,
additionalProperties.toMutableMap(),
)
}
@@ -2227,10 +2258,11 @@ private constructor(
}
city()
+ country()
line1()
+ line2()
state()
zip()
- line2()
validated = true
}
@@ -2251,10 +2283,11 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
(if (line1.asKnown().isPresent) 1 else 0) +
+ (if (line2.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0) +
- (if (zip.asKnown().isPresent) 1 else 0) +
- (if (line2.asKnown().isPresent) 1 else 0)
+ (if (zip.asKnown().isPresent) 1 else 0)
override fun equals(other: Any?): Boolean {
if (this === other) {
@@ -2263,21 +2296,22 @@ private constructor(
return other is Address &&
city == other.city &&
+ country == other.country &&
line1 == other.line1 &&
+ line2 == other.line2 &&
state == other.state &&
zip == other.zip &&
- line2 == other.line2 &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, state, zip, line2, additionalProperties)
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, state=$state, zip=$zip, line2=$line2, additionalProperties=$additionalProperties}"
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
}
class BeneficialOwner
@@ -7097,10 +7131,11 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val city: JsonField,
+ private val country: JsonField,
private val line1: JsonField,
+ private val line2: JsonField,
private val state: JsonField,
private val zip: JsonField,
- private val line2: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -7109,20 +7144,23 @@ private constructor(
@JsonProperty("city")
@ExcludeMissing
city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
@JsonProperty("line1")
@ExcludeMissing
line1: JsonField = JsonMissing.of(),
+ @JsonProperty("line2")
+ @ExcludeMissing
+ line2: JsonField = JsonMissing.of(),
@JsonProperty("state")
@ExcludeMissing
state: JsonField = JsonMissing.of(),
@JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
- @JsonProperty("line2")
- @ExcludeMissing
- line2: JsonField