Skip to content

Commit af5e9cb

Browse files
stainless-app[bot]samridh90
authored andcommitted
feat(api): api update
1 parent d0579cf commit af5e9cb

39 files changed

Lines changed: 687 additions & 15 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 168
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury%2Fmodern-treasury-3f2ed938405900feaf590205314bc70cc6684bd434fa47d592d919557226601f.yml
3-
openapi_spec_hash: e1073cd0d5d9eb38ae9d47d48e55617c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury%2Fmodern-treasury-20d75a5daa79f1ce7a05ff00f1ebb40d114e35da237864246a9c047174595ed3.yml
3+
openapi_spec_hash: cf7b30f88cd5fa128ca3371383ec0049
44
config_hash: 175db3263330b8dbe78174e98b1c38fc

modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/models/ChildLegalEntity.kt

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
}

modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/models/ChildLegalEntityCreate.kt

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ private constructor(
3737
private val doingBusinessAsNames: JsonField<List<String>>,
3838
private val email: JsonField<String>,
3939
private val expectedActivityVolume: JsonField<Long>,
40+
private val externalId: JsonField<String>,
4041
private val firstName: JsonField<String>,
4142
private val identifications: JsonField<List<IdentificationCreateRequest>>,
4243
private val industryClassifications: JsonField<List<LegalEntityIndustryClassification>>,
@@ -101,6 +102,9 @@ private constructor(
101102
@JsonProperty("expected_activity_volume")
102103
@ExcludeMissing
103104
expectedActivityVolume: JsonField<Long> = JsonMissing.of(),
105+
@JsonProperty("external_id")
106+
@ExcludeMissing
107+
externalId: JsonField<String> = JsonMissing.of(),
104108
@JsonProperty("first_name") @ExcludeMissing firstName: JsonField<String> = JsonMissing.of(),
105109
@JsonProperty("identifications")
106110
@ExcludeMissing
@@ -177,6 +181,7 @@ private constructor(
177181
doingBusinessAsNames,
178182
email,
179183
expectedActivityVolume,
184+
externalId,
180185
firstName,
181186
identifications,
182187
industryClassifications,
@@ -307,6 +312,14 @@ private constructor(
307312
fun expectedActivityVolume(): Optional<Long> =
308313
expectedActivityVolume.getOptional("expected_activity_volume")
309314

315+
/**
316+
* An optional user-defined 180 character unique identifier.
317+
*
318+
* @throws ModernTreasuryInvalidDataException if the JSON field has an unexpected type (e.g. if
319+
* the server responded with an unexpected value).
320+
*/
321+
fun externalId(): Optional<String> = externalId.getOptional("external_id")
322+
310323
/**
311324
* An individual's first name.
312325
*
@@ -623,6 +636,13 @@ private constructor(
623636
@ExcludeMissing
624637
fun _expectedActivityVolume(): JsonField<Long> = expectedActivityVolume
625638

639+
/**
640+
* Returns the raw JSON value of [externalId].
641+
*
642+
* Unlike [externalId], this method doesn't throw if the JSON field has an unexpected type.
643+
*/
644+
@JsonProperty("external_id") @ExcludeMissing fun _externalId(): JsonField<String> = externalId
645+
626646
/**
627647
* Returns the raw JSON value of [firstName].
628648
*
@@ -875,6 +895,7 @@ private constructor(
875895
private var doingBusinessAsNames: JsonField<MutableList<String>>? = null
876896
private var email: JsonField<String> = JsonMissing.of()
877897
private var expectedActivityVolume: JsonField<Long> = JsonMissing.of()
898+
private var externalId: JsonField<String> = JsonMissing.of()
878899
private var firstName: JsonField<String> = JsonMissing.of()
879900
private var identifications: JsonField<MutableList<IdentificationCreateRequest>>? = null
880901
private var industryClassifications:
@@ -922,6 +943,7 @@ private constructor(
922943
childLegalEntityCreate.doingBusinessAsNames.map { it.toMutableList() }
923944
email = childLegalEntityCreate.email
924945
expectedActivityVolume = childLegalEntityCreate.expectedActivityVolume
946+
externalId = childLegalEntityCreate.externalId
925947
firstName = childLegalEntityCreate.firstName
926948
identifications = childLegalEntityCreate.identifications.map { it.toMutableList() }
927949
industryClassifications =
@@ -1207,6 +1229,21 @@ private constructor(
12071229
this.expectedActivityVolume = expectedActivityVolume
12081230
}
12091231

1232+
/** An optional user-defined 180 character unique identifier. */
1233+
fun externalId(externalId: String?) = externalId(JsonField.ofNullable(externalId))
1234+
1235+
/** Alias for calling [Builder.externalId] with `externalId.orElse(null)`. */
1236+
fun externalId(externalId: Optional<String>) = externalId(externalId.getOrNull())
1237+
1238+
/**
1239+
* Sets [Builder.externalId] to an arbitrary JSON value.
1240+
*
1241+
* You should usually call [Builder.externalId] with a well-typed [String] value instead.
1242+
* This method is primarily for setting the field to an undocumented or not yet supported
1243+
* value.
1244+
*/
1245+
fun externalId(externalId: JsonField<String>) = apply { this.externalId = externalId }
1246+
12101247
/** An individual's first name. */
12111248
fun firstName(firstName: String?) = firstName(JsonField.ofNullable(firstName))
12121249

@@ -1765,6 +1802,7 @@ private constructor(
17651802
(doingBusinessAsNames ?: JsonMissing.of()).map { it.toImmutable() },
17661803
email,
17671804
expectedActivityVolume,
1805+
externalId,
17681806
firstName,
17691807
(identifications ?: JsonMissing.of()).map { it.toImmutable() },
17701808
(industryClassifications ?: JsonMissing.of()).map { it.toImmutable() },
@@ -1813,6 +1851,7 @@ private constructor(
18131851
doingBusinessAsNames()
18141852
email()
18151853
expectedActivityVolume()
1854+
externalId()
18161855
firstName()
18171856
identifications().ifPresent { it.forEach { it.validate() } }
18181857
industryClassifications().ifPresent { it.forEach { it.validate() } }
@@ -1868,6 +1907,7 @@ private constructor(
18681907
(doingBusinessAsNames.asKnown().getOrNull()?.size ?: 0) +
18691908
(if (email.asKnown().isPresent) 1 else 0) +
18701909
(if (expectedActivityVolume.asKnown().isPresent) 1 else 0) +
1910+
(if (externalId.asKnown().isPresent) 1 else 0) +
18711911
(if (firstName.asKnown().isPresent) 1 else 0) +
18721912
(identifications.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
18731913
(industryClassifications.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
@@ -6204,6 +6244,7 @@ private constructor(
62046244
doingBusinessAsNames == other.doingBusinessAsNames &&
62056245
email == other.email &&
62066246
expectedActivityVolume == other.expectedActivityVolume &&
6247+
externalId == other.externalId &&
62076248
firstName == other.firstName &&
62086249
identifications == other.identifications &&
62096250
industryClassifications == other.industryClassifications &&
@@ -6246,6 +6287,7 @@ private constructor(
62466287
doingBusinessAsNames,
62476288
email,
62486289
expectedActivityVolume,
6290+
externalId,
62496291
firstName,
62506292
identifications,
62516293
industryClassifications,
@@ -6278,5 +6320,5 @@ private constructor(
62786320
override fun hashCode(): Int = hashCode
62796321

62806322
override fun toString() =
6281-
"ChildLegalEntityCreate{addresses=$addresses, bankSettings=$bankSettings, businessDescription=$businessDescription, businessName=$businessName, citizenshipCountry=$citizenshipCountry, connectionId=$connectionId, countryOfIncorporation=$countryOfIncorporation, dateFormed=$dateFormed, dateOfBirth=$dateOfBirth, doingBusinessAsNames=$doingBusinessAsNames, email=$email, expectedActivityVolume=$expectedActivityVolume, firstName=$firstName, identifications=$identifications, industryClassifications=$industryClassifications, intendedUse=$intendedUse, lastName=$lastName, legalEntityAssociations=$legalEntityAssociations, legalEntityType=$legalEntityType, legalStructure=$legalStructure, listedExchange=$listedExchange, metadata=$metadata, middleName=$middleName, operatingJurisdictions=$operatingJurisdictions, phoneNumbers=$phoneNumbers, politicallyExposedPerson=$politicallyExposedPerson, preferredName=$preferredName, prefix=$prefix, primarySocialMediaSites=$primarySocialMediaSites, regulators=$regulators, riskRating=$riskRating, status=$status, suffix=$suffix, thirdPartyVerification=$thirdPartyVerification, tickerSymbol=$tickerSymbol, wealthAndEmploymentDetails=$wealthAndEmploymentDetails, website=$website, additionalProperties=$additionalProperties}"
6323+
"ChildLegalEntityCreate{addresses=$addresses, bankSettings=$bankSettings, businessDescription=$businessDescription, businessName=$businessName, citizenshipCountry=$citizenshipCountry, connectionId=$connectionId, countryOfIncorporation=$countryOfIncorporation, dateFormed=$dateFormed, dateOfBirth=$dateOfBirth, 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, metadata=$metadata, middleName=$middleName, operatingJurisdictions=$operatingJurisdictions, phoneNumbers=$phoneNumbers, politicallyExposedPerson=$politicallyExposedPerson, preferredName=$preferredName, prefix=$prefix, primarySocialMediaSites=$primarySocialMediaSites, regulators=$regulators, riskRating=$riskRating, status=$status, suffix=$suffix, thirdPartyVerification=$thirdPartyVerification, tickerSymbol=$tickerSymbol, wealthAndEmploymentDetails=$wealthAndEmploymentDetails, website=$website, additionalProperties=$additionalProperties}"
62826324
}

0 commit comments

Comments
 (0)