Skip to content

Commit b3a270c

Browse files
feat(api): api update
1 parent 614001d commit b3a270c

File tree

5 files changed

+83
-26
lines changed

5 files changed

+83
-26
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-dbbf65e94ae7a53cd5a313974761102447ccda3096fd40967c137ad3f80f7154.yml
3-
openapi_spec_hash: 3cc9d87b60dc27283735d610d4b51a53
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-944a0f9d35f3b8ec2ba62fa12e551cf89f0b845f8ed1e3c7f67a9fb80b32d96f.yml
3+
openapi_spec_hash: 37c849e7b5dd941c011385b49467e077
44
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ private constructor(
320320

321321
/**
322322
* Custom fields for the individual. These are fields which are defined by the employer in
323-
* the system.
323+
* the system. Custom fields are not currently supported for assisted connections.
324324
*
325325
* @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
326326
* server responded with an unexpected value).
@@ -741,7 +741,7 @@ private constructor(
741741

742742
/**
743743
* Custom fields for the individual. These are fields which are defined by the employer
744-
* in the system.
744+
* in the system. Custom fields are not currently supported for assisted connections.
745745
*/
746746
fun customFields(customFields: List<CustomField>?) =
747747
customFields(JsonField.ofNullable(customFields))
@@ -1285,7 +1285,10 @@ private constructor(
12851285
additionalProperties = customField.additionalProperties.toMutableMap()
12861286
}
12871287

1288-
fun name(name: String) = name(JsonField.of(name))
1288+
fun name(name: String?) = name(JsonField.ofNullable(name))
1289+
1290+
/** Alias for calling [Builder.name] with `name.orElse(null)`. */
1291+
fun name(name: Optional<String>) = name(name.getOrNull())
12891292

12901293
/**
12911294
* Sets [Builder.name] to an arbitrary JSON value.

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

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ private constructor(
143143
fun employment(): Optional<Employment> = employment.getOptional("employment")
144144

145145
/**
146-
* The detailed employment status of the individual.
146+
* The detailed employment status of the individual. Available options: `active`, `deceased`,
147+
* `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
147148
*
148149
* @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
149150
* server responded with an unexpected value).
@@ -492,7 +493,12 @@ private constructor(
492493
* Custom fields for the individual. These are fields which are defined by the employer in
493494
* the system. Custom fields are not currently supported for assisted connections.
494495
*/
495-
fun customFields(customFields: List<CustomField>) = customFields(JsonField.of(customFields))
496+
fun customFields(customFields: List<CustomField>?) =
497+
customFields(JsonField.ofNullable(customFields))
498+
499+
/** Alias for calling [Builder.customFields] with `customFields.orElse(null)`. */
500+
fun customFields(customFields: Optional<List<CustomField>>) =
501+
customFields(customFields.getOrNull())
496502

497503
/**
498504
* Sets [Builder.customFields] to an arbitrary JSON value.
@@ -547,7 +553,10 @@ private constructor(
547553
*/
548554
fun employment(employment: JsonField<Employment>) = apply { this.employment = employment }
549555

550-
/** The detailed employment status of the individual. */
556+
/**
557+
* The detailed employment status of the individual. Available options: `active`,
558+
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
559+
*/
551560
fun employmentStatus(employmentStatus: EmploymentStatus?) =
552561
employmentStatus(JsonField.ofNullable(employmentStatus))
553562

@@ -741,7 +750,10 @@ private constructor(
741750
fun middleName(middleName: JsonField<String>) = apply { this.middleName = middleName }
742751

743752
/** The source system's unique employment identifier for this individual */
744-
fun sourceId(sourceId: String) = sourceId(JsonField.of(sourceId))
753+
fun sourceId(sourceId: String?) = sourceId(JsonField.ofNullable(sourceId))
754+
755+
/** Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */
756+
fun sourceId(sourceId: Optional<String>) = sourceId(sourceId.getOrNull())
745757

746758
/**
747759
* Sets [Builder.sourceId] to an arbitrary JSON value.
@@ -1656,7 +1668,10 @@ private constructor(
16561668
"Employment{subtype=$subtype, type=$type, additionalProperties=$additionalProperties}"
16571669
}
16581670

1659-
/** The detailed employment status of the individual. */
1671+
/**
1672+
* The detailed employment status of the individual. Available options: `active`, `deceased`,
1673+
* `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
1674+
*/
16601675
class EmploymentStatus @JsonCreator private constructor(private val value: JsonField<String>) :
16611676
Enum {
16621677

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

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ private constructor(
291291
fun employment(): Optional<Employment> = employment.getOptional("employment")
292292

293293
/**
294-
* The detailed employment status of the individual.
294+
* The detailed employment status of the individual. Available options: `active`,
295+
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
295296
*
296297
* @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
297298
* server responded with an unexpected value).
@@ -763,8 +764,12 @@ private constructor(
763764
* Custom fields for the individual. These are fields which are defined by the employer
764765
* in the system. Custom fields are not currently supported for assisted connections.
765766
*/
766-
fun customFields(customFields: List<CustomField>) =
767-
customFields(JsonField.of(customFields))
767+
fun customFields(customFields: List<CustomField>?) =
768+
customFields(JsonField.ofNullable(customFields))
769+
770+
/** Alias for calling [Builder.customFields] with `customFields.orElse(null)`. */
771+
fun customFields(customFields: Optional<List<CustomField>>) =
772+
customFields(customFields.getOrNull())
768773

769774
/**
770775
* Sets [Builder.customFields] to an arbitrary JSON value.
@@ -865,7 +870,10 @@ private constructor(
865870
this.employment = employment
866871
}
867872

868-
/** The detailed employment status of the individual. */
873+
/**
874+
* The detailed employment status of the individual. Available options: `active`,
875+
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
876+
*/
869877
fun employmentStatus(employmentStatus: EmploymentStatus?) =
870878
employmentStatus(JsonField.ofNullable(employmentStatus))
871879

@@ -1183,7 +1191,10 @@ private constructor(
11831191
fun residence(residence: JsonField<Location>) = apply { this.residence = residence }
11841192

11851193
/** The source system's unique employment identifier for this individual */
1186-
fun sourceId(sourceId: String) = sourceId(JsonField.of(sourceId))
1194+
fun sourceId(sourceId: String?) = sourceId(JsonField.ofNullable(sourceId))
1195+
1196+
/** Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */
1197+
fun sourceId(sourceId: Optional<String>) = sourceId(sourceId.getOrNull())
11871198

11881199
/**
11891200
* Sets [Builder.sourceId] to an arbitrary JSON value.
@@ -2447,7 +2458,10 @@ private constructor(
24472458
"Employment{subtype=$subtype, type=$type, additionalProperties=$additionalProperties}"
24482459
}
24492460

2450-
/** The detailed employment status of the individual. */
2461+
/**
2462+
* The detailed employment status of the individual. Available options: `active`,
2463+
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
2464+
*/
24512465
class EmploymentStatus
24522466
@JsonCreator
24532467
private constructor(private val value: JsonField<String>) : Enum {

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

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ private constructor(
6767
fun employment(): Optional<Employment> = body.employment()
6868

6969
/**
70-
* The detailed employment status of the individual.
70+
* The detailed employment status of the individual. Available options: `active`, `deceased`,
71+
* `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
7172
*
7273
* @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
7374
* server responded with an unexpected value).
@@ -373,10 +374,14 @@ private constructor(
373374
* Custom fields for the individual. These are fields which are defined by the employer in
374375
* the system. Custom fields are not currently supported for assisted connections.
375376
*/
376-
fun customFields(customFields: List<CustomField>) = apply {
377+
fun customFields(customFields: List<CustomField>?) = apply {
377378
body.customFields(customFields)
378379
}
379380

381+
/** Alias for calling [Builder.customFields] with `customFields.orElse(null)`. */
382+
fun customFields(customFields: Optional<List<CustomField>>) =
383+
customFields(customFields.getOrNull())
384+
380385
/**
381386
* Sets [Builder.customFields] to an arbitrary JSON value.
382387
*
@@ -425,7 +430,10 @@ private constructor(
425430
*/
426431
fun employment(employment: JsonField<Employment>) = apply { body.employment(employment) }
427432

428-
/** The detailed employment status of the individual. */
433+
/**
434+
* The detailed employment status of the individual. Available options: `active`,
435+
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
436+
*/
429437
fun employmentStatus(employmentStatus: EmploymentStatus?) = apply {
430438
body.employmentStatus(employmentStatus)
431439
}
@@ -617,7 +625,10 @@ private constructor(
617625
fun middleName(middleName: JsonField<String>) = apply { body.middleName(middleName) }
618626

619627
/** The source system's unique employment identifier for this individual */
620-
fun sourceId(sourceId: String) = apply { body.sourceId(sourceId) }
628+
fun sourceId(sourceId: String?) = apply { body.sourceId(sourceId) }
629+
630+
/** Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */
631+
fun sourceId(sourceId: Optional<String>) = sourceId(sourceId.getOrNull())
621632

622633
/**
623634
* Sets [Builder.sourceId] to an arbitrary JSON value.
@@ -925,7 +936,8 @@ private constructor(
925936
fun employment(): Optional<Employment> = employment.getOptional("employment")
926937

927938
/**
928-
* The detailed employment status of the individual.
939+
* The detailed employment status of the individual. Available options: `active`,
940+
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
929941
*
930942
* @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the
931943
* server responded with an unexpected value).
@@ -1259,8 +1271,12 @@ private constructor(
12591271
* Custom fields for the individual. These are fields which are defined by the employer
12601272
* in the system. Custom fields are not currently supported for assisted connections.
12611273
*/
1262-
fun customFields(customFields: List<CustomField>) =
1263-
customFields(JsonField.of(customFields))
1274+
fun customFields(customFields: List<CustomField>?) =
1275+
customFields(JsonField.ofNullable(customFields))
1276+
1277+
/** Alias for calling [Builder.customFields] with `customFields.orElse(null)`. */
1278+
fun customFields(customFields: Optional<List<CustomField>>) =
1279+
customFields(customFields.getOrNull())
12641280

12651281
/**
12661282
* Sets [Builder.customFields] to an arbitrary JSON value.
@@ -1319,7 +1335,10 @@ private constructor(
13191335
this.employment = employment
13201336
}
13211337

1322-
/** The detailed employment status of the individual. */
1338+
/**
1339+
* The detailed employment status of the individual. Available options: `active`,
1340+
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
1341+
*/
13231342
fun employmentStatus(employmentStatus: EmploymentStatus?) =
13241343
employmentStatus(JsonField.ofNullable(employmentStatus))
13251344

@@ -1521,7 +1540,10 @@ private constructor(
15211540
fun middleName(middleName: JsonField<String>) = apply { this.middleName = middleName }
15221541

15231542
/** The source system's unique employment identifier for this individual */
1524-
fun sourceId(sourceId: String) = sourceId(JsonField.of(sourceId))
1543+
fun sourceId(sourceId: String?) = sourceId(JsonField.ofNullable(sourceId))
1544+
1545+
/** Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */
1546+
fun sourceId(sourceId: Optional<String>) = sourceId(sourceId.getOrNull())
15251547

15261548
/**
15271549
* Sets [Builder.sourceId] to an arbitrary JSON value.
@@ -2455,7 +2477,10 @@ private constructor(
24552477
"Employment{subtype=$subtype, type=$type, additionalProperties=$additionalProperties}"
24562478
}
24572479

2458-
/** The detailed employment status of the individual. */
2480+
/**
2481+
* The detailed employment status of the individual. Available options: `active`, `deceased`,
2482+
* `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
2483+
*/
24592484
class EmploymentStatus @JsonCreator private constructor(private val value: JsonField<String>) :
24602485
Enum {
24612486

0 commit comments

Comments
 (0)