Skip to content

Commit 79e067e

Browse files
feat(api): api update
1 parent e0e9ac7 commit 79e067e

26 files changed

+338
-215
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-05a1c7485ea6dd75ad2fb1a0628570d88a3e7c4f1e1ecad433711c78deae50e6.yml
3-
openapi_spec_hash: 6d6014d50e18c98219b496bb2a5dab1d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-3003136d45e38172828b1eb62bf9d3c876140355b4b1271559108f3df2c87208.yml
3+
openapi_spec_hash: 29a85aba1eec35434ba1db898ea18b0b
44
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6

finch-java-core/src/main/kotlin/com/tryfinch/api/models/Company.kt

Lines changed: 101 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -692,18 +692,29 @@ private constructor(
692692

693693
companion object {
694694

695-
/** Returns a mutable builder for constructing an instance of [Account]. */
695+
/**
696+
* Returns a mutable builder for constructing an instance of [Account].
697+
*
698+
* The following fields are required:
699+
* ```java
700+
* .accountName()
701+
* .accountNumber()
702+
* .accountType()
703+
* .institutionName()
704+
* .routingNumber()
705+
* ```
706+
*/
696707
@JvmStatic fun builder() = Builder()
697708
}
698709

699710
/** A builder for [Account]. */
700711
class Builder internal constructor() {
701712

702-
private var accountName: JsonField<String> = JsonMissing.of()
703-
private var accountNumber: JsonField<String> = JsonMissing.of()
704-
private var accountType: JsonField<AccountType> = JsonMissing.of()
705-
private var institutionName: JsonField<String> = JsonMissing.of()
706-
private var routingNumber: JsonField<String> = JsonMissing.of()
713+
private var accountName: JsonField<String>? = null
714+
private var accountNumber: JsonField<String>? = null
715+
private var accountType: JsonField<AccountType>? = null
716+
private var institutionName: JsonField<String>? = null
717+
private var routingNumber: JsonField<String>? = null
707718
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
708719

709720
@JvmSynthetic
@@ -835,14 +846,25 @@ private constructor(
835846
* Returns an immutable instance of [Account].
836847
*
837848
* Further updates to this [Builder] will not mutate the returned instance.
849+
*
850+
* The following fields are required:
851+
* ```java
852+
* .accountName()
853+
* .accountNumber()
854+
* .accountType()
855+
* .institutionName()
856+
* .routingNumber()
857+
* ```
858+
*
859+
* @throws IllegalStateException if any required field is unset.
838860
*/
839861
fun build(): Account =
840862
Account(
841-
accountName,
842-
accountNumber,
843-
accountType,
844-
institutionName,
845-
routingNumber,
863+
checkRequired("accountName", accountName),
864+
checkRequired("accountNumber", accountNumber),
865+
checkRequired("accountType", accountType),
866+
checkRequired("institutionName", institutionName),
867+
checkRequired("routingNumber", routingNumber),
846868
additionalProperties.toMutableMap(),
847869
)
848870
}
@@ -1091,15 +1113,23 @@ private constructor(
10911113

10921114
companion object {
10931115

1094-
/** Returns a mutable builder for constructing an instance of [Department]. */
1116+
/**
1117+
* Returns a mutable builder for constructing an instance of [Department].
1118+
*
1119+
* The following fields are required:
1120+
* ```java
1121+
* .name()
1122+
* .parent()
1123+
* ```
1124+
*/
10951125
@JvmStatic fun builder() = Builder()
10961126
}
10971127

10981128
/** A builder for [Department]. */
10991129
class Builder internal constructor() {
11001130

1101-
private var name: JsonField<String> = JsonMissing.of()
1102-
private var parent: JsonField<Parent> = JsonMissing.of()
1131+
private var name: JsonField<String>? = null
1132+
private var parent: JsonField<Parent>? = null
11031133
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
11041134

11051135
@JvmSynthetic
@@ -1162,8 +1192,21 @@ private constructor(
11621192
* Returns an immutable instance of [Department].
11631193
*
11641194
* Further updates to this [Builder] will not mutate the returned instance.
1195+
*
1196+
* The following fields are required:
1197+
* ```java
1198+
* .name()
1199+
* .parent()
1200+
* ```
1201+
*
1202+
* @throws IllegalStateException if any required field is unset.
11651203
*/
1166-
fun build(): Department = Department(name, parent, additionalProperties.toMutableMap())
1204+
fun build(): Department =
1205+
Department(
1206+
checkRequired("name", name),
1207+
checkRequired("parent", parent),
1208+
additionalProperties.toMutableMap(),
1209+
)
11671210
}
11681211

11691212
private var validated: Boolean = false
@@ -1238,14 +1281,21 @@ private constructor(
12381281

12391282
companion object {
12401283

1241-
/** Returns a mutable builder for constructing an instance of [Parent]. */
1284+
/**
1285+
* Returns a mutable builder for constructing an instance of [Parent].
1286+
*
1287+
* The following fields are required:
1288+
* ```java
1289+
* .name()
1290+
* ```
1291+
*/
12421292
@JvmStatic fun builder() = Builder()
12431293
}
12441294

12451295
/** A builder for [Parent]. */
12461296
class Builder internal constructor() {
12471297

1248-
private var name: JsonField<String> = JsonMissing.of()
1298+
private var name: JsonField<String>? = null
12491299
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
12501300

12511301
@JvmSynthetic
@@ -1295,8 +1345,16 @@ private constructor(
12951345
* Returns an immutable instance of [Parent].
12961346
*
12971347
* Further updates to this [Builder] will not mutate the returned instance.
1348+
*
1349+
* The following fields are required:
1350+
* ```java
1351+
* .name()
1352+
* ```
1353+
*
1354+
* @throws IllegalStateException if any required field is unset.
12981355
*/
1299-
fun build(): Parent = Parent(name, additionalProperties.toMutableMap())
1356+
fun build(): Parent =
1357+
Parent(checkRequired("name", name), additionalProperties.toMutableMap())
13001358
}
13011359

13021360
private var validated: Boolean = false
@@ -1420,15 +1478,23 @@ private constructor(
14201478

14211479
companion object {
14221480

1423-
/** Returns a mutable builder for constructing an instance of [Entity]. */
1481+
/**
1482+
* Returns a mutable builder for constructing an instance of [Entity].
1483+
*
1484+
* The following fields are required:
1485+
* ```java
1486+
* .subtype()
1487+
* .type()
1488+
* ```
1489+
*/
14241490
@JvmStatic fun builder() = Builder()
14251491
}
14261492

14271493
/** A builder for [Entity]. */
14281494
class Builder internal constructor() {
14291495

1430-
private var subtype: JsonField<Subtype> = JsonMissing.of()
1431-
private var type: JsonField<Type> = JsonMissing.of()
1496+
private var subtype: JsonField<Subtype>? = null
1497+
private var type: JsonField<Type>? = null
14321498
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
14331499

14341500
@JvmSynthetic
@@ -1491,8 +1557,21 @@ private constructor(
14911557
* Returns an immutable instance of [Entity].
14921558
*
14931559
* Further updates to this [Builder] will not mutate the returned instance.
1560+
*
1561+
* The following fields are required:
1562+
* ```java
1563+
* .subtype()
1564+
* .type()
1565+
* ```
1566+
*
1567+
* @throws IllegalStateException if any required field is unset.
14941568
*/
1495-
fun build(): Entity = Entity(subtype, type, additionalProperties.toMutableMap())
1569+
fun build(): Entity =
1570+
Entity(
1571+
checkRequired("subtype", subtype),
1572+
checkRequired("type", type),
1573+
additionalProperties.toMutableMap(),
1574+
)
14961575
}
14971576

14981577
private var validated: Boolean = false

0 commit comments

Comments
 (0)