Skip to content

Commit 76286ae

Browse files
feat(api): api update (#344)
1 parent 19119ef commit 76286ae

6 files changed

Lines changed: 55 additions & 51 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 38
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-c7c3b67aee7f77702be22b17af22bdf799b8c95be8028f20ac406af8b5ec0439.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-2526a31a361274411e6cfc64858b1b084a22ffb491a9490374b717534827b3e1.yml

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

Lines changed: 46 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ import kotlin.jvm.optionals.getOrNull
3333
class JobAutomatedCreateParams
3434
constructor(
3535
private val dataSyncAll: DataSyncAll?,
36-
private val w4DataSync: W4DataSync?,
36+
private val w4FormEmployeeSync: W4FormEmployeeSync?,
3737
private val additionalHeaders: Headers,
3838
private val additionalQueryParams: QueryParams,
3939
) {
4040

4141
fun dataSyncAll(): Optional<DataSyncAll> = Optional.ofNullable(dataSyncAll)
4242

43-
fun w4DataSync(): Optional<W4DataSync> = Optional.ofNullable(w4DataSync)
43+
fun w4FormEmployeeSync(): Optional<W4FormEmployeeSync> = Optional.ofNullable(w4FormEmployeeSync)
4444

4545
fun _additionalHeaders(): Headers = additionalHeaders
4646

4747
fun _additionalQueryParams(): QueryParams = additionalQueryParams
4848

4949
@JvmSynthetic
5050
internal fun getBody(): JobAutomatedCreateBody {
51-
return JobAutomatedCreateBody(dataSyncAll, w4DataSync)
51+
return JobAutomatedCreateBody(dataSyncAll, w4FormEmployeeSync)
5252
}
5353

5454
@JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders
@@ -60,28 +60,30 @@ constructor(
6060
class JobAutomatedCreateBody
6161
internal constructor(
6262
private val dataSyncAll: DataSyncAll? = null,
63-
private val w4DataSync: W4DataSync? = null,
63+
private val w4FormEmployeeSync: W4FormEmployeeSync? = null,
6464
private val _json: JsonValue? = null,
6565
) {
6666

6767
fun dataSyncAll(): Optional<DataSyncAll> = Optional.ofNullable(dataSyncAll)
6868

69-
fun w4DataSync(): Optional<W4DataSync> = Optional.ofNullable(w4DataSync)
69+
fun w4FormEmployeeSync(): Optional<W4FormEmployeeSync> =
70+
Optional.ofNullable(w4FormEmployeeSync)
7071

7172
fun isDataSyncAll(): Boolean = dataSyncAll != null
7273

73-
fun isW4DataSync(): Boolean = w4DataSync != null
74+
fun isW4FormEmployeeSync(): Boolean = w4FormEmployeeSync != null
7475

7576
fun asDataSyncAll(): DataSyncAll = dataSyncAll.getOrThrow("dataSyncAll")
7677

77-
fun asW4DataSync(): W4DataSync = w4DataSync.getOrThrow("w4DataSync")
78+
fun asW4FormEmployeeSync(): W4FormEmployeeSync =
79+
w4FormEmployeeSync.getOrThrow("w4FormEmployeeSync")
7880

7981
fun _json(): Optional<JsonValue> = Optional.ofNullable(_json)
8082

8183
fun <T> accept(visitor: Visitor<T>): T {
8284
return when {
8385
dataSyncAll != null -> visitor.visitDataSyncAll(dataSyncAll)
84-
w4DataSync != null -> visitor.visitW4DataSync(w4DataSync)
86+
w4FormEmployeeSync != null -> visitor.visitW4FormEmployeeSync(w4FormEmployeeSync)
8587
else -> visitor.unknown(_json)
8688
}
8789
}
@@ -91,15 +93,16 @@ constructor(
9193
return true
9294
}
9395

94-
return /* spotless:off */ other is JobAutomatedCreateBody && dataSyncAll == other.dataSyncAll && w4DataSync == other.w4DataSync /* spotless:on */
96+
return /* spotless:off */ other is JobAutomatedCreateBody && dataSyncAll == other.dataSyncAll && w4FormEmployeeSync == other.w4FormEmployeeSync /* spotless:on */
9597
}
9698

97-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(dataSyncAll, w4DataSync) /* spotless:on */
99+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(dataSyncAll, w4FormEmployeeSync) /* spotless:on */
98100

99101
override fun toString(): String =
100102
when {
101103
dataSyncAll != null -> "JobAutomatedCreateBody{dataSyncAll=$dataSyncAll}"
102-
w4DataSync != null -> "JobAutomatedCreateBody{w4DataSync=$w4DataSync}"
104+
w4FormEmployeeSync != null ->
105+
"JobAutomatedCreateBody{w4FormEmployeeSync=$w4FormEmployeeSync}"
103106
_json != null -> "JobAutomatedCreateBody{_unknown=$_json}"
104107
else -> throw IllegalStateException("Invalid JobAutomatedCreateBody")
105108
}
@@ -111,15 +114,15 @@ constructor(
111114
JobAutomatedCreateBody(dataSyncAll = dataSyncAll)
112115

113116
@JvmStatic
114-
fun ofW4DataSync(w4DataSync: W4DataSync) =
115-
JobAutomatedCreateBody(w4DataSync = w4DataSync)
117+
fun ofW4FormEmployeeSync(w4FormEmployeeSync: W4FormEmployeeSync) =
118+
JobAutomatedCreateBody(w4FormEmployeeSync = w4FormEmployeeSync)
116119
}
117120

118121
interface Visitor<out T> {
119122

120123
fun visitDataSyncAll(dataSyncAll: DataSyncAll): T
121124

122-
fun visitW4DataSync(w4DataSync: W4DataSync): T
125+
fun visitW4FormEmployeeSync(w4FormEmployeeSync: W4FormEmployeeSync): T
123126

124127
fun unknown(json: JsonValue?): T {
125128
throw FinchInvalidDataException("Unknown JobAutomatedCreateBody: $json")
@@ -139,9 +142,9 @@ constructor(
139142
return JobAutomatedCreateBody(dataSyncAll = it, _json = json)
140143
}
141144
}
142-
"w4_data_sync" -> {
143-
tryDeserialize(node, jacksonTypeRef<W4DataSync>())?.let {
144-
return JobAutomatedCreateBody(w4DataSync = it, _json = json)
145+
"w4_form_employee_sync" -> {
146+
tryDeserialize(node, jacksonTypeRef<W4FormEmployeeSync>())?.let {
147+
return JobAutomatedCreateBody(w4FormEmployeeSync = it, _json = json)
145148
}
146149
}
147150
}
@@ -159,7 +162,8 @@ constructor(
159162
) {
160163
when {
161164
value.dataSyncAll != null -> generator.writeObject(value.dataSyncAll)
162-
value.w4DataSync != null -> generator.writeObject(value.w4DataSync)
165+
value.w4FormEmployeeSync != null ->
166+
generator.writeObject(value.w4FormEmployeeSync)
163167
value._json != null -> generator.writeObject(value._json)
164168
else -> throw IllegalStateException("Invalid JobAutomatedCreateBody")
165169
}
@@ -178,26 +182,26 @@ constructor(
178182
class Builder {
179183

180184
private var dataSyncAll: DataSyncAll? = null
181-
private var w4DataSync: W4DataSync? = null
185+
private var w4FormEmployeeSync: W4FormEmployeeSync? = null
182186
private var additionalHeaders: Headers.Builder = Headers.builder()
183187
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
184188

185189
@JvmSynthetic
186190
internal fun from(jobAutomatedCreateParams: JobAutomatedCreateParams) = apply {
187191
dataSyncAll = jobAutomatedCreateParams.dataSyncAll
188-
w4DataSync = jobAutomatedCreateParams.w4DataSync
192+
w4FormEmployeeSync = jobAutomatedCreateParams.w4FormEmployeeSync
189193
additionalHeaders = jobAutomatedCreateParams.additionalHeaders.toBuilder()
190194
additionalQueryParams = jobAutomatedCreateParams.additionalQueryParams.toBuilder()
191195
}
192196

193197
fun forDataSyncAll(dataSyncAll: DataSyncAll) = apply {
194198
this.dataSyncAll = dataSyncAll
195-
this.w4DataSync = null
199+
this.w4FormEmployeeSync = null
196200
}
197201

198-
fun forW4DataSync(w4DataSync: W4DataSync) = apply {
202+
fun forW4FormEmployeeSync(w4FormEmployeeSync: W4FormEmployeeSync) = apply {
199203
this.dataSyncAll = null
200-
this.w4DataSync = w4DataSync
204+
this.w4FormEmployeeSync = w4FormEmployeeSync
201205
}
202206

203207
fun additionalHeaders(additionalHeaders: Headers) = apply {
@@ -301,7 +305,7 @@ constructor(
301305
fun build(): JobAutomatedCreateParams =
302306
JobAutomatedCreateParams(
303307
dataSyncAll,
304-
w4DataSync,
308+
w4FormEmployeeSync,
305309
additionalHeaders.build(),
306310
additionalQueryParams.build(),
307311
)
@@ -433,9 +437,9 @@ constructor(
433437
"DataSyncAll{type=$type, additionalProperties=$additionalProperties}"
434438
}
435439

436-
@JsonDeserialize(builder = W4DataSync.Builder::class)
440+
@JsonDeserialize(builder = W4FormEmployeeSync.Builder::class)
437441
@NoAutoDetect
438-
class W4DataSync
442+
class W4FormEmployeeSync
439443
private constructor(
440444
private val type: Type?,
441445
private val individualId: String?,
@@ -466,10 +470,10 @@ constructor(
466470
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
467471

468472
@JvmSynthetic
469-
internal fun from(w4DataSync: W4DataSync) = apply {
470-
this.type = w4DataSync.type
471-
this.individualId = w4DataSync.individualId
472-
additionalProperties(w4DataSync.additionalProperties)
473+
internal fun from(w4FormEmployeeSync: W4FormEmployeeSync) = apply {
474+
this.type = w4FormEmployeeSync.type
475+
this.individualId = w4FormEmployeeSync.individualId
476+
additionalProperties(w4FormEmployeeSync.additionalProperties)
473477
}
474478

475479
/** The type of job to start. */
@@ -493,8 +497,8 @@ constructor(
493497
this.additionalProperties.putAll(additionalProperties)
494498
}
495499

496-
fun build(): W4DataSync =
497-
W4DataSync(
500+
fun build(): W4FormEmployeeSync =
501+
W4FormEmployeeSync(
498502
checkNotNull(type) { "`type` is required but was not set" },
499503
checkNotNull(individualId) { "`individualId` is required but was not set" },
500504
additionalProperties.toImmutable(),
@@ -523,29 +527,29 @@ constructor(
523527

524528
companion object {
525529

526-
@JvmField val W4_DATA_SYNC = Type(JsonField.of("w4_data_sync"))
530+
@JvmField val W4_FORM_EMPLOYEE_SYNC = Type(JsonField.of("w4_form_employee_sync"))
527531

528532
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
529533
}
530534

531535
enum class Known {
532-
W4_DATA_SYNC,
536+
W4_FORM_EMPLOYEE_SYNC,
533537
}
534538

535539
enum class Value {
536-
W4_DATA_SYNC,
540+
W4_FORM_EMPLOYEE_SYNC,
537541
_UNKNOWN,
538542
}
539543

540544
fun value(): Value =
541545
when (this) {
542-
W4_DATA_SYNC -> Value.W4_DATA_SYNC
546+
W4_FORM_EMPLOYEE_SYNC -> Value.W4_FORM_EMPLOYEE_SYNC
543547
else -> Value._UNKNOWN
544548
}
545549

546550
fun known(): Known =
547551
when (this) {
548-
W4_DATA_SYNC -> Known.W4_DATA_SYNC
552+
W4_FORM_EMPLOYEE_SYNC -> Known.W4_FORM_EMPLOYEE_SYNC
549553
else -> throw FinchInvalidDataException("Unknown Type: $value")
550554
}
551555

@@ -557,7 +561,7 @@ constructor(
557561
return true
558562
}
559563

560-
return /* spotless:off */ other is W4DataSync && type == other.type && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */
564+
return /* spotless:off */ other is W4FormEmployeeSync && type == other.type && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */
561565
}
562566

563567
/* spotless:off */
@@ -567,19 +571,19 @@ constructor(
567571
override fun hashCode(): Int = hashCode
568572

569573
override fun toString() =
570-
"W4DataSync{type=$type, individualId=$individualId, additionalProperties=$additionalProperties}"
574+
"W4FormEmployeeSync{type=$type, individualId=$individualId, additionalProperties=$additionalProperties}"
571575
}
572576

573577
override fun equals(other: Any?): Boolean {
574578
if (this === other) {
575579
return true
576580
}
577581

578-
return /* spotless:off */ other is JobAutomatedCreateParams && dataSyncAll == other.dataSyncAll && w4DataSync == other.w4DataSync && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
582+
return /* spotless:off */ other is JobAutomatedCreateParams && dataSyncAll == other.dataSyncAll && w4FormEmployeeSync == other.w4FormEmployeeSync && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
579583
}
580584

581-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(dataSyncAll, w4DataSync, additionalHeaders, additionalQueryParams) /* spotless:on */
585+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(dataSyncAll, w4FormEmployeeSync, additionalHeaders, additionalQueryParams) /* spotless:on */
582586

583587
override fun toString() =
584-
"JobAutomatedCreateParams{dataSyncAll=$dataSyncAll, w4DataSync=$w4DataSync, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
588+
"JobAutomatedCreateParams{dataSyncAll=$dataSyncAll, w4FormEmployeeSync=$w4FormEmployeeSync, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
585589
}

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ interface AutomatedServiceAsync {
2424
* of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced
2525
* refresh per hour per connection.
2626
*
27-
* `w4_data_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by
28-
* `individual_id`. This feature is currently in beta.
27+
* `w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual,
28+
* identified by `individual_id`. This feature is currently in beta.
2929
*
3030
* This endpoint is available for _Scale_ tier customers as an add-on. To request access to this
3131
* endpoint, please contact your Finch account manager.

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ constructor(
4040
* of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced
4141
* refresh per hour per connection.
4242
*
43-
* `w4_data_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by
44-
* `individual_id`. This feature is currently in beta.
43+
* `w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual,
44+
* identified by `individual_id`. This feature is currently in beta.
4545
*
4646
* This endpoint is available for _Scale_ tier customers as an add-on. To request access to this
4747
* endpoint, please contact your Finch account manager.

finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ interface AutomatedService {
2323
* of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced
2424
* refresh per hour per connection.
2525
*
26-
* `w4_data_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by
27-
* `individual_id`. This feature is currently in beta.
26+
* `w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual,
27+
* identified by `individual_id`. This feature is currently in beta.
2828
*
2929
* This endpoint is available for _Scale_ tier customers as an add-on. To request access to this
3030
* endpoint, please contact your Finch account manager.

finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ constructor(
3939
* of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced
4040
* refresh per hour per connection.
4141
*
42-
* `w4_data_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by
43-
* `individual_id`. This feature is currently in beta.
42+
* `w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual,
43+
* identified by `individual_id`. This feature is currently in beta.
4444
*
4545
* This endpoint is available for _Scale_ tier customers as an add-on. To request access to this
4646
* endpoint, please contact your Finch account manager.

0 commit comments

Comments
 (0)