@@ -41,6 +41,7 @@ private constructor(
4141 private val doingBusinessAsNames: JsonField <List <String >>,
4242 private val email: JsonField <String >,
4343 private val expectedActivityVolume: JsonField <Long >,
44+ private val externalId: JsonField <String >,
4445 private val firstName: JsonField <String >,
4546 private val identifications: JsonField <List <Identification >>,
4647 private val industryClassifications: JsonField <List <LegalEntityIndustryClassification >>,
@@ -118,6 +119,9 @@ private constructor(
118119 @JsonProperty(" expected_activity_volume" )
119120 @ExcludeMissing
120121 expectedActivityVolume: JsonField <Long > = JsonMissing .of(),
122+ @JsonProperty(" external_id" )
123+ @ExcludeMissing
124+ externalId: JsonField <String > = JsonMissing .of(),
121125 @JsonProperty(" first_name" ) @ExcludeMissing firstName: JsonField <String > = JsonMissing .of(),
122126 @JsonProperty(" identifications" )
123127 @ExcludeMissing
@@ -202,6 +206,7 @@ private constructor(
202206 doingBusinessAsNames,
203207 email,
204208 expectedActivityVolume,
209+ externalId,
205210 firstName,
206211 identifications,
207212 industryClassifications,
@@ -358,6 +363,14 @@ private constructor(
358363 fun expectedActivityVolume (): Optional <Long > =
359364 expectedActivityVolume.getOptional(" expected_activity_volume" )
360365
366+ /* *
367+ * An optional user-defined 180 character unique identifier.
368+ *
369+ * @throws ModernTreasuryInvalidDataException if the JSON field has an unexpected type (e.g. if
370+ * the server responded with an unexpected value).
371+ */
372+ fun externalId (): Optional <String > = externalId.getOptional(" external_id" )
373+
361374 /* *
362375 * An individual's first name.
363376 *
@@ -718,6 +731,13 @@ private constructor(
718731 @ExcludeMissing
719732 fun _expectedActivityVolume (): JsonField <Long > = expectedActivityVolume
720733
734+ /* *
735+ * Returns the raw JSON value of [externalId].
736+ *
737+ * Unlike [externalId], this method doesn't throw if the JSON field has an unexpected type.
738+ */
739+ @JsonProperty(" external_id" ) @ExcludeMissing fun _externalId (): JsonField <String > = externalId
740+
721741 /* *
722742 * Returns the raw JSON value of [firstName].
723743 *
@@ -995,6 +1015,7 @@ private constructor(
9951015 * .doingBusinessAsNames()
9961016 * .email()
9971017 * .expectedActivityVolume()
1018+ * .externalId()
9981019 * .firstName()
9991020 * .identifications()
10001021 * .industryClassifications()
@@ -1047,6 +1068,7 @@ private constructor(
10471068 private var doingBusinessAsNames: JsonField <MutableList <String >>? = null
10481069 private var email: JsonField <String >? = null
10491070 private var expectedActivityVolume: JsonField <Long >? = null
1071+ private var externalId: JsonField <String >? = null
10501072 private var firstName: JsonField <String >? = null
10511073 private var identifications: JsonField <MutableList <Identification >>? = null
10521074 private var industryClassifications:
@@ -1097,6 +1119,7 @@ private constructor(
10971119 doingBusinessAsNames = childLegalEntity.doingBusinessAsNames.map { it.toMutableList() }
10981120 email = childLegalEntity.email
10991121 expectedActivityVolume = childLegalEntity.expectedActivityVolume
1122+ externalId = childLegalEntity.externalId
11001123 firstName = childLegalEntity.firstName
11011124 identifications = childLegalEntity.identifications.map { it.toMutableList() }
11021125 industryClassifications =
@@ -1431,6 +1454,21 @@ private constructor(
14311454 this .expectedActivityVolume = expectedActivityVolume
14321455 }
14331456
1457+ /* * An optional user-defined 180 character unique identifier. */
1458+ fun externalId (externalId : String? ) = externalId(JsonField .ofNullable(externalId))
1459+
1460+ /* * Alias for calling [Builder.externalId] with `externalId.orElse(null)`. */
1461+ fun externalId (externalId : Optional <String >) = externalId(externalId.getOrNull())
1462+
1463+ /* *
1464+ * Sets [Builder.externalId] to an arbitrary JSON value.
1465+ *
1466+ * You should usually call [Builder.externalId] with a well-typed [String] value instead.
1467+ * This method is primarily for setting the field to an undocumented or not yet supported
1468+ * value.
1469+ */
1470+ fun externalId (externalId : JsonField <String >) = apply { this .externalId = externalId }
1471+
14341472 /* * An individual's first name. */
14351473 fun firstName (firstName : String? ) = firstName(JsonField .ofNullable(firstName))
14361474
@@ -2027,6 +2065,7 @@ private constructor(
20272065 * .doingBusinessAsNames()
20282066 * .email()
20292067 * .expectedActivityVolume()
2068+ * .externalId()
20302069 * .firstName()
20312070 * .identifications()
20322071 * .industryClassifications()
@@ -2079,6 +2118,7 @@ private constructor(
20792118 },
20802119 checkRequired(" email" , email),
20812120 checkRequired(" expectedActivityVolume" , expectedActivityVolume),
2121+ checkRequired(" externalId" , externalId),
20822122 checkRequired(" firstName" , firstName),
20832123 checkRequired(" identifications" , identifications).map { it.toImmutable() },
20842124 checkRequired(" industryClassifications" , industryClassifications).map {
@@ -2141,6 +2181,7 @@ private constructor(
21412181 doingBusinessAsNames()
21422182 email()
21432183 expectedActivityVolume()
2184+ externalId()
21442185 firstName()
21452186 identifications().forEach { it.validate() }
21462187 industryClassifications().forEach { it.validate() }
@@ -2202,6 +2243,7 @@ private constructor(
22022243 (doingBusinessAsNames.asKnown().getOrNull()?.size ? : 0 ) +
22032244 (if (email.asKnown().isPresent) 1 else 0 ) +
22042245 (if (expectedActivityVolume.asKnown().isPresent) 1 else 0 ) +
2246+ (if (externalId.asKnown().isPresent) 1 else 0 ) +
22052247 (if (firstName.asKnown().isPresent) 1 else 0 ) +
22062248 (identifications.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 ) +
22072249 (industryClassifications.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 ) +
@@ -8266,6 +8308,7 @@ private constructor(
82668308 doingBusinessAsNames == other.doingBusinessAsNames &&
82678309 email == other.email &&
82688310 expectedActivityVolume == other.expectedActivityVolume &&
8311+ externalId == other.externalId &&
82698312 firstName == other.firstName &&
82708313 identifications == other.identifications &&
82718314 industryClassifications == other.industryClassifications &&
@@ -8315,6 +8358,7 @@ private constructor(
83158358 doingBusinessAsNames,
83168359 email,
83178360 expectedActivityVolume,
8361+ externalId,
83188362 firstName,
83198363 identifications,
83208364 industryClassifications,
@@ -8350,5 +8394,5 @@ private constructor(
83508394 override fun hashCode (): Int = hashCode
83518395
83528396 override fun toString () =
8353- "ChildLegalEntity{id=$id, addresses=$addresses, bankSettings=$bankSettings, businessDescription=$businessDescription, businessName=$businessName, citizenshipCountry=$citizenshipCountry, complianceDetails=$complianceDetails, countryOfIncorporation=$countryOfIncorporation, createdAt=$createdAt, dateFormed=$dateFormed, dateOfBirth=$dateOfBirth, discardedAt=$discardedAt, documents=$documents, doingBusinessAsNames=$doingBusinessAsNames, email=$email, expectedActivityVolume=$expectedActivityVolume, firstName=$firstName, identifications=$identifications, industryClassifications=$industryClassifications, intendedUse=$intendedUse, lastName=$lastName, legalEntityAssociations=$legalEntityAssociations, legalEntityType=$legalEntityType, legalStructure=$legalStructure, listedExchange=$listedExchange, liveMode=$liveMode, metadata=$metadata, middleName=$middleName, object_=$object_, operatingJurisdictions=$operatingJurisdictions, phoneNumbers=$phoneNumbers, politicallyExposedPerson=$politicallyExposedPerson, preferredName=$preferredName, prefix=$prefix, primarySocialMediaSites=$primarySocialMediaSites, regulators=$regulators, riskRating=$riskRating, status=$status, suffix=$suffix, thirdPartyVerification=$thirdPartyVerification, tickerSymbol=$tickerSymbol, updatedAt=$updatedAt, wealthAndEmploymentDetails=$wealthAndEmploymentDetails, website=$website, additionalProperties=$additionalProperties}"
8397+ "ChildLegalEntity{id=$id, addresses=$addresses, bankSettings=$bankSettings, businessDescription=$businessDescription, businessName=$businessName, citizenshipCountry=$citizenshipCountry, complianceDetails=$complianceDetails, countryOfIncorporation=$countryOfIncorporation, createdAt=$createdAt, dateFormed=$dateFormed, dateOfBirth=$dateOfBirth, discardedAt=$discardedAt, documents=$documents, doingBusinessAsNames=$doingBusinessAsNames, email=$email, expectedActivityVolume=$expectedActivityVolume, externalId=$externalId, firstName=$firstName, identifications=$identifications, industryClassifications=$industryClassifications, intendedUse=$intendedUse, lastName=$lastName, legalEntityAssociations=$legalEntityAssociations, legalEntityType=$legalEntityType, legalStructure=$legalStructure, listedExchange=$listedExchange, liveMode=$liveMode, metadata=$metadata, middleName=$middleName, object_=$object_, operatingJurisdictions=$operatingJurisdictions, phoneNumbers=$phoneNumbers, politicallyExposedPerson=$politicallyExposedPerson, preferredName=$preferredName, prefix=$prefix, primarySocialMediaSites=$primarySocialMediaSites, regulators=$regulators, riskRating=$riskRating, status=$status, suffix=$suffix, thirdPartyVerification=$thirdPartyVerification, tickerSymbol=$tickerSymbol, updatedAt=$updatedAt, wealthAndEmploymentDetails=$wealthAndEmploymentDetails, website=$website, additionalProperties=$additionalProperties}"
83548398}
0 commit comments