From a15c7b62eedd8278ea6f4cc65dc1211b3d2c92da Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 21:44:43 +0000 Subject: [PATCH 01/19] chore(ci): bump `actions/setup-java` to v4 --- .github/workflows/publish-sonatype.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-sonatype.yml b/.github/workflows/publish-sonatype.yml index 0512f7a2..2499cfae 100644 --- a/.github/workflows/publish-sonatype.yml +++ b/.github/workflows/publish-sonatype.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: | From 21939b3e793ae932cfe333a50e4996388900464f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 17:33:02 +0000 Subject: [PATCH 02/19] feat(api): api update --- .stats.yml | 4 +- .../api/models/AutomatedCreateResponse.kt | 116 +++++++++++------- .../api/models/AutomatedCreateResponseTest.kt | 12 +- 3 files changed, 82 insertions(+), 50 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1889fe28..ee583d34 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 45 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f7e741bc6e0175fd96a9db5348092b90a77b0985154c0814bb681ad5dccdf19a.yml -openapi_spec_hash: b348a9ef407a8e91dd770fcb219d4ac5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-46ed24a601021d59f2e481c290509da2c05ee7be34eba58448b78b035392cbc4.yml +openapi_spec_hash: afe19f94bb37ddaf7344fac1b1e64730 config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedCreateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedCreateResponse.kt index 35b96448..a4273f99 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedCreateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedCreateResponse.kt @@ -14,13 +14,15 @@ import com.tryfinch.api.core.checkRequired import com.tryfinch.api.errors.FinchInvalidDataException import java.util.Collections import java.util.Objects +import java.util.Optional class AutomatedCreateResponse private constructor( private val allowedRefreshes: JsonField, + private val remainingRefreshes: JsonField, private val jobId: JsonField, private val jobUrl: JsonField, - private val remainingRefreshes: JsonField, + private val retryAt: JsonField, private val additionalProperties: MutableMap, ) { @@ -29,12 +31,13 @@ private constructor( @JsonProperty("allowed_refreshes") @ExcludeMissing allowedRefreshes: JsonField = JsonMissing.of(), - @JsonProperty("job_id") @ExcludeMissing jobId: JsonField = JsonMissing.of(), - @JsonProperty("job_url") @ExcludeMissing jobUrl: JsonField = JsonMissing.of(), @JsonProperty("remaining_refreshes") @ExcludeMissing remainingRefreshes: JsonField = JsonMissing.of(), - ) : this(allowedRefreshes, jobId, jobUrl, remainingRefreshes, mutableMapOf()) + @JsonProperty("job_id") @ExcludeMissing jobId: JsonField = JsonMissing.of(), + @JsonProperty("job_url") @ExcludeMissing jobUrl: JsonField = JsonMissing.of(), + @JsonProperty("retry_at") @ExcludeMissing retryAt: JsonField = JsonMissing.of(), + ) : this(allowedRefreshes, remainingRefreshes, jobId, jobUrl, retryAt, mutableMapOf()) /** * The number of allowed refreshes per hour (per hour, fixed window) @@ -45,28 +48,36 @@ private constructor( fun allowedRefreshes(): Long = allowedRefreshes.getRequired("allowed_refreshes") /** - * The id of the job that has been created. + * The number of remaining refreshes available (per hour, fixed window) * * @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly * missing or null (e.g. if the server responded with an unexpected value). */ - fun jobId(): String = jobId.getRequired("job_id") + fun remainingRefreshes(): Long = remainingRefreshes.getRequired("remaining_refreshes") + + /** + * The id of the job that has been created. + * + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun jobId(): Optional = jobId.getOptional("job_id") /** * The url that can be used to retrieve the job status * - * @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly - * missing or null (e.g. if the server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun jobUrl(): String = jobUrl.getRequired("job_url") + fun jobUrl(): Optional = jobUrl.getOptional("job_url") /** - * The number of remaining refreshes available (per hour, fixed window) + * ISO 8601 timestamp indicating when to retry the request * - * @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly - * missing or null (e.g. if the server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun remainingRefreshes(): Long = remainingRefreshes.getRequired("remaining_refreshes") + fun retryAt(): Optional = retryAt.getOptional("retry_at") /** * Returns the raw JSON value of [allowedRefreshes]. @@ -78,6 +89,16 @@ private constructor( @ExcludeMissing fun _allowedRefreshes(): JsonField = allowedRefreshes + /** + * Returns the raw JSON value of [remainingRefreshes]. + * + * Unlike [remainingRefreshes], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("remaining_refreshes") + @ExcludeMissing + fun _remainingRefreshes(): JsonField = remainingRefreshes + /** * Returns the raw JSON value of [jobId]. * @@ -93,14 +114,11 @@ private constructor( @JsonProperty("job_url") @ExcludeMissing fun _jobUrl(): JsonField = jobUrl /** - * Returns the raw JSON value of [remainingRefreshes]. + * Returns the raw JSON value of [retryAt]. * - * Unlike [remainingRefreshes], this method doesn't throw if the JSON field has an unexpected - * type. + * Unlike [retryAt], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("remaining_refreshes") - @ExcludeMissing - fun _remainingRefreshes(): JsonField = remainingRefreshes + @JsonProperty("retry_at") @ExcludeMissing fun _retryAt(): JsonField = retryAt @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { @@ -122,8 +140,6 @@ private constructor( * The following fields are required: * ```java * .allowedRefreshes() - * .jobId() - * .jobUrl() * .remainingRefreshes() * ``` */ @@ -134,17 +150,19 @@ private constructor( class Builder internal constructor() { private var allowedRefreshes: JsonField? = null - private var jobId: JsonField? = null - private var jobUrl: JsonField? = null private var remainingRefreshes: JsonField? = null + private var jobId: JsonField = JsonMissing.of() + private var jobUrl: JsonField = JsonMissing.of() + private var retryAt: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(automatedCreateResponse: AutomatedCreateResponse) = apply { allowedRefreshes = automatedCreateResponse.allowedRefreshes + remainingRefreshes = automatedCreateResponse.remainingRefreshes jobId = automatedCreateResponse.jobId jobUrl = automatedCreateResponse.jobUrl - remainingRefreshes = automatedCreateResponse.remainingRefreshes + retryAt = automatedCreateResponse.retryAt additionalProperties = automatedCreateResponse.additionalProperties.toMutableMap() } @@ -163,6 +181,21 @@ private constructor( this.allowedRefreshes = allowedRefreshes } + /** The number of remaining refreshes available (per hour, fixed window) */ + fun remainingRefreshes(remainingRefreshes: Long) = + remainingRefreshes(JsonField.of(remainingRefreshes)) + + /** + * Sets [Builder.remainingRefreshes] to an arbitrary JSON value. + * + * You should usually call [Builder.remainingRefreshes] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun remainingRefreshes(remainingRefreshes: JsonField) = apply { + this.remainingRefreshes = remainingRefreshes + } + /** The id of the job that has been created. */ fun jobId(jobId: String) = jobId(JsonField.of(jobId)) @@ -185,20 +218,16 @@ private constructor( */ fun jobUrl(jobUrl: JsonField) = apply { this.jobUrl = jobUrl } - /** The number of remaining refreshes available (per hour, fixed window) */ - fun remainingRefreshes(remainingRefreshes: Long) = - remainingRefreshes(JsonField.of(remainingRefreshes)) + /** ISO 8601 timestamp indicating when to retry the request */ + fun retryAt(retryAt: String) = retryAt(JsonField.of(retryAt)) /** - * Sets [Builder.remainingRefreshes] to an arbitrary JSON value. + * Sets [Builder.retryAt] to an arbitrary JSON value. * - * You should usually call [Builder.remainingRefreshes] with a well-typed [Long] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * You should usually call [Builder.retryAt] with a well-typed [String] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. */ - fun remainingRefreshes(remainingRefreshes: JsonField) = apply { - this.remainingRefreshes = remainingRefreshes - } + fun retryAt(retryAt: JsonField) = apply { this.retryAt = retryAt } fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -227,8 +256,6 @@ private constructor( * The following fields are required: * ```java * .allowedRefreshes() - * .jobId() - * .jobUrl() * .remainingRefreshes() * ``` * @@ -237,9 +264,10 @@ private constructor( fun build(): AutomatedCreateResponse = AutomatedCreateResponse( checkRequired("allowedRefreshes", allowedRefreshes), - checkRequired("jobId", jobId), - checkRequired("jobUrl", jobUrl), checkRequired("remainingRefreshes", remainingRefreshes), + jobId, + jobUrl, + retryAt, additionalProperties.toMutableMap(), ) } @@ -252,9 +280,10 @@ private constructor( } allowedRefreshes() + remainingRefreshes() jobId() jobUrl() - remainingRefreshes() + retryAt() validated = true } @@ -274,24 +303,25 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (if (allowedRefreshes.asKnown().isPresent) 1 else 0) + + (if (remainingRefreshes.asKnown().isPresent) 1 else 0) + (if (jobId.asKnown().isPresent) 1 else 0) + (if (jobUrl.asKnown().isPresent) 1 else 0) + - (if (remainingRefreshes.asKnown().isPresent) 1 else 0) + (if (retryAt.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { if (this === other) { return true } - return /* spotless:off */ other is AutomatedCreateResponse && allowedRefreshes == other.allowedRefreshes && jobId == other.jobId && jobUrl == other.jobUrl && remainingRefreshes == other.remainingRefreshes && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AutomatedCreateResponse && allowedRefreshes == other.allowedRefreshes && remainingRefreshes == other.remainingRefreshes && jobId == other.jobId && jobUrl == other.jobUrl && retryAt == other.retryAt && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(allowedRefreshes, jobId, jobUrl, remainingRefreshes, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(allowedRefreshes, remainingRefreshes, jobId, jobUrl, retryAt, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "AutomatedCreateResponse{allowedRefreshes=$allowedRefreshes, jobId=$jobId, jobUrl=$jobUrl, remainingRefreshes=$remainingRefreshes, additionalProperties=$additionalProperties}" + "AutomatedCreateResponse{allowedRefreshes=$allowedRefreshes, remainingRefreshes=$remainingRefreshes, jobId=$jobId, jobUrl=$jobUrl, retryAt=$retryAt, additionalProperties=$additionalProperties}" } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AutomatedCreateResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AutomatedCreateResponseTest.kt index 28a4fc41..443fd12d 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AutomatedCreateResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AutomatedCreateResponseTest.kt @@ -14,16 +14,17 @@ internal class AutomatedCreateResponseTest { val automatedCreateResponse = AutomatedCreateResponse.builder() .allowedRefreshes(0L) + .remainingRefreshes(0L) .jobId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .jobUrl("job_url") - .remainingRefreshes(0L) + .retryAt("retry_at") .build() assertThat(automatedCreateResponse.allowedRefreshes()).isEqualTo(0L) - assertThat(automatedCreateResponse.jobId()) - .isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - assertThat(automatedCreateResponse.jobUrl()).isEqualTo("job_url") assertThat(automatedCreateResponse.remainingRefreshes()).isEqualTo(0L) + assertThat(automatedCreateResponse.jobId()).contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + assertThat(automatedCreateResponse.jobUrl()).contains("job_url") + assertThat(automatedCreateResponse.retryAt()).contains("retry_at") } @Test @@ -32,9 +33,10 @@ internal class AutomatedCreateResponseTest { val automatedCreateResponse = AutomatedCreateResponse.builder() .allowedRefreshes(0L) + .remainingRefreshes(0L) .jobId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .jobUrl("job_url") - .remainingRefreshes(0L) + .retryAt("retry_at") .build() val roundtrippedAutomatedCreateResponse = From c1eebc5989312477b4c60d26e21e7b59e43a6c1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 21:53:53 +0000 Subject: [PATCH 03/19] chore(internal): allow running specific example from cli --- finch-java-example/build.gradle.kts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/finch-java-example/build.gradle.kts b/finch-java-example/build.gradle.kts index bfcda061..286061d0 100644 --- a/finch-java-example/build.gradle.kts +++ b/finch-java-example/build.gradle.kts @@ -17,5 +17,12 @@ tasks.withType().configureEach { } application { - mainClass = "com.tryfinch.api.example.Main" + // Use `./gradlew :finch-java-example:run` to run `Main` + // Use `./gradlew :finch-java-example:run -Dexample=Something` to run `SomethingExample` + mainClass = "com.tryfinch.api.example.${ + if (project.hasProperty("example")) + "${project.property("example")}Example" + else + "Main" + }" } From be5c316943feed5aa6f9ace6290cbd5431de1b78 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 15:59:15 +0000 Subject: [PATCH 04/19] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ee583d34..f498c780 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 45 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-46ed24a601021d59f2e481c290509da2c05ee7be34eba58448b78b035392cbc4.yml -openapi_spec_hash: afe19f94bb37ddaf7344fac1b1e64730 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-4351c085cdf9776691774a90a958c0a7650fe29dc0e59017616ce087791ef923.yml +openapi_spec_hash: 990116204f6b522ab92b8de23edb7ede config_hash: 5146b12344dae76238940989dac1e8a0 From 98e72bc3ee2085f94175a8326f2bc75c11dca281 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 17:48:30 +0000 Subject: [PATCH 05/19] fix(client): ensure error handling always occurs --- .../api/core/handlers/ErrorHandler.kt | 26 ++-- .../async/AccessTokenServiceAsyncImpl.kt | 10 +- .../services/async/AccountServiceAsyncImpl.kt | 15 +- .../async/ProviderServiceAsyncImpl.kt | 11 +- .../RequestForwardingServiceAsyncImpl.kt | 10 +- .../async/connect/SessionServiceAsyncImpl.kt | 14 +- .../async/hris/BenefitServiceAsyncImpl.kt | 23 ++- .../async/hris/CompanyServiceAsyncImpl.kt | 11 +- .../async/hris/DirectoryServiceAsyncImpl.kt | 13 +- .../async/hris/DocumentServiceAsyncImpl.kt | 13 +- .../async/hris/EmploymentServiceAsyncImpl.kt | 10 +- .../async/hris/IndividualServiceAsyncImpl.kt | 10 +- .../hris/PayStatementServiceAsyncImpl.kt | 10 +- .../async/hris/PaymentServiceAsyncImpl.kt | 11 +- .../benefits/IndividualServiceAsyncImpl.kt | 16 +-- .../PayStatementItemServiceAsyncImpl.kt | 10 +- .../payStatementItem/RuleServiceAsyncImpl.kt | 22 +-- .../async/jobs/AutomatedServiceAsyncImpl.kt | 17 ++- .../async/jobs/ManualServiceAsyncImpl.kt | 11 +- .../async/payroll/PayGroupServiceAsyncImpl.kt | 13 +- .../async/sandbox/CompanyServiceAsyncImpl.kt | 10 +- .../sandbox/ConnectionServiceAsyncImpl.kt | 10 +- .../sandbox/DirectoryServiceAsyncImpl.kt | 10 +- .../sandbox/EmploymentServiceAsyncImpl.kt | 10 +- .../sandbox/IndividualServiceAsyncImpl.kt | 10 +- .../async/sandbox/JobServiceAsyncImpl.kt | 11 +- .../async/sandbox/PaymentServiceAsyncImpl.kt | 10 +- .../connections/AccountServiceAsyncImpl.kt | 13 +- .../jobs/ConfigurationServiceAsyncImpl.kt | 13 +- .../blocking/AccessTokenServiceImpl.kt | 10 +- .../services/blocking/AccountServiceImpl.kt | 15 +- .../services/blocking/ProviderServiceImpl.kt | 11 +- .../blocking/RequestForwardingServiceImpl.kt | 10 +- .../blocking/connect/SessionServiceImpl.kt | 14 +- .../blocking/hris/BenefitServiceImpl.kt | 23 ++- .../blocking/hris/CompanyServiceImpl.kt | 11 +- .../blocking/hris/DirectoryServiceImpl.kt | 13 +- .../blocking/hris/DocumentServiceImpl.kt | 13 +- .../blocking/hris/EmploymentServiceImpl.kt | 10 +- .../blocking/hris/IndividualServiceImpl.kt | 10 +- .../blocking/hris/PayStatementServiceImpl.kt | 10 +- .../blocking/hris/PaymentServiceImpl.kt | 11 +- .../hris/benefits/IndividualServiceImpl.kt | 16 +-- .../company/PayStatementItemServiceImpl.kt | 10 +- .../payStatementItem/RuleServiceImpl.kt | 22 +-- .../blocking/jobs/AutomatedServiceImpl.kt | 17 ++- .../blocking/jobs/ManualServiceImpl.kt | 11 +- .../blocking/payroll/PayGroupServiceImpl.kt | 13 +- .../blocking/sandbox/CompanyServiceImpl.kt | 10 +- .../blocking/sandbox/ConnectionServiceImpl.kt | 10 +- .../blocking/sandbox/DirectoryServiceImpl.kt | 10 +- .../blocking/sandbox/EmploymentServiceImpl.kt | 10 +- .../blocking/sandbox/IndividualServiceImpl.kt | 10 +- .../blocking/sandbox/JobServiceImpl.kt | 11 +- .../blocking/sandbox/PaymentServiceImpl.kt | 10 +- .../sandbox/connections/AccountServiceImpl.kt | 13 +- .../sandbox/jobs/ConfigurationServiceImpl.kt | 13 +- .../api/services/ErrorHandlingTest.kt | 136 ++++++++++++++++++ 58 files changed, 491 insertions(+), 365 deletions(-) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/handlers/ErrorHandler.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/handlers/ErrorHandler.kt index 578e8a45..884fa16c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/handlers/ErrorHandler.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/handlers/ErrorHandler.kt @@ -19,7 +19,7 @@ import com.tryfinch.api.errors.UnexpectedStatusCodeException import com.tryfinch.api.errors.UnprocessableEntityException @JvmSynthetic -internal fun errorHandler(jsonMapper: JsonMapper): Handler { +internal fun errorBodyHandler(jsonMapper: JsonMapper): Handler { val handler = jsonHandler(jsonMapper) return object : Handler { @@ -33,52 +33,52 @@ internal fun errorHandler(jsonMapper: JsonMapper): Handler { } @JvmSynthetic -internal fun Handler.withErrorHandler(errorHandler: Handler): Handler = - object : Handler { - override fun handle(response: HttpResponse): T = +internal fun errorHandler(errorBodyHandler: Handler): Handler = + object : Handler { + override fun handle(response: HttpResponse): HttpResponse = when (val statusCode = response.statusCode()) { - in 200..299 -> this@withErrorHandler.handle(response) + in 200..299 -> response 400 -> throw BadRequestException.builder() .headers(response.headers()) - .body(errorHandler.handle(response)) + .body(errorBodyHandler.handle(response)) .build() 401 -> throw UnauthorizedException.builder() .headers(response.headers()) - .body(errorHandler.handle(response)) + .body(errorBodyHandler.handle(response)) .build() 403 -> throw PermissionDeniedException.builder() .headers(response.headers()) - .body(errorHandler.handle(response)) + .body(errorBodyHandler.handle(response)) .build() 404 -> throw NotFoundException.builder() .headers(response.headers()) - .body(errorHandler.handle(response)) + .body(errorBodyHandler.handle(response)) .build() 422 -> throw UnprocessableEntityException.builder() .headers(response.headers()) - .body(errorHandler.handle(response)) + .body(errorBodyHandler.handle(response)) .build() 429 -> throw RateLimitException.builder() .headers(response.headers()) - .body(errorHandler.handle(response)) + .body(errorBodyHandler.handle(response)) .build() in 500..599 -> throw InternalServerException.builder() .statusCode(statusCode) .headers(response.headers()) - .body(errorHandler.handle(response)) + .body(errorBodyHandler.handle(response)) .build() else -> throw UnexpectedStatusCodeException.builder() .statusCode(statusCode) .headers(response.headers()) - .body(errorHandler.handle(response)) + .body(errorBodyHandler.handle(response)) .build() } } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccessTokenServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccessTokenServiceAsyncImpl.kt index ef156b00..5558652d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccessTokenServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccessTokenServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -44,7 +44,8 @@ class AccessTokenServiceAsyncImpl internal constructor(private val clientOptions class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : AccessTokenServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -55,7 +56,6 @@ class AccessTokenServiceAsyncImpl internal constructor(private val clientOptions private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: AccessTokenCreateParams, @@ -101,7 +101,7 @@ class AccessTokenServiceAsyncImpl internal constructor(private val clientOptions return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccountServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccountServiceAsyncImpl.kt index 3ba53cae..0af47a62 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccountServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccountServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -51,7 +51,8 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : AccountServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -61,7 +62,7 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl ) private val disconnectHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun disconnect( params: AccountDisconnectParams, @@ -79,7 +80,7 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { disconnectHandler.handle(it) } .also { @@ -92,7 +93,7 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl } private val introspectHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun introspect( params: AccountIntrospectParams, @@ -109,7 +110,7 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { introspectHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ProviderServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ProviderServiceAsyncImpl.kt index 4a98315b..ceae5f3b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ProviderServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ProviderServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -42,7 +42,8 @@ class ProviderServiceAsyncImpl internal constructor(private val clientOptions: C class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : ProviderServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -52,7 +53,7 @@ class ProviderServiceAsyncImpl internal constructor(private val clientOptions: C ) private val listHandler: Handler> = - jsonHandler>(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler>(clientOptions.jsonMapper) override fun list( params: ProviderListParams, @@ -69,7 +70,7 @@ class ProviderServiceAsyncImpl internal constructor(private val clientOptions: C return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/RequestForwardingServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/RequestForwardingServiceAsyncImpl.kt index 3f406b22..b004d8e6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/RequestForwardingServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/RequestForwardingServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -44,7 +44,8 @@ internal constructor(private val clientOptions: ClientOptions) : RequestForwardi class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : RequestForwardingServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -55,7 +56,6 @@ internal constructor(private val clientOptions: ClientOptions) : RequestForwardi private val forwardHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun forward( params: RequestForwardingForwardParams, @@ -73,7 +73,7 @@ internal constructor(private val clientOptions: ClientOptions) : RequestForwardi return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { forwardHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/connect/SessionServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/connect/SessionServiceAsyncImpl.kt index 384db65f..90219852 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/connect/SessionServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/connect/SessionServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.connect import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -51,7 +51,8 @@ class SessionServiceAsyncImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : SessionServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -61,7 +62,7 @@ class SessionServiceAsyncImpl internal constructor(private val clientOptions: Cl ) private val newHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun new_( params: ConnectSessionNewParams, @@ -79,7 +80,7 @@ class SessionServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { newHandler.handle(it) } .also { @@ -93,7 +94,6 @@ class SessionServiceAsyncImpl internal constructor(private val clientOptions: Cl private val reauthenticateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun reauthenticate( params: ConnectSessionReauthenticateParams, @@ -111,7 +111,7 @@ class SessionServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { reauthenticateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncImpl.kt index 05273d48..a19b4094 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -90,7 +90,8 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : BenefitServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val individuals: IndividualServiceAsync.WithRawResponse by lazy { IndividualServiceAsyncImpl.WithRawResponseImpl(clientOptions) @@ -107,7 +108,6 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: HrisBenefitCreateParams, @@ -125,7 +125,7 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { @@ -138,7 +138,7 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl } private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: HrisBenefitRetrieveParams, @@ -158,7 +158,7 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { @@ -172,7 +172,6 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: HrisBenefitUpdateParams, @@ -193,7 +192,7 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { @@ -207,7 +206,6 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl private val listHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisBenefitListParams, @@ -224,7 +222,7 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { @@ -246,7 +244,6 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl private val listSupportedBenefitsHandler: Handler>> = jsonHandler>>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams, @@ -263,7 +260,7 @@ class BenefitServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listSupportedBenefitsHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsyncImpl.kt index 61e667e3..37508300 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -49,7 +49,8 @@ class CompanyServiceAsyncImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : CompanyServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val payStatementItem: PayStatementItemServiceAsync.WithRawResponse by lazy { PayStatementItemServiceAsyncImpl.WithRawResponseImpl(clientOptions) @@ -66,7 +67,7 @@ class CompanyServiceAsyncImpl internal constructor(private val clientOptions: Cl payStatementItem private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: HrisCompanyRetrieveParams, @@ -83,7 +84,7 @@ class CompanyServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsyncImpl.kt index dccddb59..a489b205 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -53,7 +53,8 @@ class DirectoryServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : DirectoryServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -64,7 +65,6 @@ class DirectoryServiceAsyncImpl internal constructor(private val clientOptions: private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisDirectoryListParams, @@ -81,7 +81,7 @@ class DirectoryServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { @@ -103,7 +103,6 @@ class DirectoryServiceAsyncImpl internal constructor(private val clientOptions: private val listIndividualsHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) @Deprecated("use `list` instead") override fun listIndividuals( @@ -121,7 +120,7 @@ class DirectoryServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listIndividualsHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DocumentServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DocumentServiceAsyncImpl.kt index 24c48edb..f23f13a8 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DocumentServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DocumentServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -52,7 +52,8 @@ class DocumentServiceAsyncImpl internal constructor(private val clientOptions: C class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : DocumentServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -63,7 +64,6 @@ class DocumentServiceAsyncImpl internal constructor(private val clientOptions: C private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisDocumentListParams, @@ -80,7 +80,7 @@ class DocumentServiceAsyncImpl internal constructor(private val clientOptions: C return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { @@ -94,7 +94,6 @@ class DocumentServiceAsyncImpl internal constructor(private val clientOptions: C private val retreiveHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retreive( params: HrisDocumentRetreiveParams, @@ -114,7 +113,7 @@ class DocumentServiceAsyncImpl internal constructor(private val clientOptions: C return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retreiveHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/EmploymentServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/EmploymentServiceAsyncImpl.kt index 22d9baa8..969a5223 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/EmploymentServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/EmploymentServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -43,7 +43,8 @@ class EmploymentServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : EmploymentServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -54,7 +55,6 @@ class EmploymentServiceAsyncImpl internal constructor(private val clientOptions: private val retrieveManyHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieveMany( params: HrisEmploymentRetrieveManyParams, @@ -72,7 +72,7 @@ class EmploymentServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveManyHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/IndividualServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/IndividualServiceAsyncImpl.kt index 1d4cc4fd..a81e28e5 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/IndividualServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/IndividualServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -43,7 +43,8 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : IndividualServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -54,7 +55,6 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: private val retrieveManyHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieveMany( params: HrisIndividualRetrieveManyParams, @@ -72,7 +72,7 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveManyHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PayStatementServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PayStatementServiceAsyncImpl.kt index bee508d7..48b59148 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PayStatementServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PayStatementServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -43,7 +43,8 @@ class PayStatementServiceAsyncImpl internal constructor(private val clientOption class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PayStatementServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -54,7 +55,6 @@ class PayStatementServiceAsyncImpl internal constructor(private val clientOption private val retrieveManyHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieveMany( params: HrisPayStatementRetrieveManyParams, @@ -72,7 +72,7 @@ class PayStatementServiceAsyncImpl internal constructor(private val clientOption return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveManyHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PaymentServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PaymentServiceAsyncImpl.kt index afd34eef..555b86d3 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PaymentServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PaymentServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -42,7 +42,8 @@ class PaymentServiceAsyncImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PaymentServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -52,7 +53,7 @@ class PaymentServiceAsyncImpl internal constructor(private val clientOptions: Cl ) private val listHandler: Handler> = - jsonHandler>(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler>(clientOptions.jsonMapper) override fun list( params: HrisPaymentListParams, @@ -69,7 +70,7 @@ class PaymentServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/benefits/IndividualServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/benefits/IndividualServiceAsyncImpl.kt index e78ec6a1..f2a30337 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/benefits/IndividualServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/benefits/IndividualServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.hris.benefits import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -63,7 +63,8 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : IndividualServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -74,7 +75,6 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: private val enrolledIdsHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams, @@ -94,7 +94,7 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { enrolledIdsHandler.handle(it) } .also { @@ -108,7 +108,6 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: private val retrieveManyBenefitsHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams, @@ -128,7 +127,7 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveManyBenefitsHandler.handle(it) } .also { @@ -150,7 +149,6 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: private val unenrollManyHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams, @@ -171,7 +169,7 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { unenrollManyHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/PayStatementItemServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/PayStatementItemServiceAsyncImpl.kt index 6839e175..59a4ca7b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/PayStatementItemServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/PayStatementItemServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.hris.company import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -50,7 +50,8 @@ internal constructor(private val clientOptions: ClientOptions) : PayStatementIte class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PayStatementItemServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val rules: RuleServiceAsync.WithRawResponse by lazy { RuleServiceAsyncImpl.WithRawResponseImpl(clientOptions) @@ -67,7 +68,6 @@ internal constructor(private val clientOptions: ClientOptions) : PayStatementIte private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisCompanyPayStatementItemListParams, @@ -84,7 +84,7 @@ internal constructor(private val clientOptions: ClientOptions) : PayStatementIte return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/payStatementItem/RuleServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/payStatementItem/RuleServiceAsyncImpl.kt index 376f8892..8dd4d38f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/payStatementItem/RuleServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/payStatementItem/RuleServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.hris.company.payStatementItem import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -72,7 +72,8 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : RuleServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -82,7 +83,7 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) private val createHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun create( params: HrisCompanyPayStatementItemRuleCreateParams, @@ -100,7 +101,7 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { @@ -113,7 +114,7 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien } private val updateHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun update( params: HrisCompanyPayStatementItemRuleUpdateParams, @@ -134,7 +135,7 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { @@ -148,7 +149,6 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisCompanyPayStatementItemRuleListParams, @@ -165,7 +165,7 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { @@ -186,7 +186,7 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien } private val deleteHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams, @@ -207,7 +207,7 @@ class RuleServiceAsyncImpl internal constructor(private val clientOptions: Clien return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { deleteHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt index da95121d..7759f18a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.jobs import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -62,7 +62,8 @@ class AutomatedServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : AutomatedServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -73,7 +74,6 @@ class AutomatedServiceAsyncImpl internal constructor(private val clientOptions: private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: JobAutomatedCreateParams, @@ -91,7 +91,7 @@ class AutomatedServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { @@ -104,7 +104,7 @@ class AutomatedServiceAsyncImpl internal constructor(private val clientOptions: } private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: JobAutomatedRetrieveParams, @@ -124,7 +124,7 @@ class AutomatedServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { @@ -138,7 +138,6 @@ class AutomatedServiceAsyncImpl internal constructor(private val clientOptions: private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: JobAutomatedListParams, @@ -155,7 +154,7 @@ class AutomatedServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/ManualServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/ManualServiceAsyncImpl.kt index a7f58b32..c570f420 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/ManualServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/ManualServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.jobs import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -43,7 +43,8 @@ class ManualServiceAsyncImpl internal constructor(private val clientOptions: Cli class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : ManualServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -53,7 +54,7 @@ class ManualServiceAsyncImpl internal constructor(private val clientOptions: Cli ) private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: JobManualRetrieveParams, @@ -73,7 +74,7 @@ class ManualServiceAsyncImpl internal constructor(private val clientOptions: Cli return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/payroll/PayGroupServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/payroll/PayGroupServiceAsyncImpl.kt index fcbee564..88880d4e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/payroll/PayGroupServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/payroll/PayGroupServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.payroll import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -53,7 +53,8 @@ class PayGroupServiceAsyncImpl internal constructor(private val clientOptions: C class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PayGroupServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -64,7 +65,6 @@ class PayGroupServiceAsyncImpl internal constructor(private val clientOptions: C private val retrieveHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieve( params: PayrollPayGroupRetrieveParams, @@ -84,7 +84,7 @@ class PayGroupServiceAsyncImpl internal constructor(private val clientOptions: C return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { @@ -98,7 +98,6 @@ class PayGroupServiceAsyncImpl internal constructor(private val clientOptions: C private val listHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: PayrollPayGroupListParams, @@ -115,7 +114,7 @@ class PayGroupServiceAsyncImpl internal constructor(private val clientOptions: C return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/CompanyServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/CompanyServiceAsyncImpl.kt index df0d2518..847d2ecf 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/CompanyServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/CompanyServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -42,7 +42,8 @@ class CompanyServiceAsyncImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : CompanyServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -53,7 +54,6 @@ class CompanyServiceAsyncImpl internal constructor(private val clientOptions: Cl private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxCompanyUpdateParams, @@ -71,7 +71,7 @@ class CompanyServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/ConnectionServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/ConnectionServiceAsyncImpl.kt index 3faa4d60..95e642fe 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/ConnectionServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/ConnectionServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -48,7 +48,8 @@ class ConnectionServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : ConnectionServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val accounts: AccountServiceAsync.WithRawResponse by lazy { AccountServiceAsyncImpl.WithRawResponseImpl(clientOptions) @@ -65,7 +66,6 @@ class ConnectionServiceAsyncImpl internal constructor(private val clientOptions: private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: SandboxConnectionCreateParams, @@ -83,7 +83,7 @@ class ConnectionServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/DirectoryServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/DirectoryServiceAsyncImpl.kt index 678bcd63..ca2360a0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/DirectoryServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/DirectoryServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -42,7 +42,8 @@ class DirectoryServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : DirectoryServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -53,7 +54,6 @@ class DirectoryServiceAsyncImpl internal constructor(private val clientOptions: private val createHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: SandboxDirectoryCreateParams, @@ -71,7 +71,7 @@ class DirectoryServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/EmploymentServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/EmploymentServiceAsyncImpl.kt index f2094734..fd15ae5a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/EmploymentServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/EmploymentServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -44,7 +44,8 @@ class EmploymentServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : EmploymentServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -55,7 +56,6 @@ class EmploymentServiceAsyncImpl internal constructor(private val clientOptions: private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxEmploymentUpdateParams, @@ -76,7 +76,7 @@ class EmploymentServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/IndividualServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/IndividualServiceAsyncImpl.kt index 8b3777eb..923d4583 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/IndividualServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/IndividualServiceAsyncImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.async.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -44,7 +44,8 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : IndividualServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -55,7 +56,6 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxIndividualUpdateParams, @@ -76,7 +76,7 @@ class IndividualServiceAsyncImpl internal constructor(private val clientOptions: return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/JobServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/JobServiceAsyncImpl.kt index 701f75e3..58779d34 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/JobServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/JobServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -50,7 +50,8 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : JobServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val configuration: ConfigurationServiceAsync.WithRawResponse by lazy { ConfigurationServiceAsyncImpl.WithRawResponseImpl(clientOptions) @@ -66,7 +67,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client override fun configuration(): ConfigurationServiceAsync.WithRawResponse = configuration private val createHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun create( params: SandboxJobCreateParams, @@ -84,7 +85,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/PaymentServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/PaymentServiceAsyncImpl.kt index f18555ce..50f618dc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/PaymentServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/PaymentServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -42,7 +42,8 @@ class PaymentServiceAsyncImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PaymentServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -53,7 +54,6 @@ class PaymentServiceAsyncImpl internal constructor(private val clientOptions: Cl private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: SandboxPaymentCreateParams, @@ -71,7 +71,7 @@ class PaymentServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/connections/AccountServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/connections/AccountServiceAsyncImpl.kt index a81cdad1..a8228caa 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/connections/AccountServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/connections/AccountServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.sandbox.connections import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -51,7 +51,8 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : AccountServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -62,7 +63,6 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: SandboxConnectionAccountCreateParams, @@ -80,7 +80,7 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { @@ -94,7 +94,6 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxConnectionAccountUpdateParams, @@ -112,7 +111,7 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/jobs/ConfigurationServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/jobs/ConfigurationServiceAsyncImpl.kt index 510717f3..66aa1b5d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/jobs/ConfigurationServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/jobs/ConfigurationServiceAsyncImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.async.sandbox.jobs import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -50,7 +50,8 @@ class ConfigurationServiceAsyncImpl internal constructor(private val clientOptio class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : ConfigurationServiceAsync.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -61,7 +62,6 @@ class ConfigurationServiceAsyncImpl internal constructor(private val clientOptio private val retrieveHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieve( params: SandboxJobConfigurationRetrieveParams, @@ -78,7 +78,7 @@ class ConfigurationServiceAsyncImpl internal constructor(private val clientOptio return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { @@ -92,7 +92,6 @@ class ConfigurationServiceAsyncImpl internal constructor(private val clientOptio private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxJobConfigurationUpdateParams, @@ -110,7 +109,7 @@ class ConfigurationServiceAsyncImpl internal constructor(private val clientOptio return request .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> - response.parseable { + errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccessTokenServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccessTokenServiceImpl.kt index 437cc9c3..00b0eb95 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccessTokenServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccessTokenServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -43,7 +43,8 @@ class AccessTokenServiceImpl internal constructor(private val clientOptions: Cli class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : AccessTokenService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -54,7 +55,6 @@ class AccessTokenServiceImpl internal constructor(private val clientOptions: Cli private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: AccessTokenCreateParams, @@ -98,7 +98,7 @@ class AccessTokenServiceImpl internal constructor(private val clientOptions: Cli .prepare(clientOptions, modifiedParams) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccountServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccountServiceImpl.kt index 0423e3e8..a210238b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccountServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccountServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -50,7 +50,8 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : AccountService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -60,7 +61,7 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO ) private val disconnectHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun disconnect( params: AccountDisconnectParams, @@ -76,7 +77,7 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { disconnectHandler.handle(it) } .also { @@ -88,7 +89,7 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO } private val introspectHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun introspect( params: AccountIntrospectParams, @@ -103,7 +104,7 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { introspectHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/ProviderServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/ProviderServiceImpl.kt index dfb4ba66..0d14316b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/ProviderServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/ProviderServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -41,7 +41,8 @@ class ProviderServiceImpl internal constructor(private val clientOptions: Client class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : ProviderService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -51,7 +52,7 @@ class ProviderServiceImpl internal constructor(private val clientOptions: Client ) private val listHandler: Handler> = - jsonHandler>(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler>(clientOptions.jsonMapper) override fun list( params: ProviderListParams, @@ -66,7 +67,7 @@ class ProviderServiceImpl internal constructor(private val clientOptions: Client .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/RequestForwardingServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/RequestForwardingServiceImpl.kt index 51c3a9c7..c1be768b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/RequestForwardingServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/RequestForwardingServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -41,7 +41,8 @@ class RequestForwardingServiceImpl internal constructor(private val clientOption class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : RequestForwardingService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -52,7 +53,6 @@ class RequestForwardingServiceImpl internal constructor(private val clientOption private val forwardHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun forward( params: RequestForwardingForwardParams, @@ -68,7 +68,7 @@ class RequestForwardingServiceImpl internal constructor(private val clientOption .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { forwardHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/connect/SessionServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/connect/SessionServiceImpl.kt index 3a470a8c..13642f42 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/connect/SessionServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/connect/SessionServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.connect import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -50,7 +50,8 @@ class SessionServiceImpl internal constructor(private val clientOptions: ClientO class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : SessionService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -60,7 +61,7 @@ class SessionServiceImpl internal constructor(private val clientOptions: ClientO ) private val newHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun new_( params: ConnectSessionNewParams, @@ -76,7 +77,7 @@ class SessionServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { newHandler.handle(it) } .also { @@ -89,7 +90,6 @@ class SessionServiceImpl internal constructor(private val clientOptions: ClientO private val reauthenticateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun reauthenticate( params: ConnectSessionReauthenticateParams, @@ -105,7 +105,7 @@ class SessionServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { reauthenticateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/BenefitServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/BenefitServiceImpl.kt index 407c88c5..dda2c59c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/BenefitServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/BenefitServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -87,7 +87,8 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : BenefitService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val individuals: IndividualService.WithRawResponse by lazy { IndividualServiceImpl.WithRawResponseImpl(clientOptions) @@ -104,7 +105,6 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: HrisBenefitCreateParams, @@ -120,7 +120,7 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { @@ -132,7 +132,7 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO } private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: HrisBenefitRetrieveParams, @@ -150,7 +150,7 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { @@ -163,7 +163,6 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: HrisBenefitUpdateParams, @@ -182,7 +181,7 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { @@ -195,7 +194,6 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO private val listHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisBenefitListParams, @@ -210,7 +208,7 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { @@ -230,7 +228,6 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO private val listSupportedBenefitsHandler: Handler>> = jsonHandler>>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams, @@ -245,7 +242,7 @@ class BenefitServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listSupportedBenefitsHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/CompanyServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/CompanyServiceImpl.kt index 0e99459f..3ae6dd45 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/CompanyServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/CompanyServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -48,7 +48,8 @@ class CompanyServiceImpl internal constructor(private val clientOptions: ClientO class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : CompanyService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val payStatementItem: PayStatementItemService.WithRawResponse by lazy { PayStatementItemServiceImpl.WithRawResponseImpl(clientOptions) @@ -64,7 +65,7 @@ class CompanyServiceImpl internal constructor(private val clientOptions: ClientO override fun payStatementItem(): PayStatementItemService.WithRawResponse = payStatementItem private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: HrisCompanyRetrieveParams, @@ -79,7 +80,7 @@ class CompanyServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DirectoryServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DirectoryServiceImpl.kt index 7a66cfad..cc692c4c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DirectoryServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DirectoryServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -52,7 +52,8 @@ class DirectoryServiceImpl internal constructor(private val clientOptions: Clien class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : DirectoryService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -63,7 +64,6 @@ class DirectoryServiceImpl internal constructor(private val clientOptions: Clien private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisDirectoryListParams, @@ -78,7 +78,7 @@ class DirectoryServiceImpl internal constructor(private val clientOptions: Clien .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { @@ -98,7 +98,6 @@ class DirectoryServiceImpl internal constructor(private val clientOptions: Clien private val listIndividualsHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) @Deprecated("use `list` instead") override fun listIndividuals( @@ -114,7 +113,7 @@ class DirectoryServiceImpl internal constructor(private val clientOptions: Clien .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listIndividualsHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DocumentServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DocumentServiceImpl.kt index f1e8b7b3..97a65e74 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DocumentServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DocumentServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -51,7 +51,8 @@ class DocumentServiceImpl internal constructor(private val clientOptions: Client class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : DocumentService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -62,7 +63,6 @@ class DocumentServiceImpl internal constructor(private val clientOptions: Client private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisDocumentListParams, @@ -77,7 +77,7 @@ class DocumentServiceImpl internal constructor(private val clientOptions: Client .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { @@ -90,7 +90,6 @@ class DocumentServiceImpl internal constructor(private val clientOptions: Client private val retreiveHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retreive( params: HrisDocumentRetreiveParams, @@ -108,7 +107,7 @@ class DocumentServiceImpl internal constructor(private val clientOptions: Client .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retreiveHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/EmploymentServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/EmploymentServiceImpl.kt index dcafefc2..a8efa09d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/EmploymentServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/EmploymentServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -42,7 +42,8 @@ class EmploymentServiceImpl internal constructor(private val clientOptions: Clie class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : EmploymentService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -53,7 +54,6 @@ class EmploymentServiceImpl internal constructor(private val clientOptions: Clie private val retrieveManyHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieveMany( params: HrisEmploymentRetrieveManyParams, @@ -69,7 +69,7 @@ class EmploymentServiceImpl internal constructor(private val clientOptions: Clie .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveManyHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/IndividualServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/IndividualServiceImpl.kt index d6b74967..362faada 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/IndividualServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/IndividualServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -42,7 +42,8 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : IndividualService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -53,7 +54,6 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie private val retrieveManyHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieveMany( params: HrisIndividualRetrieveManyParams, @@ -69,7 +69,7 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveManyHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PayStatementServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PayStatementServiceImpl.kt index 89acf8ea..645b00c5 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PayStatementServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PayStatementServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -42,7 +42,8 @@ class PayStatementServiceImpl internal constructor(private val clientOptions: Cl class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PayStatementService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -53,7 +54,6 @@ class PayStatementServiceImpl internal constructor(private val clientOptions: Cl private val retrieveManyHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieveMany( params: HrisPayStatementRetrieveManyParams, @@ -69,7 +69,7 @@ class PayStatementServiceImpl internal constructor(private val clientOptions: Cl .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveManyHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PaymentServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PaymentServiceImpl.kt index 67f5b3fc..3a8f892b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PaymentServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PaymentServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.hris import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -41,7 +41,8 @@ class PaymentServiceImpl internal constructor(private val clientOptions: ClientO class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PaymentService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -51,7 +52,7 @@ class PaymentServiceImpl internal constructor(private val clientOptions: ClientO ) private val listHandler: Handler> = - jsonHandler>(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler>(clientOptions.jsonMapper) override fun list( params: HrisPaymentListParams, @@ -66,7 +67,7 @@ class PaymentServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/benefits/IndividualServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/benefits/IndividualServiceImpl.kt index 92551aa3..7109b6e6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/benefits/IndividualServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/benefits/IndividualServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.hris.benefits import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -62,7 +62,8 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : IndividualService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -73,7 +74,6 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie private val enrolledIdsHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams, @@ -91,7 +91,7 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { enrolledIdsHandler.handle(it) } .also { @@ -104,7 +104,6 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie private val retrieveManyBenefitsHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams, @@ -122,7 +121,7 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveManyBenefitsHandler.handle(it) } .also { @@ -142,7 +141,6 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie private val unenrollManyHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams, @@ -161,7 +159,7 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { unenrollManyHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/PayStatementItemServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/PayStatementItemServiceImpl.kt index 63335ea0..8626076c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/PayStatementItemServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/PayStatementItemServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.hris.company import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -47,7 +47,8 @@ class PayStatementItemServiceImpl internal constructor(private val clientOptions class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PayStatementItemService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val rules: RuleService.WithRawResponse by lazy { RuleServiceImpl.WithRawResponseImpl(clientOptions) @@ -64,7 +65,6 @@ class PayStatementItemServiceImpl internal constructor(private val clientOptions private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisCompanyPayStatementItemListParams, @@ -79,7 +79,7 @@ class PayStatementItemServiceImpl internal constructor(private val clientOptions .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/payStatementItem/RuleServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/payStatementItem/RuleServiceImpl.kt index 94afdfa8..030e53cb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/payStatementItem/RuleServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/payStatementItem/RuleServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.hris.company.payStatementItem import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -70,7 +70,8 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : RuleService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -80,7 +81,7 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti ) private val createHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun create( params: HrisCompanyPayStatementItemRuleCreateParams, @@ -96,7 +97,7 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { @@ -108,7 +109,7 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti } private val updateHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun update( params: HrisCompanyPayStatementItemRuleUpdateParams, @@ -127,7 +128,7 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { @@ -140,7 +141,6 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: HrisCompanyPayStatementItemRuleListParams, @@ -155,7 +155,7 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { @@ -174,7 +174,7 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti } private val deleteHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams, @@ -193,7 +193,7 @@ class RuleServiceImpl internal constructor(private val clientOptions: ClientOpti .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { deleteHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt index 029ae982..b92a01c7 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.jobs import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -61,7 +61,8 @@ class AutomatedServiceImpl internal constructor(private val clientOptions: Clien class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : AutomatedService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -72,7 +73,6 @@ class AutomatedServiceImpl internal constructor(private val clientOptions: Clien private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: JobAutomatedCreateParams, @@ -88,7 +88,7 @@ class AutomatedServiceImpl internal constructor(private val clientOptions: Clien .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { @@ -100,7 +100,7 @@ class AutomatedServiceImpl internal constructor(private val clientOptions: Clien } private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: JobAutomatedRetrieveParams, @@ -118,7 +118,7 @@ class AutomatedServiceImpl internal constructor(private val clientOptions: Clien .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { @@ -131,7 +131,6 @@ class AutomatedServiceImpl internal constructor(private val clientOptions: Clien private val listHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: JobAutomatedListParams, @@ -146,7 +145,7 @@ class AutomatedServiceImpl internal constructor(private val clientOptions: Clien .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/ManualServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/ManualServiceImpl.kt index ec73e616..6f809d2e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/ManualServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/ManualServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.jobs import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -42,7 +42,8 @@ class ManualServiceImpl internal constructor(private val clientOptions: ClientOp class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : ManualService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -52,7 +53,7 @@ class ManualServiceImpl internal constructor(private val clientOptions: ClientOp ) private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: JobManualRetrieveParams, @@ -70,7 +71,7 @@ class ManualServiceImpl internal constructor(private val clientOptions: ClientOp .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/payroll/PayGroupServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/payroll/PayGroupServiceImpl.kt index 4a0b8e4e..67dd133e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/payroll/PayGroupServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/payroll/PayGroupServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.payroll import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.parseable @@ -52,7 +52,8 @@ class PayGroupServiceImpl internal constructor(private val clientOptions: Client class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PayGroupService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -63,7 +64,6 @@ class PayGroupServiceImpl internal constructor(private val clientOptions: Client private val retrieveHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieve( params: PayrollPayGroupRetrieveParams, @@ -81,7 +81,7 @@ class PayGroupServiceImpl internal constructor(private val clientOptions: Client .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { @@ -94,7 +94,6 @@ class PayGroupServiceImpl internal constructor(private val clientOptions: Client private val listHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun list( params: PayrollPayGroupListParams, @@ -109,7 +108,7 @@ class PayGroupServiceImpl internal constructor(private val clientOptions: Client .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { listHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/CompanyServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/CompanyServiceImpl.kt index afc15beb..73fedc5b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/CompanyServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/CompanyServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -41,7 +41,8 @@ class CompanyServiceImpl internal constructor(private val clientOptions: ClientO class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : CompanyService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -52,7 +53,6 @@ class CompanyServiceImpl internal constructor(private val clientOptions: ClientO private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxCompanyUpdateParams, @@ -68,7 +68,7 @@ class CompanyServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceImpl.kt index d7dcd7d9..d7c20374 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -47,7 +47,8 @@ class ConnectionServiceImpl internal constructor(private val clientOptions: Clie class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : ConnectionService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val accounts: AccountService.WithRawResponse by lazy { AccountServiceImpl.WithRawResponseImpl(clientOptions) @@ -64,7 +65,6 @@ class ConnectionServiceImpl internal constructor(private val clientOptions: Clie private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: SandboxConnectionCreateParams, @@ -80,7 +80,7 @@ class ConnectionServiceImpl internal constructor(private val clientOptions: Clie .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryServiceImpl.kt index 97ea4078..b71b5e15 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -41,7 +41,8 @@ class DirectoryServiceImpl internal constructor(private val clientOptions: Clien class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : DirectoryService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -52,7 +53,6 @@ class DirectoryServiceImpl internal constructor(private val clientOptions: Clien private val createHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: SandboxDirectoryCreateParams, @@ -68,7 +68,7 @@ class DirectoryServiceImpl internal constructor(private val clientOptions: Clien .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentServiceImpl.kt index 9ff66a89..72485f2b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -43,7 +43,8 @@ class EmploymentServiceImpl internal constructor(private val clientOptions: Clie class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : EmploymentService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -54,7 +55,6 @@ class EmploymentServiceImpl internal constructor(private val clientOptions: Clie private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxEmploymentUpdateParams, @@ -73,7 +73,7 @@ class EmploymentServiceImpl internal constructor(private val clientOptions: Clie .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/IndividualServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/IndividualServiceImpl.kt index 530c11bc..877e4923 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/IndividualServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/IndividualServiceImpl.kt @@ -3,14 +3,14 @@ package com.tryfinch.api.services.blocking.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -43,7 +43,8 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : IndividualService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -54,7 +55,6 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxIndividualUpdateParams, @@ -73,7 +73,7 @@ class IndividualServiceImpl internal constructor(private val clientOptions: Clie .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/JobServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/JobServiceImpl.kt index 66377981..e2d7efcd 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/JobServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/JobServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -48,7 +48,8 @@ class JobServiceImpl internal constructor(private val clientOptions: ClientOptio class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : JobService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val configuration: ConfigurationService.WithRawResponse by lazy { ConfigurationServiceImpl.WithRawResponseImpl(clientOptions) @@ -64,7 +65,7 @@ class JobServiceImpl internal constructor(private val clientOptions: ClientOptio override fun configuration(): ConfigurationService.WithRawResponse = configuration private val createHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun create( params: SandboxJobCreateParams, @@ -80,7 +81,7 @@ class JobServiceImpl internal constructor(private val clientOptions: ClientOptio .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentServiceImpl.kt index 7c11b1e3..f3df9473 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.sandbox import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -41,7 +41,8 @@ class PaymentServiceImpl internal constructor(private val clientOptions: ClientO class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : PaymentService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -52,7 +53,6 @@ class PaymentServiceImpl internal constructor(private val clientOptions: ClientO private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: SandboxPaymentCreateParams, @@ -68,7 +68,7 @@ class PaymentServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/connections/AccountServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/connections/AccountServiceImpl.kt index da103eb5..5adfb73e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/connections/AccountServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/connections/AccountServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.sandbox.connections import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -50,7 +50,8 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : AccountService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -61,7 +62,6 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO private val createHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun create( params: SandboxConnectionAccountCreateParams, @@ -77,7 +77,7 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { createHandler.handle(it) } .also { @@ -90,7 +90,6 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxConnectionAccountUpdateParams, @@ -106,7 +105,7 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/jobs/ConfigurationServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/jobs/ConfigurationServiceImpl.kt index faf95a70..45e09a3d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/jobs/ConfigurationServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/jobs/ConfigurationServiceImpl.kt @@ -3,13 +3,13 @@ package com.tryfinch.api.services.blocking.sandbox.jobs import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.RequestOptions +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.HttpResponseFor import com.tryfinch.api.core.http.json @@ -49,7 +49,8 @@ class ConfigurationServiceImpl internal constructor(private val clientOptions: C class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : ConfigurationService.WithRawResponse { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) override fun withOptions( modifier: Consumer @@ -60,7 +61,6 @@ class ConfigurationServiceImpl internal constructor(private val clientOptions: C private val retrieveHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun retrieve( params: SandboxJobConfigurationRetrieveParams, @@ -75,7 +75,7 @@ class ConfigurationServiceImpl internal constructor(private val clientOptions: C .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { retrieveHandler.handle(it) } .also { @@ -88,7 +88,6 @@ class ConfigurationServiceImpl internal constructor(private val clientOptions: C private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) - .withErrorHandler(errorHandler) override fun update( params: SandboxJobConfigurationUpdateParams, @@ -104,7 +103,7 @@ class ConfigurationServiceImpl internal constructor(private val clientOptions: C .prepare(clientOptions, params) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) val response = clientOptions.httpClient.execute(request, requestOptions) - return response.parseable { + return errorHandler.handle(response).parseable { response .use { updateHandler.handle(it) } .also { diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/ErrorHandlingTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/ErrorHandlingTest.kt index 51beb3bf..2a074766 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/ErrorHandlingTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/ErrorHandlingTest.kt @@ -74,6 +74,23 @@ internal class ErrorHandlingTest { assertThat(e.body()).isEqualTo(ERROR_JSON) } + @Test + fun companyRetrieve400WithRawResponse() { + val companyService = client.hris().company().withRawResponse() + stubFor( + get(anyUrl()) + .willReturn( + status(400).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES) + ) + ) + + val e = assertThrows { companyService.retrieve() } + + assertThat(e.statusCode()).isEqualTo(400) + assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE))) + assertThat(e.body()).isEqualTo(ERROR_JSON) + } + @Test fun companyRetrieve401() { val companyService = client.hris().company() @@ -91,6 +108,23 @@ internal class ErrorHandlingTest { assertThat(e.body()).isEqualTo(ERROR_JSON) } + @Test + fun companyRetrieve401WithRawResponse() { + val companyService = client.hris().company().withRawResponse() + stubFor( + get(anyUrl()) + .willReturn( + status(401).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES) + ) + ) + + val e = assertThrows { companyService.retrieve() } + + assertThat(e.statusCode()).isEqualTo(401) + assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE))) + assertThat(e.body()).isEqualTo(ERROR_JSON) + } + @Test fun companyRetrieve403() { val companyService = client.hris().company() @@ -108,6 +142,23 @@ internal class ErrorHandlingTest { assertThat(e.body()).isEqualTo(ERROR_JSON) } + @Test + fun companyRetrieve403WithRawResponse() { + val companyService = client.hris().company().withRawResponse() + stubFor( + get(anyUrl()) + .willReturn( + status(403).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES) + ) + ) + + val e = assertThrows { companyService.retrieve() } + + assertThat(e.statusCode()).isEqualTo(403) + assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE))) + assertThat(e.body()).isEqualTo(ERROR_JSON) + } + @Test fun companyRetrieve404() { val companyService = client.hris().company() @@ -125,6 +176,23 @@ internal class ErrorHandlingTest { assertThat(e.body()).isEqualTo(ERROR_JSON) } + @Test + fun companyRetrieve404WithRawResponse() { + val companyService = client.hris().company().withRawResponse() + stubFor( + get(anyUrl()) + .willReturn( + status(404).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES) + ) + ) + + val e = assertThrows { companyService.retrieve() } + + assertThat(e.statusCode()).isEqualTo(404) + assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE))) + assertThat(e.body()).isEqualTo(ERROR_JSON) + } + @Test fun companyRetrieve422() { val companyService = client.hris().company() @@ -142,6 +210,23 @@ internal class ErrorHandlingTest { assertThat(e.body()).isEqualTo(ERROR_JSON) } + @Test + fun companyRetrieve422WithRawResponse() { + val companyService = client.hris().company().withRawResponse() + stubFor( + get(anyUrl()) + .willReturn( + status(422).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES) + ) + ) + + val e = assertThrows { companyService.retrieve() } + + assertThat(e.statusCode()).isEqualTo(422) + assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE))) + assertThat(e.body()).isEqualTo(ERROR_JSON) + } + @Test fun companyRetrieve429() { val companyService = client.hris().company() @@ -159,6 +244,23 @@ internal class ErrorHandlingTest { assertThat(e.body()).isEqualTo(ERROR_JSON) } + @Test + fun companyRetrieve429WithRawResponse() { + val companyService = client.hris().company().withRawResponse() + stubFor( + get(anyUrl()) + .willReturn( + status(429).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES) + ) + ) + + val e = assertThrows { companyService.retrieve() } + + assertThat(e.statusCode()).isEqualTo(429) + assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE))) + assertThat(e.body()).isEqualTo(ERROR_JSON) + } + @Test fun companyRetrieve500() { val companyService = client.hris().company() @@ -176,6 +278,23 @@ internal class ErrorHandlingTest { assertThat(e.body()).isEqualTo(ERROR_JSON) } + @Test + fun companyRetrieve500WithRawResponse() { + val companyService = client.hris().company().withRawResponse() + stubFor( + get(anyUrl()) + .willReturn( + status(500).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES) + ) + ) + + val e = assertThrows { companyService.retrieve() } + + assertThat(e.statusCode()).isEqualTo(500) + assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE))) + assertThat(e.body()).isEqualTo(ERROR_JSON) + } + @Test fun companyRetrieve999() { val companyService = client.hris().company() @@ -193,6 +312,23 @@ internal class ErrorHandlingTest { assertThat(e.body()).isEqualTo(ERROR_JSON) } + @Test + fun companyRetrieve999WithRawResponse() { + val companyService = client.hris().company().withRawResponse() + stubFor( + get(anyUrl()) + .willReturn( + status(999).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES) + ) + ) + + val e = assertThrows { companyService.retrieve() } + + assertThat(e.statusCode()).isEqualTo(999) + assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE))) + assertThat(e.body()).isEqualTo(ERROR_JSON) + } + @Test fun companyRetrieveInvalidJsonBody() { val companyService = client.hris().company() From 532d1808e3aeaa8267507ed981498047babd7e96 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:34:49 +0000 Subject: [PATCH 06/19] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f498c780..2f972ab1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 45 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-4351c085cdf9776691774a90a958c0a7650fe29dc0e59017616ce087791ef923.yml -openapi_spec_hash: 990116204f6b522ab92b8de23edb7ede +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bc48a0a196d4471c3488df3b1e64b500fce43f2b154168d283f46f98c199c15f.yml +openapi_spec_hash: 51259d9b99e7ff42ce7db00df7f0d702 config_hash: 5146b12344dae76238940989dac1e8a0 From e9e1c400440734ec210fc759149de5b014102d11 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 21:11:51 +0000 Subject: [PATCH 07/19] chore(internal): refactor delegating from client to options --- .../api/client/okhttp/FinchOkHttpClient.kt | 98 ++++++++++--------- .../client/okhttp/FinchOkHttpClientAsync.kt | 98 ++++++++++--------- .../com/tryfinch/api/core/ClientOptions.kt | 26 +++++ 3 files changed, 126 insertions(+), 96 deletions(-) diff --git a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt index ea6fc295..629ab830 100644 --- a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt +++ b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt @@ -9,6 +9,7 @@ import com.tryfinch.api.core.ClientOptions import com.tryfinch.api.core.Timeout import com.tryfinch.api.core.http.Headers import com.tryfinch.api.core.http.QueryParams +import com.tryfinch.api.core.jsonMapper import java.net.Proxy import java.time.Clock import java.time.Duration @@ -30,10 +31,9 @@ class FinchOkHttpClient private constructor() { class Builder internal constructor() { private var clientOptions: ClientOptions.Builder = ClientOptions.builder() - private var timeout: Timeout = Timeout.default() private var proxy: Proxy? = null - fun baseUrl(baseUrl: String) = apply { clientOptions.baseUrl(baseUrl) } + fun proxy(proxy: Proxy) = apply { this.proxy = proxy } /** * Whether to throw an exception if any of the Jackson versions detected at runtime are @@ -54,6 +54,51 @@ class FinchOkHttpClient private constructor() { fun clock(clock: Clock) = apply { clientOptions.clock(clock) } + fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) } + + /** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */ + fun baseUrl(baseUrl: Optional) = baseUrl(baseUrl.getOrNull()) + + fun responseValidation(responseValidation: Boolean) = apply { + clientOptions.responseValidation(responseValidation) + } + + fun timeout(timeout: Timeout) = apply { clientOptions.timeout(timeout) } + + /** + * Sets the maximum time allowed for a complete HTTP call, not including retries. + * + * See [Timeout.request] for more details. + * + * For fine-grained control, pass a [Timeout] object. + */ + fun timeout(timeout: Duration) = apply { clientOptions.timeout(timeout) } + + fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } + + fun accessToken(accessToken: String?) = apply { clientOptions.accessToken(accessToken) } + + /** Alias for calling [Builder.accessToken] with `accessToken.orElse(null)`. */ + fun accessToken(accessToken: Optional) = accessToken(accessToken.getOrNull()) + + fun clientId(clientId: String?) = apply { clientOptions.clientId(clientId) } + + /** Alias for calling [Builder.clientId] with `clientId.orElse(null)`. */ + fun clientId(clientId: Optional) = clientId(clientId.getOrNull()) + + fun clientSecret(clientSecret: String?) = apply { clientOptions.clientSecret(clientSecret) } + + /** Alias for calling [Builder.clientSecret] with `clientSecret.orElse(null)`. */ + fun clientSecret(clientSecret: Optional) = clientSecret(clientSecret.getOrNull()) + + fun webhookSecret(webhookSecret: String?) = apply { + clientOptions.webhookSecret(webhookSecret) + } + + /** Alias for calling [Builder.webhookSecret] with `webhookSecret.orElse(null)`. */ + fun webhookSecret(webhookSecret: Optional) = + webhookSecret(webhookSecret.getOrNull()) + fun headers(headers: Headers) = apply { clientOptions.headers(headers) } fun headers(headers: Map>) = apply { @@ -134,51 +179,6 @@ class FinchOkHttpClient private constructor() { clientOptions.removeAllQueryParams(keys) } - fun timeout(timeout: Timeout) = apply { - clientOptions.timeout(timeout) - this.timeout = timeout - } - - /** - * Sets the maximum time allowed for a complete HTTP call, not including retries. - * - * See [Timeout.request] for more details. - * - * For fine-grained control, pass a [Timeout] object. - */ - fun timeout(timeout: Duration) = timeout(Timeout.builder().request(timeout).build()) - - fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } - - fun proxy(proxy: Proxy) = apply { this.proxy = proxy } - - fun responseValidation(responseValidation: Boolean) = apply { - clientOptions.responseValidation(responseValidation) - } - - fun accessToken(accessToken: String?) = apply { clientOptions.accessToken(accessToken) } - - /** Alias for calling [Builder.accessToken] with `accessToken.orElse(null)`. */ - fun accessToken(accessToken: Optional) = accessToken(accessToken.getOrNull()) - - fun clientId(clientId: String?) = apply { clientOptions.clientId(clientId) } - - /** Alias for calling [Builder.clientId] with `clientId.orElse(null)`. */ - fun clientId(clientId: Optional) = clientId(clientId.getOrNull()) - - fun clientSecret(clientSecret: String?) = apply { clientOptions.clientSecret(clientSecret) } - - /** Alias for calling [Builder.clientSecret] with `clientSecret.orElse(null)`. */ - fun clientSecret(clientSecret: Optional) = clientSecret(clientSecret.getOrNull()) - - fun webhookSecret(webhookSecret: String?) = apply { - clientOptions.webhookSecret(webhookSecret) - } - - /** Alias for calling [Builder.webhookSecret] with `webhookSecret.orElse(null)`. */ - fun webhookSecret(webhookSecret: Optional) = - webhookSecret(webhookSecret.getOrNull()) - fun fromEnv() = apply { clientOptions.fromEnv() } /** @@ -189,7 +189,9 @@ class FinchOkHttpClient private constructor() { fun build(): FinchClient = FinchClientImpl( clientOptions - .httpClient(OkHttpClient.builder().timeout(timeout).proxy(proxy).build()) + .httpClient( + OkHttpClient.builder().timeout(clientOptions.timeout()).proxy(proxy).build() + ) .build() ) } diff --git a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt index 158818cc..e3ee26da 100644 --- a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt +++ b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt @@ -9,6 +9,7 @@ import com.tryfinch.api.core.ClientOptions import com.tryfinch.api.core.Timeout import com.tryfinch.api.core.http.Headers import com.tryfinch.api.core.http.QueryParams +import com.tryfinch.api.core.jsonMapper import java.net.Proxy import java.time.Clock import java.time.Duration @@ -30,10 +31,9 @@ class FinchOkHttpClientAsync private constructor() { class Builder internal constructor() { private var clientOptions: ClientOptions.Builder = ClientOptions.builder() - private var timeout: Timeout = Timeout.default() private var proxy: Proxy? = null - fun baseUrl(baseUrl: String) = apply { clientOptions.baseUrl(baseUrl) } + fun proxy(proxy: Proxy) = apply { this.proxy = proxy } /** * Whether to throw an exception if any of the Jackson versions detected at runtime are @@ -54,6 +54,51 @@ class FinchOkHttpClientAsync private constructor() { fun clock(clock: Clock) = apply { clientOptions.clock(clock) } + fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) } + + /** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */ + fun baseUrl(baseUrl: Optional) = baseUrl(baseUrl.getOrNull()) + + fun responseValidation(responseValidation: Boolean) = apply { + clientOptions.responseValidation(responseValidation) + } + + fun timeout(timeout: Timeout) = apply { clientOptions.timeout(timeout) } + + /** + * Sets the maximum time allowed for a complete HTTP call, not including retries. + * + * See [Timeout.request] for more details. + * + * For fine-grained control, pass a [Timeout] object. + */ + fun timeout(timeout: Duration) = apply { clientOptions.timeout(timeout) } + + fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } + + fun accessToken(accessToken: String?) = apply { clientOptions.accessToken(accessToken) } + + /** Alias for calling [Builder.accessToken] with `accessToken.orElse(null)`. */ + fun accessToken(accessToken: Optional) = accessToken(accessToken.getOrNull()) + + fun clientId(clientId: String?) = apply { clientOptions.clientId(clientId) } + + /** Alias for calling [Builder.clientId] with `clientId.orElse(null)`. */ + fun clientId(clientId: Optional) = clientId(clientId.getOrNull()) + + fun clientSecret(clientSecret: String?) = apply { clientOptions.clientSecret(clientSecret) } + + /** Alias for calling [Builder.clientSecret] with `clientSecret.orElse(null)`. */ + fun clientSecret(clientSecret: Optional) = clientSecret(clientSecret.getOrNull()) + + fun webhookSecret(webhookSecret: String?) = apply { + clientOptions.webhookSecret(webhookSecret) + } + + /** Alias for calling [Builder.webhookSecret] with `webhookSecret.orElse(null)`. */ + fun webhookSecret(webhookSecret: Optional) = + webhookSecret(webhookSecret.getOrNull()) + fun headers(headers: Headers) = apply { clientOptions.headers(headers) } fun headers(headers: Map>) = apply { @@ -134,51 +179,6 @@ class FinchOkHttpClientAsync private constructor() { clientOptions.removeAllQueryParams(keys) } - fun timeout(timeout: Timeout) = apply { - clientOptions.timeout(timeout) - this.timeout = timeout - } - - /** - * Sets the maximum time allowed for a complete HTTP call, not including retries. - * - * See [Timeout.request] for more details. - * - * For fine-grained control, pass a [Timeout] object. - */ - fun timeout(timeout: Duration) = timeout(Timeout.builder().request(timeout).build()) - - fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } - - fun proxy(proxy: Proxy) = apply { this.proxy = proxy } - - fun responseValidation(responseValidation: Boolean) = apply { - clientOptions.responseValidation(responseValidation) - } - - fun accessToken(accessToken: String?) = apply { clientOptions.accessToken(accessToken) } - - /** Alias for calling [Builder.accessToken] with `accessToken.orElse(null)`. */ - fun accessToken(accessToken: Optional) = accessToken(accessToken.getOrNull()) - - fun clientId(clientId: String?) = apply { clientOptions.clientId(clientId) } - - /** Alias for calling [Builder.clientId] with `clientId.orElse(null)`. */ - fun clientId(clientId: Optional) = clientId(clientId.getOrNull()) - - fun clientSecret(clientSecret: String?) = apply { clientOptions.clientSecret(clientSecret) } - - /** Alias for calling [Builder.clientSecret] with `clientSecret.orElse(null)`. */ - fun clientSecret(clientSecret: Optional) = clientSecret(clientSecret.getOrNull()) - - fun webhookSecret(webhookSecret: String?) = apply { - clientOptions.webhookSecret(webhookSecret) - } - - /** Alias for calling [Builder.webhookSecret] with `webhookSecret.orElse(null)`. */ - fun webhookSecret(webhookSecret: Optional) = - webhookSecret(webhookSecret.getOrNull()) - fun fromEnv() = apply { clientOptions.fromEnv() } /** @@ -189,7 +189,9 @@ class FinchOkHttpClientAsync private constructor() { fun build(): FinchClientAsync = FinchClientAsyncImpl( clientOptions - .httpClient(OkHttpClient.builder().timeout(timeout).proxy(proxy).build()) + .httpClient( + OkHttpClient.builder().timeout(clientOptions.timeout()).proxy(proxy).build() + ) .build() ) } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt index e63f1d29..3505b462 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt @@ -9,6 +9,7 @@ import com.tryfinch.api.core.http.PhantomReachableClosingHttpClient import com.tryfinch.api.core.http.QueryParams import com.tryfinch.api.core.http.RetryingHttpClient import java.time.Clock +import java.time.Duration import java.util.Base64 import java.util.Optional import java.util.concurrent.Executor @@ -21,6 +22,13 @@ class ClientOptions private constructor( private val originalHttpClient: HttpClient, @get:JvmName("httpClient") val httpClient: HttpClient, + /** + * Whether to throw an exception if any of the Jackson versions detected at runtime are + * incompatible with the SDK's minimum supported Jackson version (2.13.4). + * + * Defaults to true. Use extreme caution when disabling this option. There is no guarantee that + * the SDK will work correctly when using an incompatible Jackson version. + */ @get:JvmName("checkJacksonVersionCompatibility") val checkJacksonVersionCompatibility: Boolean, @get:JvmName("jsonMapper") val jsonMapper: JsonMapper, @get:JvmName("streamHandlerExecutor") val streamHandlerExecutor: Executor, @@ -114,6 +122,13 @@ private constructor( this.httpClient = PhantomReachableClosingHttpClient(httpClient) } + /** + * Whether to throw an exception if any of the Jackson versions detected at runtime are + * incompatible with the SDK's minimum supported Jackson version (2.13.4). + * + * Defaults to true. Use extreme caution when disabling this option. There is no guarantee + * that the SDK will work correctly when using an incompatible Jackson version. + */ fun checkJacksonVersionCompatibility(checkJacksonVersionCompatibility: Boolean) = apply { this.checkJacksonVersionCompatibility = checkJacksonVersionCompatibility } @@ -137,6 +152,15 @@ private constructor( fun timeout(timeout: Timeout) = apply { this.timeout = timeout } + /** + * Sets the maximum time allowed for a complete HTTP call, not including retries. + * + * See [Timeout.request] for more details. + * + * For fine-grained control, pass a [Timeout] object. + */ + fun timeout(timeout: Duration) = timeout(Timeout.builder().request(timeout).build()) + fun maxRetries(maxRetries: Int) = apply { this.maxRetries = maxRetries } fun accessToken(accessToken: String?) = apply { this.accessToken = accessToken } @@ -240,6 +264,8 @@ private constructor( fun removeAllQueryParams(keys: Set) = apply { queryParams.removeAll(keys) } + fun timeout(): Timeout = timeout + fun fromEnv() = apply { System.getenv("FINCH_BASE_URL")?.let { baseUrl(it) } System.getenv("FINCH_CLIENT_ID")?.let { clientId(it) } From 4ae1b1ad7b9ba3f76f027ae32e5bee6525706dd5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 22:47:20 +0000 Subject: [PATCH 08/19] feat(client): add https config options --- README.md | 22 ++++++ .../api/client/okhttp/FinchOkHttpClient.kt | 67 ++++++++++++++++++- .../client/okhttp/FinchOkHttpClientAsync.kt | 67 ++++++++++++++++++- .../api/client/okhttp/OkHttpClient.kt | 31 +++++++++ 4 files changed, 183 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3fd8d0c8..16f032e4 100644 --- a/README.md +++ b/README.md @@ -445,6 +445,28 @@ FinchClient client = FinchOkHttpClient.builder() .build(); ``` +### HTTPS + +> [!NOTE] +> Most applications should not call these methods, and instead use the system defaults. The defaults include +> special optimizations that can be lost if the implementations are modified. + +To configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods: + +```java +import com.tryfinch.api.client.FinchClient; +import com.tryfinch.api.client.okhttp.FinchOkHttpClient; + +FinchClient client = FinchOkHttpClient.builder() + .fromEnv() + // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa. + .sslSocketFactory(yourSSLSocketFactory) + .trustManager(yourTrustManager) + .hostnameVerifier(yourHostnameVerifier) + .accessToken("My Access Token") + .build(); +``` + ### Custom HTTP client The SDK consists of three artifacts: diff --git a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt index 629ab830..aee9edfa 100644 --- a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt +++ b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt @@ -15,6 +15,9 @@ import java.time.Clock import java.time.Duration import java.util.Optional import java.util.concurrent.Executor +import javax.net.ssl.HostnameVerifier +import javax.net.ssl.SSLSocketFactory +import javax.net.ssl.X509TrustManager import kotlin.jvm.optionals.getOrNull class FinchOkHttpClient private constructor() { @@ -32,8 +35,62 @@ class FinchOkHttpClient private constructor() { private var clientOptions: ClientOptions.Builder = ClientOptions.builder() private var proxy: Proxy? = null + private var sslSocketFactory: SSLSocketFactory? = null + private var trustManager: X509TrustManager? = null + private var hostnameVerifier: HostnameVerifier? = null - fun proxy(proxy: Proxy) = apply { this.proxy = proxy } + fun proxy(proxy: Proxy?) = apply { this.proxy = proxy } + + /** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */ + fun proxy(proxy: Optional) = proxy(proxy.getOrNull()) + + /** + * The socket factory used to secure HTTPS connections. + * + * If this is set, then [trustManager] must also be set. + * + * If unset, then the system default is used. Most applications should not call this method, + * and instead use the system default. The default include special optimizations that can be + * lost if the implementation is modified. + */ + fun sslSocketFactory(sslSocketFactory: SSLSocketFactory?) = apply { + this.sslSocketFactory = sslSocketFactory + } + + /** Alias for calling [Builder.sslSocketFactory] with `sslSocketFactory.orElse(null)`. */ + fun sslSocketFactory(sslSocketFactory: Optional) = + sslSocketFactory(sslSocketFactory.getOrNull()) + + /** + * The trust manager used to secure HTTPS connections. + * + * If this is set, then [sslSocketFactory] must also be set. + * + * If unset, then the system default is used. Most applications should not call this method, + * and instead use the system default. The default include special optimizations that can be + * lost if the implementation is modified. + */ + fun trustManager(trustManager: X509TrustManager?) = apply { + this.trustManager = trustManager + } + + /** Alias for calling [Builder.trustManager] with `trustManager.orElse(null)`. */ + fun trustManager(trustManager: Optional) = + trustManager(trustManager.getOrNull()) + + /** + * The verifier used to confirm that response certificates apply to requested hostnames for + * HTTPS connections. + * + * If unset, then a default hostname verifier is used. + */ + fun hostnameVerifier(hostnameVerifier: HostnameVerifier?) = apply { + this.hostnameVerifier = hostnameVerifier + } + + /** Alias for calling [Builder.hostnameVerifier] with `hostnameVerifier.orElse(null)`. */ + fun hostnameVerifier(hostnameVerifier: Optional) = + hostnameVerifier(hostnameVerifier.getOrNull()) /** * Whether to throw an exception if any of the Jackson versions detected at runtime are @@ -190,7 +247,13 @@ class FinchOkHttpClient private constructor() { FinchClientImpl( clientOptions .httpClient( - OkHttpClient.builder().timeout(clientOptions.timeout()).proxy(proxy).build() + OkHttpClient.builder() + .timeout(clientOptions.timeout()) + .proxy(proxy) + .sslSocketFactory(sslSocketFactory) + .trustManager(trustManager) + .hostnameVerifier(hostnameVerifier) + .build() ) .build() ) diff --git a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt index e3ee26da..7279181b 100644 --- a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt +++ b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt @@ -15,6 +15,9 @@ import java.time.Clock import java.time.Duration import java.util.Optional import java.util.concurrent.Executor +import javax.net.ssl.HostnameVerifier +import javax.net.ssl.SSLSocketFactory +import javax.net.ssl.X509TrustManager import kotlin.jvm.optionals.getOrNull class FinchOkHttpClientAsync private constructor() { @@ -32,8 +35,62 @@ class FinchOkHttpClientAsync private constructor() { private var clientOptions: ClientOptions.Builder = ClientOptions.builder() private var proxy: Proxy? = null + private var sslSocketFactory: SSLSocketFactory? = null + private var trustManager: X509TrustManager? = null + private var hostnameVerifier: HostnameVerifier? = null - fun proxy(proxy: Proxy) = apply { this.proxy = proxy } + fun proxy(proxy: Proxy?) = apply { this.proxy = proxy } + + /** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */ + fun proxy(proxy: Optional) = proxy(proxy.getOrNull()) + + /** + * The socket factory used to secure HTTPS connections. + * + * If this is set, then [trustManager] must also be set. + * + * If unset, then the system default is used. Most applications should not call this method, + * and instead use the system default. The default include special optimizations that can be + * lost if the implementation is modified. + */ + fun sslSocketFactory(sslSocketFactory: SSLSocketFactory?) = apply { + this.sslSocketFactory = sslSocketFactory + } + + /** Alias for calling [Builder.sslSocketFactory] with `sslSocketFactory.orElse(null)`. */ + fun sslSocketFactory(sslSocketFactory: Optional) = + sslSocketFactory(sslSocketFactory.getOrNull()) + + /** + * The trust manager used to secure HTTPS connections. + * + * If this is set, then [sslSocketFactory] must also be set. + * + * If unset, then the system default is used. Most applications should not call this method, + * and instead use the system default. The default include special optimizations that can be + * lost if the implementation is modified. + */ + fun trustManager(trustManager: X509TrustManager?) = apply { + this.trustManager = trustManager + } + + /** Alias for calling [Builder.trustManager] with `trustManager.orElse(null)`. */ + fun trustManager(trustManager: Optional) = + trustManager(trustManager.getOrNull()) + + /** + * The verifier used to confirm that response certificates apply to requested hostnames for + * HTTPS connections. + * + * If unset, then a default hostname verifier is used. + */ + fun hostnameVerifier(hostnameVerifier: HostnameVerifier?) = apply { + this.hostnameVerifier = hostnameVerifier + } + + /** Alias for calling [Builder.hostnameVerifier] with `hostnameVerifier.orElse(null)`. */ + fun hostnameVerifier(hostnameVerifier: Optional) = + hostnameVerifier(hostnameVerifier.getOrNull()) /** * Whether to throw an exception if any of the Jackson versions detected at runtime are @@ -190,7 +247,13 @@ class FinchOkHttpClientAsync private constructor() { FinchClientAsyncImpl( clientOptions .httpClient( - OkHttpClient.builder().timeout(clientOptions.timeout()).proxy(proxy).build() + OkHttpClient.builder() + .timeout(clientOptions.timeout()) + .proxy(proxy) + .sslSocketFactory(sslSocketFactory) + .trustManager(trustManager) + .hostnameVerifier(hostnameVerifier) + .build() ) .build() ) diff --git a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt index 9d66fadb..4480cd8f 100644 --- a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt +++ b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt @@ -14,6 +14,9 @@ import java.io.InputStream import java.net.Proxy import java.time.Duration import java.util.concurrent.CompletableFuture +import javax.net.ssl.HostnameVerifier +import javax.net.ssl.SSLSocketFactory +import javax.net.ssl.X509TrustManager import okhttp3.Call import okhttp3.Callback import okhttp3.HttpUrl.Companion.toHttpUrl @@ -189,6 +192,9 @@ class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpC private var timeout: Timeout = Timeout.default() private var proxy: Proxy? = null + private var sslSocketFactory: SSLSocketFactory? = null + private var trustManager: X509TrustManager? = null + private var hostnameVerifier: HostnameVerifier? = null fun timeout(timeout: Timeout) = apply { this.timeout = timeout } @@ -196,6 +202,18 @@ class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpC fun proxy(proxy: Proxy?) = apply { this.proxy = proxy } + fun sslSocketFactory(sslSocketFactory: SSLSocketFactory?) = apply { + this.sslSocketFactory = sslSocketFactory + } + + fun trustManager(trustManager: X509TrustManager?) = apply { + this.trustManager = trustManager + } + + fun hostnameVerifier(hostnameVerifier: HostnameVerifier?) = apply { + this.hostnameVerifier = hostnameVerifier + } + fun build(): OkHttpClient = OkHttpClient( okhttp3.OkHttpClient.Builder() @@ -204,6 +222,19 @@ class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpC .writeTimeout(timeout.write()) .callTimeout(timeout.request()) .proxy(proxy) + .apply { + val sslSocketFactory = sslSocketFactory + val trustManager = trustManager + if (sslSocketFactory != null && trustManager != null) { + sslSocketFactory(sslSocketFactory, trustManager) + } else { + check((sslSocketFactory != null) == (trustManager != null)) { + "Both or none of `sslSocketFactory` and `trustManager` must be set, but only one was set" + } + } + + hostnameVerifier?.let(::hostnameVerifier) + } .build() .apply { // We usually make all our requests to the same host so it makes sense to From dd71f0c1c27ad11fcae3acd06e8057b42b0d74df Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 23:52:35 +0000 Subject: [PATCH 09/19] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2f972ab1..125357f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 45 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bc48a0a196d4471c3488df3b1e64b500fce43f2b154168d283f46f98c199c15f.yml -openapi_spec_hash: 51259d9b99e7ff42ce7db00df7f0d702 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-71150944bd4857b4e440c82129013be70c3493cf844b70b8f3e61ef963d04297.yml +openapi_spec_hash: 258a53bb485ab17eef5736d88f4d8259 config_hash: 5146b12344dae76238940989dac1e8a0 From acdb059e62754399064125ff41c1d5a2ac1305ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 18:41:57 +0000 Subject: [PATCH 10/19] feat(client): allow configuring env via system properties --- README.md | 31 ++++++++++++------- .../com/tryfinch/api/core/ClientOptions.kt | 14 ++++++--- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 16f032e4..afd2ff71 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,8 @@ import com.tryfinch.api.models.HrisDirectoryListPage; import com.tryfinch.api.models.HrisDirectoryListParams; FinchClient client = FinchOkHttpClient.builder() - // Configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties + Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); @@ -64,14 +65,15 @@ HrisDirectoryListPage page = client.hris().directory().list(); ## Client configuration -Configure the client using environment variables: +Configure the client using system properties or environment variables: ```java import com.tryfinch.api.client.FinchClient; import com.tryfinch.api.client.okhttp.FinchOkHttpClient; FinchClient client = FinchOkHttpClient.builder() - // Configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties + Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); @@ -95,7 +97,8 @@ import com.tryfinch.api.client.FinchClient; import com.tryfinch.api.client.okhttp.FinchOkHttpClient; FinchClient client = FinchOkHttpClient.builder() - // Configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties + Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); @@ -103,12 +106,14 @@ FinchClient client = FinchOkHttpClient.builder() See this table for the available options: -| Setter | Environment variable | Required | Default value | -| --------------- | ---------------------- | -------- | ---------------------------- | -| `clientId` | `FINCH_CLIENT_ID` | false | - | -| `clientSecret` | `FINCH_CLIENT_SECRET` | false | - | -| `webhookSecret` | `FINCH_WEBHOOK_SECRET` | false | - | -| `baseUrl` | `FINCH_BASE_URL` | true | `"https://api.tryfinch.com"` | +| Setter | System property | Environment variable | Required | Default value | +| --------------- | --------------------- | ---------------------- | -------- | ---------------------------- | +| `clientId` | `finch.clientId` | `FINCH_CLIENT_ID` | false | - | +| `clientSecret` | `finch.clientSecret` | `FINCH_CLIENT_SECRET` | false | - | +| `webhookSecret` | `finch.webhookSecret` | `FINCH_WEBHOOK_SECRET` | false | - | +| `baseUrl` | `finch.baseUrl` | `FINCH_BASE_URL` | true | `"https://api.tryfinch.com"` | + +System properties take precedence over environment variables. > [!TIP] > Don't create more than one client in the same application. Each client has a connection pool and @@ -155,7 +160,8 @@ import com.tryfinch.api.models.HrisDirectoryListParams; import java.util.concurrent.CompletableFuture; FinchClient client = FinchOkHttpClient.builder() - // Configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties + Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); @@ -173,7 +179,8 @@ import com.tryfinch.api.models.HrisDirectoryListParams; import java.util.concurrent.CompletableFuture; FinchClientAsync client = FinchOkHttpClientAsync.builder() - // Configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties + Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt index 3505b462..51ed9fd6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt @@ -267,10 +267,16 @@ private constructor( fun timeout(): Timeout = timeout fun fromEnv() = apply { - System.getenv("FINCH_BASE_URL")?.let { baseUrl(it) } - System.getenv("FINCH_CLIENT_ID")?.let { clientId(it) } - System.getenv("FINCH_CLIENT_SECRET")?.let { clientSecret(it) } - System.getenv("FINCH_WEBHOOK_SECRET")?.let { webhookSecret(it) } + (System.getProperty("finch.baseUrl") ?: System.getenv("FINCH_BASE_URL"))?.let { + baseUrl(it) + } + (System.getProperty("finch.clientId") ?: System.getenv("FINCH_CLIENT_ID"))?.let { + clientId(it) + } + (System.getProperty("finch.clientSecret") ?: System.getenv("FINCH_CLIENT_SECRET")) + ?.let { clientSecret(it) } + (System.getProperty("finch.webhookSecret") ?: System.getenv("FINCH_WEBHOOK_SECRET")) + ?.let { webhookSecret(it) } } /** From c85d73ace557d4a52fadccbfca80ebf81a63c15d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 01:01:56 +0000 Subject: [PATCH 11/19] feat(client): add `{QueryParams,Headers}#put(String, JsonValue)` methods --- .../com/tryfinch/api/core/http/Headers.kt | 41 +++++++++++++++---- .../com/tryfinch/api/core/http/QueryParams.kt | 21 ++++++++++ 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/Headers.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/Headers.kt index b3b56dec..fa541fd4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/Headers.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/Headers.kt @@ -1,5 +1,15 @@ +// File generated from our OpenAPI spec by Stainless. + package com.tryfinch.api.core.http +import com.tryfinch.api.core.JsonArray +import com.tryfinch.api.core.JsonBoolean +import com.tryfinch.api.core.JsonMissing +import com.tryfinch.api.core.JsonNull +import com.tryfinch.api.core.JsonNumber +import com.tryfinch.api.core.JsonObject +import com.tryfinch.api.core.JsonString +import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.toImmutable import java.util.TreeMap @@ -28,6 +38,19 @@ private constructor( TreeMap(String.CASE_INSENSITIVE_ORDER) private var size: Int = 0 + fun put(name: String, value: JsonValue): Builder = apply { + when (value) { + is JsonMissing, + is JsonNull -> {} + is JsonBoolean -> put(name, value.value.toString()) + is JsonNumber -> put(name, value.value.toString()) + is JsonString -> put(name, value.value) + is JsonArray -> value.values.forEach { put(name, it) } + is JsonObject -> + value.values.forEach { (nestedName, value) -> put("$name.$nestedName", value) } + } + } + fun put(name: String, value: String) = apply { map.getOrPut(name) { mutableListOf() }.add(value) size++ @@ -41,15 +64,6 @@ private constructor( headers.names().forEach { put(it, headers.values(it)) } } - fun remove(name: String) = apply { size -= map.remove(name).orEmpty().size } - - fun removeAll(names: Set) = apply { names.forEach(::remove) } - - fun clear() = apply { - map.clear() - size = 0 - } - fun replace(name: String, value: String) = apply { remove(name) put(name, value) @@ -68,6 +82,15 @@ private constructor( headers.names().forEach { replace(it, headers.values(it)) } } + fun remove(name: String) = apply { size -= map.remove(name).orEmpty().size } + + fun removeAll(names: Set) = apply { names.forEach(::remove) } + + fun clear() = apply { + map.clear() + size = 0 + } + fun build() = Headers( map.mapValuesTo(TreeMap(String.CASE_INSENSITIVE_ORDER)) { (_, values) -> diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/QueryParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/QueryParams.kt index 9d2ff7c5..dd845b98 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/QueryParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/http/QueryParams.kt @@ -2,6 +2,14 @@ package com.tryfinch.api.core.http +import com.tryfinch.api.core.JsonArray +import com.tryfinch.api.core.JsonBoolean +import com.tryfinch.api.core.JsonMissing +import com.tryfinch.api.core.JsonNull +import com.tryfinch.api.core.JsonNumber +import com.tryfinch.api.core.JsonObject +import com.tryfinch.api.core.JsonString +import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.toImmutable class QueryParams @@ -28,6 +36,19 @@ private constructor( private val map: MutableMap> = mutableMapOf() private var size: Int = 0 + fun put(key: String, value: JsonValue): Builder = apply { + when (value) { + is JsonMissing, + is JsonNull -> {} + is JsonBoolean -> put(key, value.value.toString()) + is JsonNumber -> put(key, value.value.toString()) + is JsonString -> put(key, value.value) + is JsonArray -> value.values.forEach { put("$key[]", it) } + is JsonObject -> + value.values.forEach { (nestedKey, value) -> put("$key[$nestedKey]", value) } + } + } + fun put(key: String, value: String) = apply { map.getOrPut(key) { mutableListOf() }.add(value) size++ From 8cfda8eb135f79e051f882b23eeb61e18367da5b Mon Sep 17 00:00:00 2001 From: David Meadows Date: Tue, 22 Jul 2025 11:55:17 -0400 Subject: [PATCH 12/19] fix(internal): fix error handlers on ClientImpl --- .../com/tryfinch/api/client/FinchClientAsyncImpl.kt | 9 +++++---- .../kotlin/com/tryfinch/api/client/FinchClientImpl.kt | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt index 5f8e59fb..178d56dd 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt @@ -4,13 +4,13 @@ package com.tryfinch.api.client import com.fasterxml.jackson.annotation.JsonProperty import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.getPackageVersion +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.json import com.tryfinch.api.errors.FinchException @@ -41,7 +41,8 @@ import java.util.function.Consumer class FinchClientAsyncImpl(private val clientOptions: ClientOptions) : FinchClientAsync { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val clientOptionsWithUserAgent = if (clientOptions.headers.names().contains("User-Agent")) clientOptions @@ -94,7 +95,7 @@ class FinchClientAsyncImpl(private val clientOptions: ClientOptions) : FinchClie } private val getAccessTokenHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun sync(): FinchClient = sync diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt index efa56805..9bc6679e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt @@ -4,13 +4,13 @@ package com.tryfinch.api.client import com.fasterxml.jackson.annotation.JsonProperty import com.tryfinch.api.core.ClientOptions -import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.getPackageVersion +import com.tryfinch.api.core.handlers.errorBodyHandler import com.tryfinch.api.core.handlers.errorHandler import com.tryfinch.api.core.handlers.jsonHandler -import com.tryfinch.api.core.handlers.withErrorHandler import com.tryfinch.api.core.http.HttpMethod import com.tryfinch.api.core.http.HttpRequest +import com.tryfinch.api.core.http.HttpResponse import com.tryfinch.api.core.http.HttpResponse.Handler import com.tryfinch.api.core.http.json import com.tryfinch.api.errors.FinchException @@ -40,7 +40,8 @@ import java.util.function.Consumer class FinchClientImpl(private val clientOptions: ClientOptions) : FinchClient { - private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) + private val errorHandler: Handler = + errorHandler(errorBodyHandler(clientOptions.jsonMapper)) private val clientOptionsWithUserAgent = if (clientOptions.headers.names().contains("User-Agent")) clientOptions @@ -83,7 +84,7 @@ class FinchClientImpl(private val clientOptions: ClientOptions) : FinchClient { private val connect: ConnectService by lazy { ConnectServiceImpl(clientOptionsWithUserAgent) } private val getAccessTokenHandler: Handler = - jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler) + jsonHandler(clientOptions.jsonMapper) override fun async(): FinchClientAsync = async From f1f11199de44aa3277553ffdfa35715e966bc13c Mon Sep 17 00:00:00 2001 From: David Meadows Date: Tue, 22 Jul 2025 12:10:30 -0400 Subject: [PATCH 13/19] fix: use errorHandler --- .../main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt | 2 +- .../src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt index 178d56dd..a26bbdbb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt @@ -151,7 +151,7 @@ class FinchClientAsyncImpl(private val clientOptions: ClientOptions) : FinchClie ) .build() return clientOptions.httpClient.executeAsync(request).thenApply { - getAccessTokenHandler.handle(it).accessToken + getAccessTokenHandler.handle(errorHandler.handle(it)).accessToken } } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt index 9bc6679e..b0d6cd0e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt @@ -140,7 +140,7 @@ class FinchClientImpl(private val clientOptions: ClientOptions) : FinchClient { ) .build() return clientOptions.httpClient.execute(request).let { - getAccessTokenHandler.handle(it).accessToken + getAccessTokenHandler.handle(errorHandler.handle(it)).accessToken } } From f1f21d90ad56582d33c0e1f8b7248cba3ccf381a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:48:44 +0000 Subject: [PATCH 14/19] feat(api): api update --- .stats.yml | 4 +- .../api/models/BenefitContribution.kt | 29 +- .../tryfinch/api/models/BenefitFrequency.kt | 12 +- .../com/tryfinch/api/models/CompanyBenefit.kt | 190 ++- .../api/models/HrisBenefitCreateParams.kt | 80 +- .../tryfinch/api/models/IndividualBenefit.kt | 1240 ++++++++++++----- .../tryfinch/api/models/SupportedBenefit.kt | 155 ++- .../api/models/AccountUpdateEventTest.kt | 276 ++-- .../BenefitFeaturesAndOperationsTest.kt | 18 +- .../api/models/BenefitsSupportTest.kt | 240 ++-- .../tryfinch/api/models/CompanyBenefitTest.kt | 18 +- .../api/models/HrisBenefitCreateParamsTest.kt | 6 +- .../api/models/IndividualBenefitTest.kt | 52 +- .../com/tryfinch/api/models/ProviderTest.kt | 216 +-- .../api/models/SupportedBenefitTest.kt | 19 +- .../tryfinch/api/models/WebhookEventTest.kt | 192 ++- .../async/hris/BenefitServiceAsyncTest.kt | 2 +- .../blocking/hris/BenefitServiceTest.kt | 2 +- 18 files changed, 1720 insertions(+), 1031 deletions(-) diff --git a/.stats.yml b/.stats.yml index 125357f8..cedd110a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 45 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-71150944bd4857b4e440c82129013be70c3493cf844b70b8f3e61ef963d04297.yml -openapi_spec_hash: 258a53bb485ab17eef5736d88f4d8259 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-73c284d36c1ed2d9963fc733e421005fad76e559de8efe9baa6511a43dd72668.yml +openapi_spec_hash: 1e58c4445919b71c77e5c7f16bd6fa7d config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitContribution.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitContribution.kt index 7c842ee6..9d1e4808 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitContribution.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitContribution.kt @@ -11,6 +11,7 @@ import com.tryfinch.api.core.ExcludeMissing import com.tryfinch.api.core.JsonField import com.tryfinch.api.core.JsonMissing import com.tryfinch.api.core.JsonValue +import com.tryfinch.api.core.checkRequired import com.tryfinch.api.errors.FinchInvalidDataException import java.util.Collections import java.util.Objects @@ -74,15 +75,23 @@ private constructor( companion object { - /** Returns a mutable builder for constructing an instance of [BenefitContribution]. */ + /** + * Returns a mutable builder for constructing an instance of [BenefitContribution]. + * + * The following fields are required: + * ```java + * .amount() + * .type() + * ``` + */ @JvmStatic fun builder() = Builder() } /** A builder for [BenefitContribution]. */ class Builder internal constructor() { - private var amount: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() + private var amount: JsonField? = null + private var type: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -150,9 +159,21 @@ private constructor( * Returns an immutable instance of [BenefitContribution]. * * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .amount() + * .type() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ fun build(): BenefitContribution = - BenefitContribution(amount, type, additionalProperties.toMutableMap()) + BenefitContribution( + checkRequired("amount", amount), + checkRequired("type", type), + additionalProperties.toMutableMap(), + ) } private var validated: Boolean = false diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFrequency.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFrequency.kt index 0d37a391..fcb26d32 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFrequency.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFrequency.kt @@ -22,20 +22,20 @@ class BenefitFrequency @JsonCreator private constructor(private val value: JsonF companion object { - @JvmField val ONE_TIME = of("one_time") - @JvmField val EVERY_PAYCHECK = of("every_paycheck") @JvmField val MONTHLY = of("monthly") + @JvmField val ONE_TIME = of("one_time") + @JvmStatic fun of(value: String) = BenefitFrequency(JsonField.of(value)) } /** An enum containing [BenefitFrequency]'s known values. */ enum class Known { - ONE_TIME, EVERY_PAYCHECK, MONTHLY, + ONE_TIME, } /** @@ -48,9 +48,9 @@ class BenefitFrequency @JsonCreator private constructor(private val value: JsonF * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { - ONE_TIME, EVERY_PAYCHECK, MONTHLY, + ONE_TIME, /** * An enum member indicating that [BenefitFrequency] was instantiated with an unknown value. */ @@ -66,9 +66,9 @@ class BenefitFrequency @JsonCreator private constructor(private val value: JsonF */ fun value(): Value = when (this) { - ONE_TIME -> Value.ONE_TIME EVERY_PAYCHECK -> Value.EVERY_PAYCHECK MONTHLY -> Value.MONTHLY + ONE_TIME -> Value.ONE_TIME else -> Value._UNKNOWN } @@ -82,9 +82,9 @@ class BenefitFrequency @JsonCreator private constructor(private val value: JsonF */ fun known(): Known = when (this) { - ONE_TIME -> Known.ONE_TIME EVERY_PAYCHECK -> Known.EVERY_PAYCHECK MONTHLY -> Known.MONTHLY + ONE_TIME -> Known.ONE_TIME else -> throw FinchInvalidDataException("Unknown BenefitFrequency: $value") } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyBenefit.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyBenefit.kt index 2ece80bf..d9abb755 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyBenefit.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyBenefit.kt @@ -23,19 +23,16 @@ import kotlin.jvm.optionals.getOrNull class CompanyBenefit private constructor( private val benefitId: JsonField, - private val companyContribution: JsonField, private val description: JsonField, private val frequency: JsonField, private val type: JsonField, + private val companyContribution: JsonField, private val additionalProperties: MutableMap, ) { @JsonCreator private constructor( @JsonProperty("benefit_id") @ExcludeMissing benefitId: JsonField = JsonMissing.of(), - @JsonProperty("company_contribution") - @ExcludeMissing - companyContribution: JsonField = JsonMissing.of(), @JsonProperty("description") @ExcludeMissing description: JsonField = JsonMissing.of(), @@ -43,7 +40,10 @@ private constructor( @ExcludeMissing frequency: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(), - ) : this(benefitId, companyContribution, description, frequency, type, mutableMapOf()) + @JsonProperty("company_contribution") + @ExcludeMissing + companyContribution: JsonField = JsonMissing.of(), + ) : this(benefitId, description, frequency, type, companyContribution, mutableMapOf()) /** * The id of the benefit. @@ -53,15 +53,6 @@ private constructor( */ fun benefitId(): String = benefitId.getRequired("benefit_id") - /** - * The company match for this benefit. - * - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun companyContribution(): Optional = - companyContribution.getOptional("company_contribution") - /** * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -85,21 +76,20 @@ private constructor( fun type(): Optional = type.getOptional("type") /** - * Returns the raw JSON value of [benefitId]. + * The company match for this benefit. * - * Unlike [benefitId], this method doesn't throw if the JSON field has an unexpected type. + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - @JsonProperty("benefit_id") @ExcludeMissing fun _benefitId(): JsonField = benefitId + fun companyContribution(): Optional = + companyContribution.getOptional("company_contribution") /** - * Returns the raw JSON value of [companyContribution]. + * Returns the raw JSON value of [benefitId]. * - * Unlike [companyContribution], this method doesn't throw if the JSON field has an unexpected - * type. + * Unlike [benefitId], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("company_contribution") - @ExcludeMissing - fun _companyContribution(): JsonField = companyContribution + @JsonProperty("benefit_id") @ExcludeMissing fun _benefitId(): JsonField = benefitId /** * Returns the raw JSON value of [description]. @@ -124,6 +114,16 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type + /** + * Returns the raw JSON value of [companyContribution]. + * + * Unlike [companyContribution], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("company_contribution") + @ExcludeMissing + fun _companyContribution(): JsonField = companyContribution + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -144,7 +144,6 @@ private constructor( * The following fields are required: * ```java * .benefitId() - * .companyContribution() * .description() * .frequency() * .type() @@ -157,19 +156,20 @@ private constructor( class Builder internal constructor() { private var benefitId: JsonField? = null - private var companyContribution: JsonField? = null private var description: JsonField? = null private var frequency: JsonField? = null private var type: JsonField? = null + private var companyContribution: JsonField = + JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(companyBenefit: CompanyBenefit) = apply { benefitId = companyBenefit.benefitId - companyContribution = companyBenefit.companyContribution description = companyBenefit.description frequency = companyBenefit.frequency type = companyBenefit.type + companyContribution = companyBenefit.companyContribution additionalProperties = companyBenefit.additionalProperties.toMutableMap() } @@ -185,28 +185,6 @@ private constructor( */ fun benefitId(benefitId: JsonField) = apply { this.benefitId = benefitId } - /** The company match for this benefit. */ - fun companyContribution(companyContribution: BenefitCompanyMatchContribution?) = - companyContribution(JsonField.ofNullable(companyContribution)) - - /** - * Alias for calling [Builder.companyContribution] with `companyContribution.orElse(null)`. - */ - fun companyContribution(companyContribution: Optional) = - companyContribution(companyContribution.getOrNull()) - - /** - * Sets [Builder.companyContribution] to an arbitrary JSON value. - * - * You should usually call [Builder.companyContribution] with a well-typed - * [BenefitCompanyMatchContribution] value instead. This method is primarily for setting the - * field to an undocumented or not yet supported value. - */ - fun companyContribution(companyContribution: JsonField) = - apply { - this.companyContribution = companyContribution - } - fun description(description: String?) = description(JsonField.ofNullable(description)) /** Alias for calling [Builder.description] with `description.orElse(null)`. */ @@ -251,6 +229,28 @@ private constructor( */ fun type(type: JsonField) = apply { this.type = type } + /** The company match for this benefit. */ + fun companyContribution(companyContribution: BenefitCompanyMatchContribution?) = + companyContribution(JsonField.ofNullable(companyContribution)) + + /** + * Alias for calling [Builder.companyContribution] with `companyContribution.orElse(null)`. + */ + fun companyContribution(companyContribution: Optional) = + companyContribution(companyContribution.getOrNull()) + + /** + * Sets [Builder.companyContribution] to an arbitrary JSON value. + * + * You should usually call [Builder.companyContribution] with a well-typed + * [BenefitCompanyMatchContribution] value instead. This method is primarily for setting the + * field to an undocumented or not yet supported value. + */ + fun companyContribution(companyContribution: JsonField) = + apply { + this.companyContribution = companyContribution + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -278,7 +278,6 @@ private constructor( * The following fields are required: * ```java * .benefitId() - * .companyContribution() * .description() * .frequency() * .type() @@ -289,10 +288,10 @@ private constructor( fun build(): CompanyBenefit = CompanyBenefit( checkRequired("benefitId", benefitId), - checkRequired("companyContribution", companyContribution), checkRequired("description", description), checkRequired("frequency", frequency), checkRequired("type", type), + companyContribution, additionalProperties.toMutableMap(), ) } @@ -305,10 +304,10 @@ private constructor( } benefitId() - companyContribution().ifPresent { it.validate() } description() frequency().ifPresent { it.validate() } type().ifPresent { it.validate() } + companyContribution().ifPresent { it.validate() } validated = true } @@ -328,10 +327,10 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (if (benefitId.asKnown().isPresent) 1 else 0) + - (companyContribution.asKnown().getOrNull()?.validity() ?: 0) + (if (description.asKnown().isPresent) 1 else 0) + (frequency.asKnown().getOrNull()?.validity() ?: 0) + - (type.asKnown().getOrNull()?.validity() ?: 0) + (type.asKnown().getOrNull()?.validity() ?: 0) + + (companyContribution.asKnown().getOrNull()?.validity() ?: 0) /** The company match for this benefit. */ class BenefitCompanyMatchContribution @@ -348,16 +347,16 @@ private constructor( ) : this(tiers, type, mutableMapOf()) /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun tiers(): Optional> = tiers.getOptional("tiers") + fun tiers(): List = tiers.getRequired("tiers") /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun type(): Optional = type.getOptional("type") + fun type(): Type = type.getRequired("type") /** * Returns the raw JSON value of [tiers]. @@ -390,6 +389,12 @@ private constructor( /** * Returns a mutable builder for constructing an instance of * [BenefitCompanyMatchContribution]. + * + * The following fields are required: + * ```java + * .tiers() + * .type() + * ``` */ @JvmStatic fun builder() = Builder() } @@ -398,7 +403,7 @@ private constructor( class Builder internal constructor() { private var tiers: JsonField>? = null - private var type: JsonField = JsonMissing.of() + private var type: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -469,11 +474,19 @@ private constructor( * Returns an immutable instance of [BenefitCompanyMatchContribution]. * * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .tiers() + * .type() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ fun build(): BenefitCompanyMatchContribution = BenefitCompanyMatchContribution( - (tiers ?: JsonMissing.of()).map { it.toImmutable() }, - type, + checkRequired("tiers", tiers).map { it.toImmutable() }, + checkRequired("type", type), additionalProperties.toMutableMap(), ) } @@ -485,8 +498,8 @@ private constructor( return@apply } - tiers().ifPresent { it.forEach { it.validate() } } - type().ifPresent { it.validate() } + tiers().forEach { it.validate() } + type().validate() validated = true } @@ -525,16 +538,18 @@ private constructor( ) : this(match, threshold, mutableMapOf()) /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if - * the server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). */ - fun match(): Optional = match.getOptional("match") + fun match(): Long = match.getRequired("match") /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if - * the server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). */ - fun threshold(): Optional = threshold.getOptional("threshold") + fun threshold(): Long = threshold.getRequired("threshold") /** * Returns the raw JSON value of [match]. @@ -565,15 +580,23 @@ private constructor( companion object { - /** Returns a mutable builder for constructing an instance of [Tier]. */ + /** + * Returns a mutable builder for constructing an instance of [Tier]. + * + * The following fields are required: + * ```java + * .match() + * .threshold() + * ``` + */ @JvmStatic fun builder() = Builder() } /** A builder for [Tier]. */ class Builder internal constructor() { - private var match: JsonField = JsonMissing.of() - private var threshold: JsonField = JsonMissing.of() + private var match: JsonField? = null + private var threshold: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -631,8 +654,21 @@ private constructor( * Returns an immutable instance of [Tier]. * * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .match() + * .threshold() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ - fun build(): Tier = Tier(match, threshold, additionalProperties.toMutableMap()) + fun build(): Tier = + Tier( + checkRequired("match", match), + checkRequired("threshold", threshold), + additionalProperties.toMutableMap(), + ) } private var validated: Boolean = false @@ -828,15 +864,15 @@ private constructor( return true } - return /* spotless:off */ other is CompanyBenefit && benefitId == other.benefitId && companyContribution == other.companyContribution && description == other.description && frequency == other.frequency && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CompanyBenefit && benefitId == other.benefitId && description == other.description && frequency == other.frequency && type == other.type && companyContribution == other.companyContribution && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(benefitId, companyContribution, description, frequency, type, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(benefitId, description, frequency, type, companyContribution, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "CompanyBenefit{benefitId=$benefitId, companyContribution=$companyContribution, description=$description, frequency=$frequency, type=$type, additionalProperties=$additionalProperties}" + "CompanyBenefit{benefitId=$benefitId, description=$description, frequency=$frequency, type=$type, companyContribution=$companyContribution, additionalProperties=$additionalProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt index 80d41eaa..1155b8eb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt @@ -13,6 +13,7 @@ import com.tryfinch.api.core.JsonMissing import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.Params import com.tryfinch.api.core.checkKnown +import com.tryfinch.api.core.checkRequired import com.tryfinch.api.core.http.Headers import com.tryfinch.api.core.http.QueryParams import com.tryfinch.api.core.toImmutable @@ -647,16 +648,16 @@ private constructor( ) : this(tiers, type, mutableMapOf()) /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun tiers(): Optional> = tiers.getOptional("tiers") + fun tiers(): List = tiers.getRequired("tiers") /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun type(): Optional = type.getOptional("type") + fun type(): Type = type.getRequired("type") /** * Returns the raw JSON value of [tiers]. @@ -689,6 +690,12 @@ private constructor( /** * Returns a mutable builder for constructing an instance of * [BenefitCompanyMatchContribution]. + * + * The following fields are required: + * ```java + * .tiers() + * .type() + * ``` */ @JvmStatic fun builder() = Builder() } @@ -697,7 +704,7 @@ private constructor( class Builder internal constructor() { private var tiers: JsonField>? = null - private var type: JsonField = JsonMissing.of() + private var type: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -768,11 +775,19 @@ private constructor( * Returns an immutable instance of [BenefitCompanyMatchContribution]. * * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .tiers() + * .type() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ fun build(): BenefitCompanyMatchContribution = BenefitCompanyMatchContribution( - (tiers ?: JsonMissing.of()).map { it.toImmutable() }, - type, + checkRequired("tiers", tiers).map { it.toImmutable() }, + checkRequired("type", type), additionalProperties.toMutableMap(), ) } @@ -784,8 +799,8 @@ private constructor( return@apply } - tiers().ifPresent { it.forEach { it.validate() } } - type().ifPresent { it.validate() } + tiers().forEach { it.validate() } + type().validate() validated = true } @@ -824,16 +839,18 @@ private constructor( ) : this(match, threshold, mutableMapOf()) /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if - * the server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). */ - fun match(): Optional = match.getOptional("match") + fun match(): Long = match.getRequired("match") /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if - * the server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). */ - fun threshold(): Optional = threshold.getOptional("threshold") + fun threshold(): Long = threshold.getRequired("threshold") /** * Returns the raw JSON value of [match]. @@ -864,15 +881,23 @@ private constructor( companion object { - /** Returns a mutable builder for constructing an instance of [Tier]. */ + /** + * Returns a mutable builder for constructing an instance of [Tier]. + * + * The following fields are required: + * ```java + * .match() + * .threshold() + * ``` + */ @JvmStatic fun builder() = Builder() } /** A builder for [Tier]. */ class Builder internal constructor() { - private var match: JsonField = JsonMissing.of() - private var threshold: JsonField = JsonMissing.of() + private var match: JsonField? = null + private var threshold: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -930,8 +955,21 @@ private constructor( * Returns an immutable instance of [Tier]. * * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .match() + * .threshold() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ - fun build(): Tier = Tier(match, threshold, additionalProperties.toMutableMap()) + fun build(): Tier = + Tier( + checkRequired("match", match), + checkRequired("threshold", threshold), + additionalProperties.toMutableMap(), + ) } private var validated: Boolean = false diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualBenefit.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualBenefit.kt index c42a1109..5254cd90 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualBenefit.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualBenefit.kt @@ -6,11 +6,23 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter import com.fasterxml.jackson.annotation.JsonAnySetter import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.core.JsonGenerator +import com.fasterxml.jackson.core.ObjectCodec +import com.fasterxml.jackson.databind.JsonNode +import com.fasterxml.jackson.databind.SerializerProvider +import com.fasterxml.jackson.databind.annotation.JsonDeserialize +import com.fasterxml.jackson.databind.annotation.JsonSerialize +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import com.tryfinch.api.core.BaseDeserializer +import com.tryfinch.api.core.BaseSerializer import com.tryfinch.api.core.Enum import com.tryfinch.api.core.ExcludeMissing import com.tryfinch.api.core.JsonField import com.tryfinch.api.core.JsonMissing import com.tryfinch.api.core.JsonValue +import com.tryfinch.api.core.allMaxBy +import com.tryfinch.api.core.checkRequired +import com.tryfinch.api.core.getOrThrow import com.tryfinch.api.errors.FinchInvalidDataException import java.util.Collections import java.util.Objects @@ -35,22 +47,22 @@ private constructor( ) : this(body, code, individualId, mutableMapOf()) /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly + * missing or null (e.g. if the server responded with an unexpected value). */ - fun body(): Optional = body.getOptional("body") + fun body(): Body = body.getRequired("body") /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly + * missing or null (e.g. if the server responded with an unexpected value). */ - fun code(): Optional = code.getOptional("code") + fun code(): Long = code.getRequired("code") /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly + * missing or null (e.g. if the server responded with an unexpected value). */ - fun individualId(): Optional = individualId.getOptional("individual_id") + fun individualId(): String = individualId.getRequired("individual_id") /** * Returns the raw JSON value of [body]. @@ -89,16 +101,25 @@ private constructor( companion object { - /** Returns a mutable builder for constructing an instance of [IndividualBenefit]. */ + /** + * Returns a mutable builder for constructing an instance of [IndividualBenefit]. + * + * The following fields are required: + * ```java + * .body() + * .code() + * .individualId() + * ``` + */ @JvmStatic fun builder() = Builder() } /** A builder for [IndividualBenefit]. */ class Builder internal constructor() { - private var body: JsonField = JsonMissing.of() - private var code: JsonField = JsonMissing.of() - private var individualId: JsonField = JsonMissing.of() + private var body: JsonField? = null + private var code: JsonField? = null + private var individualId: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -119,6 +140,12 @@ private constructor( */ fun body(body: JsonField) = apply { this.body = body } + /** Alias for calling [body] with `Body.ofUnionMember0(unionMember0)`. */ + fun body(unionMember0: Body.UnionMember0) = body(Body.ofUnionMember0(unionMember0)) + + /** Alias for calling [body] with `Body.ofBatchError(batchError)`. */ + fun body(batchError: Body.BatchError) = body(Body.ofBatchError(batchError)) + fun code(code: Long) = code(JsonField.of(code)) /** @@ -165,9 +192,23 @@ private constructor( * Returns an immutable instance of [IndividualBenefit]. * * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .body() + * .code() + * .individualId() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ fun build(): IndividualBenefit = - IndividualBenefit(body, code, individualId, additionalProperties.toMutableMap()) + IndividualBenefit( + checkRequired("body", body), + checkRequired("code", code), + checkRequired("individualId", individualId), + additionalProperties.toMutableMap(), + ) } private var validated: Boolean = false @@ -177,7 +218,7 @@ private constructor( return@apply } - body().ifPresent { it.validate() } + body().validate() code() individualId() validated = true @@ -202,457 +243,931 @@ private constructor( (if (code.asKnown().isPresent) 1 else 0) + (if (individualId.asKnown().isPresent) 1 else 0) + @JsonDeserialize(using = Body.Deserializer::class) + @JsonSerialize(using = Body.Serializer::class) class Body private constructor( - private val annualMaximum: JsonField, - private val catchUp: JsonField, - private val companyContribution: JsonField, - private val employeeDeduction: JsonField, - private val hsaContributionLimit: JsonField, - private val additionalProperties: MutableMap, + private val unionMember0: UnionMember0? = null, + private val batchError: BatchError? = null, + private val _json: JsonValue? = null, ) { - @JsonCreator - private constructor( - @JsonProperty("annual_maximum") - @ExcludeMissing - annualMaximum: JsonField = JsonMissing.of(), - @JsonProperty("catch_up") - @ExcludeMissing - catchUp: JsonField = JsonMissing.of(), - @JsonProperty("company_contribution") - @ExcludeMissing - companyContribution: JsonField = JsonMissing.of(), - @JsonProperty("employee_deduction") - @ExcludeMissing - employeeDeduction: JsonField = JsonMissing.of(), - @JsonProperty("hsa_contribution_limit") - @ExcludeMissing - hsaContributionLimit: JsonField = JsonMissing.of(), - ) : this( - annualMaximum, - catchUp, - companyContribution, - employeeDeduction, - hsaContributionLimit, - mutableMapOf(), - ) + fun unionMember0(): Optional = Optional.ofNullable(unionMember0) - /** - * If the benefit supports annual maximum, the amount in cents for this individual. - * - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun annualMaximum(): Optional = annualMaximum.getOptional("annual_maximum") + fun batchError(): Optional = Optional.ofNullable(batchError) - /** - * If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled for this - * individual. - * - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun catchUp(): Optional = catchUp.getOptional("catch_up") + fun isUnionMember0(): Boolean = unionMember0 != null - /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun companyContribution(): Optional = - companyContribution.getOptional("company_contribution") + fun isBatchError(): Boolean = batchError != null - /** - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun employeeDeduction(): Optional = - employeeDeduction.getOptional("employee_deduction") + fun asUnionMember0(): UnionMember0 = unionMember0.getOrThrow("unionMember0") - /** - * Type for HSA contribution limit if the benefit is a HSA. - * - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun hsaContributionLimit(): Optional = - hsaContributionLimit.getOptional("hsa_contribution_limit") + fun asBatchError(): BatchError = batchError.getOrThrow("batchError") - /** - * Returns the raw JSON value of [annualMaximum]. - * - * Unlike [annualMaximum], this method doesn't throw if the JSON field has an unexpected - * type. - */ - @JsonProperty("annual_maximum") - @ExcludeMissing - fun _annualMaximum(): JsonField = annualMaximum + fun _json(): Optional = Optional.ofNullable(_json) - /** - * Returns the raw JSON value of [catchUp]. - * - * Unlike [catchUp], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("catch_up") @ExcludeMissing fun _catchUp(): JsonField = catchUp + fun accept(visitor: Visitor): T = + when { + unionMember0 != null -> visitor.visitUnionMember0(unionMember0) + batchError != null -> visitor.visitBatchError(batchError) + else -> visitor.unknown(_json) + } - /** - * Returns the raw JSON value of [companyContribution]. - * - * Unlike [companyContribution], this method doesn't throw if the JSON field has an - * unexpected type. - */ - @JsonProperty("company_contribution") - @ExcludeMissing - fun _companyContribution(): JsonField = companyContribution + private var validated: Boolean = false - /** - * Returns the raw JSON value of [employeeDeduction]. - * - * Unlike [employeeDeduction], this method doesn't throw if the JSON field has an unexpected - * type. - */ - @JsonProperty("employee_deduction") - @ExcludeMissing - fun _employeeDeduction(): JsonField = employeeDeduction + fun validate(): Body = apply { + if (validated) { + return@apply + } + + accept( + object : Visitor { + override fun visitUnionMember0(unionMember0: UnionMember0) { + unionMember0.validate() + } + + override fun visitBatchError(batchError: BatchError) { + batchError.validate() + } + } + ) + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: FinchInvalidDataException) { + false + } /** - * Returns the raw JSON value of [hsaContributionLimit]. + * Returns a score indicating how many valid values are contained in this object + * recursively. * - * Unlike [hsaContributionLimit], this method doesn't throw if the JSON field has an - * unexpected type. + * Used for best match union deserialization. */ - @JsonProperty("hsa_contribution_limit") - @ExcludeMissing - fun _hsaContributionLimit(): JsonField = hsaContributionLimit + @JvmSynthetic + internal fun validity(): Int = + accept( + object : Visitor { + override fun visitUnionMember0(unionMember0: UnionMember0) = + unionMember0.validity() - @JsonAnySetter - private fun putAdditionalProperty(key: String, value: JsonValue) { - additionalProperties.put(key, value) + override fun visitBatchError(batchError: BatchError) = batchError.validity() + + override fun unknown(json: JsonValue?) = 0 + } + ) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Body && unionMember0 == other.unionMember0 && batchError == other.batchError /* spotless:on */ } - @JsonAnyGetter - @ExcludeMissing - fun _additionalProperties(): Map = - Collections.unmodifiableMap(additionalProperties) + override fun hashCode(): Int = /* spotless:off */ Objects.hash(unionMember0, batchError) /* spotless:on */ - fun toBuilder() = Builder().from(this) + override fun toString(): String = + when { + unionMember0 != null -> "Body{unionMember0=$unionMember0}" + batchError != null -> "Body{batchError=$batchError}" + _json != null -> "Body{_unknown=$_json}" + else -> throw IllegalStateException("Invalid Body") + } companion object { - /** Returns a mutable builder for constructing an instance of [Body]. */ - @JvmStatic fun builder() = Builder() - } + @JvmStatic + fun ofUnionMember0(unionMember0: UnionMember0) = Body(unionMember0 = unionMember0) - /** A builder for [Body]. */ - class Builder internal constructor() { + @JvmStatic fun ofBatchError(batchError: BatchError) = Body(batchError = batchError) + } - private var annualMaximum: JsonField = JsonMissing.of() - private var catchUp: JsonField = JsonMissing.of() - private var companyContribution: JsonField = JsonMissing.of() - private var employeeDeduction: JsonField = JsonMissing.of() - private var hsaContributionLimit: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() + /** An interface that defines how to map each variant of [Body] to a value of type [T]. */ + interface Visitor { - @JvmSynthetic - internal fun from(body: Body) = apply { - annualMaximum = body.annualMaximum - catchUp = body.catchUp - companyContribution = body.companyContribution - employeeDeduction = body.employeeDeduction - hsaContributionLimit = body.hsaContributionLimit - additionalProperties = body.additionalProperties.toMutableMap() - } + fun visitUnionMember0(unionMember0: UnionMember0): T - /** If the benefit supports annual maximum, the amount in cents for this individual. */ - fun annualMaximum(annualMaximum: Long?) = - annualMaximum(JsonField.ofNullable(annualMaximum)) + fun visitBatchError(batchError: BatchError): T /** - * Alias for [Builder.annualMaximum]. + * Maps an unknown variant of [Body] to a value of type [T]. * - * This unboxed primitive overload exists for backwards compatibility. + * An instance of [Body] can contain an unknown variant if it was deserialized from data + * that doesn't match any known variant. For example, if the SDK is on an older version + * than the API, then the API may respond with new variants that the SDK is unaware of. + * + * @throws FinchInvalidDataException in the default implementation. */ - fun annualMaximum(annualMaximum: Long) = annualMaximum(annualMaximum as Long?) + fun unknown(json: JsonValue?): T { + throw FinchInvalidDataException("Unknown Body: $json") + } + } + + internal class Deserializer : BaseDeserializer(Body::class) { + + override fun ObjectCodec.deserialize(node: JsonNode): Body { + val json = JsonValue.fromJsonNode(node) + + val bestMatches = + sequenceOf( + tryDeserialize(node, jacksonTypeRef())?.let { + Body(unionMember0 = it, _json = json) + }, + tryDeserialize(node, jacksonTypeRef())?.let { + Body(batchError = it, _json = json) + }, + ) + .filterNotNull() + .allMaxBy { it.validity() } + .toList() + return when (bestMatches.size) { + // This can happen if what we're deserializing is completely incompatible with + // all the possible variants (e.g. deserializing from boolean). + 0 -> Body(_json = json) + 1 -> bestMatches.single() + // If there's more than one match with the highest validity, then use the first + // completely valid match, or simply the first match if none are completely + // valid. + else -> bestMatches.firstOrNull { it.isValid() } ?: bestMatches.first() + } + } + } + + internal class Serializer : BaseSerializer(Body::class) { + + override fun serialize( + value: Body, + generator: JsonGenerator, + provider: SerializerProvider, + ) { + when { + value.unionMember0 != null -> generator.writeObject(value.unionMember0) + value.batchError != null -> generator.writeObject(value.batchError) + value._json != null -> generator.writeObject(value._json) + else -> throw IllegalStateException("Invalid Body") + } + } + } - /** Alias for calling [Builder.annualMaximum] with `annualMaximum.orElse(null)`. */ - fun annualMaximum(annualMaximum: Optional) = - annualMaximum(annualMaximum.getOrNull()) + class UnionMember0 + private constructor( + private val annualMaximum: JsonField, + private val catchUp: JsonField, + private val companyContribution: JsonField, + private val employeeDeduction: JsonField, + private val hsaContributionLimit: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("annual_maximum") + @ExcludeMissing + annualMaximum: JsonField = JsonMissing.of(), + @JsonProperty("catch_up") + @ExcludeMissing + catchUp: JsonField = JsonMissing.of(), + @JsonProperty("company_contribution") + @ExcludeMissing + companyContribution: JsonField = JsonMissing.of(), + @JsonProperty("employee_deduction") + @ExcludeMissing + employeeDeduction: JsonField = JsonMissing.of(), + @JsonProperty("hsa_contribution_limit") + @ExcludeMissing + hsaContributionLimit: JsonField = JsonMissing.of(), + ) : this( + annualMaximum, + catchUp, + companyContribution, + employeeDeduction, + hsaContributionLimit, + mutableMapOf(), + ) /** - * Sets [Builder.annualMaximum] to an arbitrary JSON value. + * If the benefit supports annual maximum, the amount in cents for this individual. * - * You should usually call [Builder.annualMaximum] with a well-typed [Long] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). */ - fun annualMaximum(annualMaximum: JsonField) = apply { - this.annualMaximum = annualMaximum - } + fun annualMaximum(): Optional = annualMaximum.getOptional("annual_maximum") /** * If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled for * this individual. + * + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). */ - fun catchUp(catchUp: Boolean?) = catchUp(JsonField.ofNullable(catchUp)) + fun catchUp(): Optional = catchUp.getOptional("catch_up") /** - * Alias for [Builder.catchUp]. - * - * This unboxed primitive overload exists for backwards compatibility. + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). */ - fun catchUp(catchUp: Boolean) = catchUp(catchUp as Boolean?) - - /** Alias for calling [Builder.catchUp] with `catchUp.orElse(null)`. */ - fun catchUp(catchUp: Optional) = catchUp(catchUp.getOrNull()) + fun companyContribution(): Optional = + companyContribution.getOptional("company_contribution") /** - * Sets [Builder.catchUp] to an arbitrary JSON value. - * - * You should usually call [Builder.catchUp] with a well-typed [Boolean] value instead. - * This method is primarily for setting the field to an undocumented or not yet - * supported value. + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). */ - fun catchUp(catchUp: JsonField) = apply { this.catchUp = catchUp } - - fun companyContribution(companyContribution: BenefitContribution?) = - companyContribution(JsonField.ofNullable(companyContribution)) + fun employeeDeduction(): Optional = + employeeDeduction.getOptional("employee_deduction") /** - * Alias for calling [Builder.companyContribution] with - * `companyContribution.orElse(null)`. + * Type for HSA contribution limit if the benefit is a HSA. + * + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). */ - fun companyContribution(companyContribution: Optional) = - companyContribution(companyContribution.getOrNull()) + fun hsaContributionLimit(): Optional = + hsaContributionLimit.getOptional("hsa_contribution_limit") /** - * Sets [Builder.companyContribution] to an arbitrary JSON value. + * Returns the raw JSON value of [annualMaximum]. * - * You should usually call [Builder.companyContribution] with a well-typed - * [BenefitContribution] value instead. This method is primarily for setting the field - * to an undocumented or not yet supported value. + * Unlike [annualMaximum], this method doesn't throw if the JSON field has an unexpected + * type. */ - fun companyContribution(companyContribution: JsonField) = apply { - this.companyContribution = companyContribution - } - - fun employeeDeduction(employeeDeduction: BenefitContribution?) = - employeeDeduction(JsonField.ofNullable(employeeDeduction)) + @JsonProperty("annual_maximum") + @ExcludeMissing + fun _annualMaximum(): JsonField = annualMaximum /** - * Alias for calling [Builder.employeeDeduction] with `employeeDeduction.orElse(null)`. + * Returns the raw JSON value of [catchUp]. + * + * Unlike [catchUp], this method doesn't throw if the JSON field has an unexpected type. */ - fun employeeDeduction(employeeDeduction: Optional) = - employeeDeduction(employeeDeduction.getOrNull()) + @JsonProperty("catch_up") @ExcludeMissing fun _catchUp(): JsonField = catchUp /** - * Sets [Builder.employeeDeduction] to an arbitrary JSON value. + * Returns the raw JSON value of [companyContribution]. * - * You should usually call [Builder.employeeDeduction] with a well-typed - * [BenefitContribution] value instead. This method is primarily for setting the field - * to an undocumented or not yet supported value. + * Unlike [companyContribution], this method doesn't throw if the JSON field has an + * unexpected type. */ - fun employeeDeduction(employeeDeduction: JsonField) = apply { - this.employeeDeduction = employeeDeduction - } - - /** Type for HSA contribution limit if the benefit is a HSA. */ - fun hsaContributionLimit(hsaContributionLimit: HsaContributionLimit?) = - hsaContributionLimit(JsonField.ofNullable(hsaContributionLimit)) + @JsonProperty("company_contribution") + @ExcludeMissing + fun _companyContribution(): JsonField = companyContribution /** - * Alias for calling [Builder.hsaContributionLimit] with - * `hsaContributionLimit.orElse(null)`. + * Returns the raw JSON value of [employeeDeduction]. + * + * Unlike [employeeDeduction], this method doesn't throw if the JSON field has an + * unexpected type. */ - fun hsaContributionLimit(hsaContributionLimit: Optional) = - hsaContributionLimit(hsaContributionLimit.getOrNull()) + @JsonProperty("employee_deduction") + @ExcludeMissing + fun _employeeDeduction(): JsonField = employeeDeduction /** - * Sets [Builder.hsaContributionLimit] to an arbitrary JSON value. + * Returns the raw JSON value of [hsaContributionLimit]. * - * You should usually call [Builder.hsaContributionLimit] with a well-typed - * [HsaContributionLimit] value instead. This method is primarily for setting the field - * to an undocumented or not yet supported value. + * Unlike [hsaContributionLimit], this method doesn't throw if the JSON field has an + * unexpected type. */ - fun hsaContributionLimit(hsaContributionLimit: JsonField) = - apply { - this.hsaContributionLimit = hsaContributionLimit - } + @JsonProperty("hsa_contribution_limit") + @ExcludeMissing + fun _hsaContributionLimit(): JsonField = hsaContributionLimit - fun additionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.clear() - putAllAdditionalProperties(additionalProperties) + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) } - fun putAdditionalProperty(key: String, value: JsonValue) = apply { - additionalProperties.put(key, value) + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [UnionMember0]. + * + * The following fields are required: + * ```java + * .annualMaximum() + * .catchUp() + * .companyContribution() + * .employeeDeduction() + * ``` + */ + @JvmStatic fun builder() = Builder() } - fun putAllAdditionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.putAll(additionalProperties) + /** A builder for [UnionMember0]. */ + class Builder internal constructor() { + + private var annualMaximum: JsonField? = null + private var catchUp: JsonField? = null + private var companyContribution: JsonField? = null + private var employeeDeduction: JsonField? = null + private var hsaContributionLimit: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(unionMember0: UnionMember0) = apply { + annualMaximum = unionMember0.annualMaximum + catchUp = unionMember0.catchUp + companyContribution = unionMember0.companyContribution + employeeDeduction = unionMember0.employeeDeduction + hsaContributionLimit = unionMember0.hsaContributionLimit + additionalProperties = unionMember0.additionalProperties.toMutableMap() + } + + /** + * If the benefit supports annual maximum, the amount in cents for this individual. + */ + fun annualMaximum(annualMaximum: Long?) = + annualMaximum(JsonField.ofNullable(annualMaximum)) + + /** + * Alias for [Builder.annualMaximum]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun annualMaximum(annualMaximum: Long) = annualMaximum(annualMaximum as Long?) + + /** Alias for calling [Builder.annualMaximum] with `annualMaximum.orElse(null)`. */ + fun annualMaximum(annualMaximum: Optional) = + annualMaximum(annualMaximum.getOrNull()) + + /** + * Sets [Builder.annualMaximum] to an arbitrary JSON value. + * + * You should usually call [Builder.annualMaximum] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun annualMaximum(annualMaximum: JsonField) = apply { + this.annualMaximum = annualMaximum + } + + /** + * If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled + * for this individual. + */ + fun catchUp(catchUp: Boolean?) = catchUp(JsonField.ofNullable(catchUp)) + + /** + * Alias for [Builder.catchUp]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun catchUp(catchUp: Boolean) = catchUp(catchUp as Boolean?) + + /** Alias for calling [Builder.catchUp] with `catchUp.orElse(null)`. */ + fun catchUp(catchUp: Optional) = catchUp(catchUp.getOrNull()) + + /** + * Sets [Builder.catchUp] to an arbitrary JSON value. + * + * You should usually call [Builder.catchUp] with a well-typed [Boolean] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun catchUp(catchUp: JsonField) = apply { this.catchUp = catchUp } + + fun companyContribution(companyContribution: BenefitContribution?) = + companyContribution(JsonField.ofNullable(companyContribution)) + + /** + * Alias for calling [Builder.companyContribution] with + * `companyContribution.orElse(null)`. + */ + fun companyContribution(companyContribution: Optional) = + companyContribution(companyContribution.getOrNull()) + + /** + * Sets [Builder.companyContribution] to an arbitrary JSON value. + * + * You should usually call [Builder.companyContribution] with a well-typed + * [BenefitContribution] value instead. This method is primarily for setting the + * field to an undocumented or not yet supported value. + */ + fun companyContribution(companyContribution: JsonField) = + apply { + this.companyContribution = companyContribution + } + + fun employeeDeduction(employeeDeduction: BenefitContribution?) = + employeeDeduction(JsonField.ofNullable(employeeDeduction)) + + /** + * Alias for calling [Builder.employeeDeduction] with + * `employeeDeduction.orElse(null)`. + */ + fun employeeDeduction(employeeDeduction: Optional) = + employeeDeduction(employeeDeduction.getOrNull()) + + /** + * Sets [Builder.employeeDeduction] to an arbitrary JSON value. + * + * You should usually call [Builder.employeeDeduction] with a well-typed + * [BenefitContribution] value instead. This method is primarily for setting the + * field to an undocumented or not yet supported value. + */ + fun employeeDeduction(employeeDeduction: JsonField) = apply { + this.employeeDeduction = employeeDeduction + } + + /** Type for HSA contribution limit if the benefit is a HSA. */ + fun hsaContributionLimit(hsaContributionLimit: HsaContributionLimit?) = + hsaContributionLimit(JsonField.ofNullable(hsaContributionLimit)) + + /** + * Alias for calling [Builder.hsaContributionLimit] with + * `hsaContributionLimit.orElse(null)`. + */ + fun hsaContributionLimit(hsaContributionLimit: Optional) = + hsaContributionLimit(hsaContributionLimit.getOrNull()) + + /** + * Sets [Builder.hsaContributionLimit] to an arbitrary JSON value. + * + * You should usually call [Builder.hsaContributionLimit] with a well-typed + * [HsaContributionLimit] value instead. This method is primarily for setting the + * field to an undocumented or not yet supported value. + */ + fun hsaContributionLimit(hsaContributionLimit: JsonField) = + apply { + this.hsaContributionLimit = hsaContributionLimit + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [UnionMember0]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .annualMaximum() + * .catchUp() + * .companyContribution() + * .employeeDeduction() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): UnionMember0 = + UnionMember0( + checkRequired("annualMaximum", annualMaximum), + checkRequired("catchUp", catchUp), + checkRequired("companyContribution", companyContribution), + checkRequired("employeeDeduction", employeeDeduction), + hsaContributionLimit, + additionalProperties.toMutableMap(), + ) } - fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + private var validated: Boolean = false - fun removeAllAdditionalProperties(keys: Set) = apply { - keys.forEach(::removeAdditionalProperty) + fun validate(): UnionMember0 = apply { + if (validated) { + return@apply + } + + annualMaximum() + catchUp() + companyContribution().ifPresent { it.validate() } + employeeDeduction().ifPresent { it.validate() } + hsaContributionLimit().ifPresent { it.validate() } + validated = true } + fun isValid(): Boolean = + try { + validate() + true + } catch (e: FinchInvalidDataException) { + false + } + /** - * Returns an immutable instance of [Body]. + * Returns a score indicating how many valid values are contained in this object + * recursively. * - * Further updates to this [Builder] will not mutate the returned instance. + * Used for best match union deserialization. */ - fun build(): Body = - Body( - annualMaximum, - catchUp, - companyContribution, - employeeDeduction, - hsaContributionLimit, - additionalProperties.toMutableMap(), - ) - } + @JvmSynthetic + internal fun validity(): Int = + (if (annualMaximum.asKnown().isPresent) 1 else 0) + + (if (catchUp.asKnown().isPresent) 1 else 0) + + (companyContribution.asKnown().getOrNull()?.validity() ?: 0) + + (employeeDeduction.asKnown().getOrNull()?.validity() ?: 0) + + (hsaContributionLimit.asKnown().getOrNull()?.validity() ?: 0) - private var validated: Boolean = false + /** Type for HSA contribution limit if the benefit is a HSA. */ + class HsaContributionLimit + @JsonCreator + private constructor(private val value: JsonField) : Enum { - fun validate(): Body = apply { - if (validated) { - return@apply - } + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - annualMaximum() - catchUp() - companyContribution().ifPresent { it.validate() } - employeeDeduction().ifPresent { it.validate() } - hsaContributionLimit().ifPresent { it.validate() } - validated = true - } + companion object { - fun isValid(): Boolean = - try { - validate() - true - } catch (e: FinchInvalidDataException) { - false - } + @JvmField val INDIVIDUAL = of("individual") - /** - * Returns a score indicating how many valid values are contained in this object - * recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic - internal fun validity(): Int = - (if (annualMaximum.asKnown().isPresent) 1 else 0) + - (if (catchUp.asKnown().isPresent) 1 else 0) + - (companyContribution.asKnown().getOrNull()?.validity() ?: 0) + - (employeeDeduction.asKnown().getOrNull()?.validity() ?: 0) + - (hsaContributionLimit.asKnown().getOrNull()?.validity() ?: 0) + @JvmField val FAMILY = of("family") - /** Type for HSA contribution limit if the benefit is a HSA. */ - class HsaContributionLimit - @JsonCreator - private constructor(private val value: JsonField) : Enum { + @JvmStatic fun of(value: String) = HsaContributionLimit(JsonField.of(value)) + } - /** - * Returns this class instance's raw value. - * - * This is usually only useful if this instance was deserialized from data that doesn't - * match any known member, and you want to know that value. For example, if the SDK is - * on an older version than the API, then the API may respond with new members that the - * SDK is unaware of. - */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + /** An enum containing [HsaContributionLimit]'s known values. */ + enum class Known { + INDIVIDUAL, + FAMILY, + } - companion object { + /** + * An enum containing [HsaContributionLimit]'s known values, as well as an + * [_UNKNOWN] member. + * + * An instance of [HsaContributionLimit] can contain an unknown value in a couple of + * cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + INDIVIDUAL, + FAMILY, + /** + * An enum member indicating that [HsaContributionLimit] was instantiated with + * an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + INDIVIDUAL -> Value.INDIVIDUAL + FAMILY -> Value.FAMILY + else -> Value._UNKNOWN + } - @JvmField val INDIVIDUAL = of("individual") + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws FinchInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + INDIVIDUAL -> Known.INDIVIDUAL + FAMILY -> Known.FAMILY + else -> + throw FinchInvalidDataException("Unknown HsaContributionLimit: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws FinchInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + FinchInvalidDataException("Value is not a String") + } - @JvmField val FAMILY = of("family") + private var validated: Boolean = false + + fun validate(): HsaContributionLimit = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: FinchInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HsaContributionLimit && value == other.value /* spotless:on */ + } - @JvmStatic fun of(value: String) = HsaContributionLimit(JsonField.of(value)) + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } - /** An enum containing [HsaContributionLimit]'s known values. */ - enum class Known { - INDIVIDUAL, - FAMILY, + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is UnionMember0 && annualMaximum == other.annualMaximum && catchUp == other.catchUp && companyContribution == other.companyContribution && employeeDeduction == other.employeeDeduction && hsaContributionLimit == other.hsaContributionLimit && additionalProperties == other.additionalProperties /* spotless:on */ } + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(annualMaximum, catchUp, companyContribution, employeeDeduction, hsaContributionLimit, additionalProperties) } + /* spotless:on */ + + override fun hashCode(): Int = hashCode + + override fun toString() = + "UnionMember0{annualMaximum=$annualMaximum, catchUp=$catchUp, companyContribution=$companyContribution, employeeDeduction=$employeeDeduction, hsaContributionLimit=$hsaContributionLimit, additionalProperties=$additionalProperties}" + } + + class BatchError + private constructor( + private val code: JsonField, + private val message: JsonField, + private val name: JsonField, + private val finchCode: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("code") @ExcludeMissing code: JsonField = JsonMissing.of(), + @JsonProperty("message") + @ExcludeMissing + message: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + @JsonProperty("finch_code") + @ExcludeMissing + finchCode: JsonField = JsonMissing.of(), + ) : this(code, message, name, finchCode, mutableMapOf()) + /** - * An enum containing [HsaContributionLimit]'s known values, as well as an [_UNKNOWN] - * member. - * - * An instance of [HsaContributionLimit] can contain an unknown value in a couple of - * cases: - * - It was deserialized from data that doesn't match any known member. For example, if - * the SDK is on an older version than the API, then the API may respond with new - * members that the SDK is unaware of. - * - It was constructed with an arbitrary value using the [of] method. + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). */ - enum class Value { - INDIVIDUAL, - FAMILY, - /** - * An enum member indicating that [HsaContributionLimit] was instantiated with an - * unknown value. - */ - _UNKNOWN, - } + fun code(): Double = code.getRequired("code") /** - * Returns an enum member corresponding to this class instance's value, or - * [Value._UNKNOWN] if the class was instantiated with an unknown value. - * - * Use the [known] method instead if you're certain the value is always known or if you - * want to throw for the unknown case. + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). */ - fun value(): Value = - when (this) { - INDIVIDUAL -> Value.INDIVIDUAL - FAMILY -> Value.FAMILY - else -> Value._UNKNOWN - } + fun message(): String = message.getRequired("message") + + /** + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). + */ + fun name(): String = name.getRequired("name") /** - * Returns an enum member corresponding to this class instance's value. + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun finchCode(): Optional = finchCode.getOptional("finch_code") + + /** + * Returns the raw JSON value of [code]. * - * Use the [value] method instead if you're uncertain the value is always known and - * don't want to throw for the unknown case. + * Unlike [code], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("code") @ExcludeMissing fun _code(): JsonField = code + + /** + * Returns the raw JSON value of [message]. * - * @throws FinchInvalidDataException if this class instance's value is a not a known - * member. + * Unlike [message], this method doesn't throw if the JSON field has an unexpected type. */ - fun known(): Known = - when (this) { - INDIVIDUAL -> Known.INDIVIDUAL - FAMILY -> Known.FAMILY - else -> throw FinchInvalidDataException("Unknown HsaContributionLimit: $value") - } + @JsonProperty("message") @ExcludeMissing fun _message(): JsonField = message /** - * Returns this class instance's primitive wire representation. + * Returns the raw JSON value of [name]. * - * This differs from the [toString] method because that method is primarily for - * debugging and generally doesn't throw. + * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + + /** + * Returns the raw JSON value of [finchCode]. * - * @throws FinchInvalidDataException if this class instance's value does not have the - * expected primitive type. + * Unlike [finchCode], this method doesn't throw if the JSON field has an unexpected + * type. */ - fun asString(): String = - _value().asString().orElseThrow { - FinchInvalidDataException("Value is not a String") + @JsonProperty("finch_code") + @ExcludeMissing + fun _finchCode(): JsonField = finchCode + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [BatchError]. + * + * The following fields are required: + * ```java + * .code() + * .message() + * .name() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [BatchError]. */ + class Builder internal constructor() { + + private var code: JsonField? = null + private var message: JsonField? = null + private var name: JsonField? = null + private var finchCode: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(batchError: BatchError) = apply { + code = batchError.code + message = batchError.message + name = batchError.name + finchCode = batchError.finchCode + additionalProperties = batchError.additionalProperties.toMutableMap() + } + + fun code(code: Double) = code(JsonField.of(code)) + + /** + * Sets [Builder.code] to an arbitrary JSON value. + * + * You should usually call [Builder.code] with a well-typed [Double] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun code(code: JsonField) = apply { this.code = code } + + fun message(message: String) = message(JsonField.of(message)) + + /** + * Sets [Builder.message] to an arbitrary JSON value. + * + * You should usually call [Builder.message] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun message(message: JsonField) = apply { this.message = message } + + fun name(name: String) = name(JsonField.of(name)) + + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun name(name: JsonField) = apply { this.name = name } + + fun finchCode(finchCode: String) = finchCode(JsonField.of(finchCode)) + + /** + * Sets [Builder.finchCode] to an arbitrary JSON value. + * + * You should usually call [Builder.finchCode] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun finchCode(finchCode: JsonField) = apply { this.finchCode = finchCode } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) } + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [BatchError]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .code() + * .message() + * .name() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): BatchError = + BatchError( + checkRequired("code", code), + checkRequired("message", message), + checkRequired("name", name), + finchCode, + additionalProperties.toMutableMap(), + ) + } + private var validated: Boolean = false - fun validate(): HsaContributionLimit = apply { + fun validate(): BatchError = apply { if (validated) { return@apply } - known() + code() + message() + name() + finchCode() validated = true } @@ -670,37 +1185,30 @@ private constructor( * * Used for best match union deserialization. */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + @JvmSynthetic + internal fun validity(): Int = + (if (code.asKnown().isPresent) 1 else 0) + + (if (message.asKnown().isPresent) 1 else 0) + + (if (name.asKnown().isPresent) 1 else 0) + + (if (finchCode.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { if (this === other) { return true } - return /* spotless:off */ other is HsaContributionLimit && value == other.value /* spotless:on */ + return /* spotless:off */ other is BatchError && code == other.code && message == other.message && name == other.name && finchCode == other.finchCode && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - } + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(code, message, name, finchCode, additionalProperties) } + /* spotless:on */ - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } + override fun hashCode(): Int = hashCode - return /* spotless:off */ other is Body && annualMaximum == other.annualMaximum && catchUp == other.catchUp && companyContribution == other.companyContribution && employeeDeduction == other.employeeDeduction && hsaContributionLimit == other.hsaContributionLimit && additionalProperties == other.additionalProperties /* spotless:on */ + override fun toString() = + "BatchError{code=$code, message=$message, name=$name, finchCode=$finchCode, additionalProperties=$additionalProperties}" } - - /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(annualMaximum, catchUp, companyContribution, employeeDeduction, hsaContributionLimit, additionalProperties) } - /* spotless:on */ - - override fun hashCode(): Int = hashCode - - override fun toString() = - "Body{annualMaximum=$annualMaximum, catchUp=$catchUp, companyContribution=$companyContribution, employeeDeduction=$employeeDeduction, hsaContributionLimit=$hsaContributionLimit, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportedBenefit.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportedBenefit.kt index c5160b47..3e132efd 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportedBenefit.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportedBenefit.kt @@ -12,6 +12,7 @@ import com.tryfinch.api.core.JsonField import com.tryfinch.api.core.JsonMissing import com.tryfinch.api.core.JsonValue import com.tryfinch.api.core.checkKnown +import com.tryfinch.api.core.checkRequired import com.tryfinch.api.core.toImmutable import com.tryfinch.api.errors.FinchInvalidDataException import java.util.Collections @@ -22,11 +23,11 @@ import kotlin.jvm.optionals.getOrNull class SupportedBenefit private constructor( private val annualMaximum: JsonField, - private val catchUp: JsonField, private val companyContribution: JsonField>, private val description: JsonField, private val employeeDeduction: JsonField>, private val frequencies: JsonField>, + private val catchUp: JsonField, private val hsaContributionLimit: JsonField>, private val additionalProperties: MutableMap, ) { @@ -36,7 +37,6 @@ private constructor( @JsonProperty("annual_maximum") @ExcludeMissing annualMaximum: JsonField = JsonMissing.of(), - @JsonProperty("catch_up") @ExcludeMissing catchUp: JsonField = JsonMissing.of(), @JsonProperty("company_contribution") @ExcludeMissing companyContribution: JsonField> = JsonMissing.of(), @@ -49,16 +49,17 @@ private constructor( @JsonProperty("frequencies") @ExcludeMissing frequencies: JsonField> = JsonMissing.of(), + @JsonProperty("catch_up") @ExcludeMissing catchUp: JsonField = JsonMissing.of(), @JsonProperty("hsa_contribution_limit") @ExcludeMissing hsaContributionLimit: JsonField> = JsonMissing.of(), ) : this( annualMaximum, - catchUp, companyContribution, description, employeeDeduction, frequencies, + catchUp, hsaContributionLimit, mutableMapOf(), ) @@ -71,15 +72,6 @@ private constructor( */ fun annualMaximum(): Optional = annualMaximum.getOptional("annual_maximum") - /** - * Whether the provider supports catch up for this benefit. This field will only be true for - * retirement benefits. - * - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun catchUp(): Optional = catchUp.getOptional("catch_up") - /** * Supported contribution types. An empty array indicates contributions are not supported. * @@ -107,10 +99,19 @@ private constructor( /** * The list of frequencies supported by the provider for this benefit * + * @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly + * missing or null (e.g. if the server responded with an unexpected value). + */ + fun frequencies(): List = frequencies.getRequired("frequencies") + + /** + * Whether the provider supports catch up for this benefit. This field will only be true for + * retirement benefits. + * * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ - fun frequencies(): Optional> = frequencies.getOptional("frequencies") + fun catchUp(): Optional = catchUp.getOptional("catch_up") /** * Whether the provider supports HSA contribution limits. Empty if this feature is not supported @@ -131,13 +132,6 @@ private constructor( @ExcludeMissing fun _annualMaximum(): JsonField = annualMaximum - /** - * Returns the raw JSON value of [catchUp]. - * - * Unlike [catchUp], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("catch_up") @ExcludeMissing fun _catchUp(): JsonField = catchUp - /** * Returns the raw JSON value of [companyContribution]. * @@ -174,6 +168,13 @@ private constructor( @ExcludeMissing fun _frequencies(): JsonField> = frequencies + /** + * Returns the raw JSON value of [catchUp]. + * + * Unlike [catchUp], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("catch_up") @ExcludeMissing fun _catchUp(): JsonField = catchUp + /** * Returns the raw JSON value of [hsaContributionLimit]. * @@ -198,30 +199,41 @@ private constructor( companion object { - /** Returns a mutable builder for constructing an instance of [SupportedBenefit]. */ + /** + * Returns a mutable builder for constructing an instance of [SupportedBenefit]. + * + * The following fields are required: + * ```java + * .annualMaximum() + * .companyContribution() + * .description() + * .employeeDeduction() + * .frequencies() + * ``` + */ @JvmStatic fun builder() = Builder() } /** A builder for [SupportedBenefit]. */ class Builder internal constructor() { - private var annualMaximum: JsonField = JsonMissing.of() - private var catchUp: JsonField = JsonMissing.of() + private var annualMaximum: JsonField? = null private var companyContribution: JsonField>? = null - private var description: JsonField = JsonMissing.of() + private var description: JsonField? = null private var employeeDeduction: JsonField>? = null private var frequencies: JsonField>? = null + private var catchUp: JsonField = JsonMissing.of() private var hsaContributionLimit: JsonField>? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(supportedBenefit: SupportedBenefit) = apply { annualMaximum = supportedBenefit.annualMaximum - catchUp = supportedBenefit.catchUp companyContribution = supportedBenefit.companyContribution.map { it.toMutableList() } description = supportedBenefit.description employeeDeduction = supportedBenefit.employeeDeduction.map { it.toMutableList() } frequencies = supportedBenefit.frequencies.map { it.toMutableList() } + catchUp = supportedBenefit.catchUp hsaContributionLimit = supportedBenefit.hsaContributionLimit.map { it.toMutableList() } additionalProperties = supportedBenefit.additionalProperties.toMutableMap() } @@ -252,30 +264,6 @@ private constructor( this.annualMaximum = annualMaximum } - /** - * Whether the provider supports catch up for this benefit. This field will only be true for - * retirement benefits. - */ - fun catchUp(catchUp: Boolean?) = catchUp(JsonField.ofNullable(catchUp)) - - /** - * Alias for [Builder.catchUp]. - * - * This unboxed primitive overload exists for backwards compatibility. - */ - fun catchUp(catchUp: Boolean) = catchUp(catchUp as Boolean?) - - /** Alias for calling [Builder.catchUp] with `catchUp.orElse(null)`. */ - fun catchUp(catchUp: Optional) = catchUp(catchUp.getOrNull()) - - /** - * Sets [Builder.catchUp] to an arbitrary JSON value. - * - * You should usually call [Builder.catchUp] with a well-typed [Boolean] value instead. This - * method is primarily for setting the field to an undocumented or not yet supported value. - */ - fun catchUp(catchUp: JsonField) = apply { this.catchUp = catchUp } - /** * Supported contribution types. An empty array indicates contributions are not supported. */ @@ -384,6 +372,30 @@ private constructor( } } + /** + * Whether the provider supports catch up for this benefit. This field will only be true for + * retirement benefits. + */ + fun catchUp(catchUp: Boolean?) = catchUp(JsonField.ofNullable(catchUp)) + + /** + * Alias for [Builder.catchUp]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun catchUp(catchUp: Boolean) = catchUp(catchUp as Boolean?) + + /** Alias for calling [Builder.catchUp] with `catchUp.orElse(null)`. */ + fun catchUp(catchUp: Optional) = catchUp(catchUp.getOrNull()) + + /** + * Sets [Builder.catchUp] to an arbitrary JSON value. + * + * You should usually call [Builder.catchUp] with a well-typed [Boolean] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun catchUp(catchUp: JsonField) = apply { this.catchUp = catchUp } + /** * Whether the provider supports HSA contribution limits. Empty if this feature is not * supported for the benefit. This array only has values for HSA benefits. @@ -445,15 +457,26 @@ private constructor( * Returns an immutable instance of [SupportedBenefit]. * * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .annualMaximum() + * .companyContribution() + * .description() + * .employeeDeduction() + * .frequencies() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ fun build(): SupportedBenefit = SupportedBenefit( - annualMaximum, + checkRequired("annualMaximum", annualMaximum), + checkRequired("companyContribution", companyContribution).map { it.toImmutable() }, + checkRequired("description", description), + checkRequired("employeeDeduction", employeeDeduction).map { it.toImmutable() }, + checkRequired("frequencies", frequencies).map { it.toImmutable() }, catchUp, - (companyContribution ?: JsonMissing.of()).map { it.toImmutable() }, - description, - (employeeDeduction ?: JsonMissing.of()).map { it.toImmutable() }, - (frequencies ?: JsonMissing.of()).map { it.toImmutable() }, (hsaContributionLimit ?: JsonMissing.of()).map { it.toImmutable() }, additionalProperties.toMutableMap(), ) @@ -467,11 +490,11 @@ private constructor( } annualMaximum() - catchUp() companyContribution().ifPresent { it.forEach { it?.validate() } } description() employeeDeduction().ifPresent { it.forEach { it?.validate() } } - frequencies().ifPresent { it.forEach { it?.validate() } } + frequencies().forEach { it?.validate() } + catchUp() hsaContributionLimit().ifPresent { it.forEach { it?.validate() } } validated = true } @@ -492,13 +515,13 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (if (annualMaximum.asKnown().isPresent) 1 else 0) + - (if (catchUp.asKnown().isPresent) 1 else 0) + (companyContribution.asKnown().getOrNull()?.sumOf { (it?.validity() ?: 0).toInt() } ?: 0) + (if (description.asKnown().isPresent) 1 else 0) + (employeeDeduction.asKnown().getOrNull()?.sumOf { (it?.validity() ?: 0).toInt() } ?: 0) + (frequencies.asKnown().getOrNull()?.sumOf { (it?.validity() ?: 0).toInt() } ?: 0) + + (if (catchUp.asKnown().isPresent) 1 else 0) + (hsaContributionLimit.asKnown().getOrNull()?.sumOf { (it?.validity() ?: 0).toInt() } ?: 0) @@ -775,17 +798,17 @@ private constructor( companion object { - @JvmField val INDIVIDUAL = of("individual") - @JvmField val FAMILY = of("family") + @JvmField val INDIVIDUAL = of("individual") + @JvmStatic fun of(value: String) = HsaContributionLimit(JsonField.of(value)) } /** An enum containing [HsaContributionLimit]'s known values. */ enum class Known { - INDIVIDUAL, FAMILY, + INDIVIDUAL, } /** @@ -799,8 +822,8 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { - INDIVIDUAL, FAMILY, + INDIVIDUAL, /** * An enum member indicating that [HsaContributionLimit] was instantiated with an * unknown value. @@ -817,8 +840,8 @@ private constructor( */ fun value(): Value = when (this) { - INDIVIDUAL -> Value.INDIVIDUAL FAMILY -> Value.FAMILY + INDIVIDUAL -> Value.INDIVIDUAL else -> Value._UNKNOWN } @@ -832,8 +855,8 @@ private constructor( */ fun known(): Known = when (this) { - INDIVIDUAL -> Known.INDIVIDUAL FAMILY -> Known.FAMILY + INDIVIDUAL -> Known.INDIVIDUAL else -> throw FinchInvalidDataException("Unknown HsaContributionLimit: $value") } @@ -894,15 +917,15 @@ private constructor( return true } - return /* spotless:off */ other is SupportedBenefit && annualMaximum == other.annualMaximum && catchUp == other.catchUp && companyContribution == other.companyContribution && description == other.description && employeeDeduction == other.employeeDeduction && frequencies == other.frequencies && hsaContributionLimit == other.hsaContributionLimit && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedBenefit && annualMaximum == other.annualMaximum && companyContribution == other.companyContribution && description == other.description && employeeDeduction == other.employeeDeduction && frequencies == other.frequencies && catchUp == other.catchUp && hsaContributionLimit == other.hsaContributionLimit && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(annualMaximum, catchUp, companyContribution, description, employeeDeduction, frequencies, hsaContributionLimit, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(annualMaximum, companyContribution, description, employeeDeduction, frequencies, catchUp, hsaContributionLimit, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "SupportedBenefit{annualMaximum=$annualMaximum, catchUp=$catchUp, companyContribution=$companyContribution, description=$description, employeeDeduction=$employeeDeduction, frequencies=$frequencies, hsaContributionLimit=$hsaContributionLimit, additionalProperties=$additionalProperties}" + "SupportedBenefit{annualMaximum=$annualMaximum, companyContribution=$companyContribution, description=$description, employeeDeduction=$employeeDeduction, frequencies=$frequencies, catchUp=$catchUp, hsaContributionLimit=$hsaContributionLimit, additionalProperties=$additionalProperties}" } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AccountUpdateEventTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AccountUpdateEventTest.kt index a4782b0f..2ebf051e 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AccountUpdateEventTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AccountUpdateEventTest.kt @@ -27,7 +27,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -36,10 +35,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -70,7 +72,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -79,10 +80,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -113,7 +117,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -122,10 +125,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -156,7 +162,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -165,10 +170,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -199,7 +207,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -208,10 +215,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -242,7 +252,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -251,10 +260,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -285,7 +297,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -294,10 +305,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -328,7 +342,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -337,10 +350,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -371,7 +387,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -380,10 +395,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -414,7 +432,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -423,10 +440,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -457,7 +477,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -466,10 +485,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -500,7 +522,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -509,10 +530,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -930,7 +954,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -938,10 +961,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -972,7 +995,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -980,10 +1002,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1014,7 +1036,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1022,10 +1043,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1056,7 +1077,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1064,10 +1084,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1098,7 +1118,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1106,10 +1125,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1140,7 +1159,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1148,10 +1166,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1182,7 +1200,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1190,10 +1207,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1224,7 +1241,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1232,10 +1248,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1266,7 +1282,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1274,10 +1289,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1308,7 +1323,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1316,10 +1330,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1350,7 +1364,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1358,10 +1371,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1392,7 +1405,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1400,10 +1412,10 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1813,7 +1825,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1822,10 +1833,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1856,7 +1870,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1865,10 +1878,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1899,7 +1915,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1908,10 +1923,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1942,7 +1960,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1951,10 +1968,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1985,7 +2005,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1994,10 +2013,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -2028,7 +2050,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -2037,10 +2058,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -2071,7 +2095,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -2080,10 +2103,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -2114,7 +2140,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -2123,10 +2148,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -2157,7 +2185,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -2166,10 +2193,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -2200,7 +2230,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -2209,10 +2238,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -2243,7 +2275,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -2252,10 +2283,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -2286,7 +2320,6 @@ internal class AccountUpdateEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -2295,10 +2328,13 @@ internal class AccountUpdateEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitFeaturesAndOperationsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitFeaturesAndOperationsTest.kt index 9de222bf..e8f9ac20 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitFeaturesAndOperationsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitFeaturesAndOperationsTest.kt @@ -16,12 +16,12 @@ internal class BenefitFeaturesAndOperationsTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.INDIVIDUAL) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -50,12 +50,12 @@ internal class BenefitFeaturesAndOperationsTest { .contains( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.INDIVIDUAL) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) assertThat(benefitFeaturesAndOperations.supportedOperations()) @@ -89,12 +89,12 @@ internal class BenefitFeaturesAndOperationsTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.INDIVIDUAL) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitsSupportTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitsSupportTest.kt index 9eb14c5c..3aa6d0e1 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitsSupportTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitsSupportTest.kt @@ -18,13 +18,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -55,13 +55,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -92,13 +92,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -129,13 +129,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -166,13 +166,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -203,13 +203,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -240,13 +240,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -277,13 +277,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -314,13 +314,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -351,13 +351,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -388,13 +388,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -425,13 +425,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -465,14 +465,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -503,14 +501,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -541,14 +537,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -579,14 +573,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -617,14 +609,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -655,14 +645,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -693,14 +681,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -731,14 +717,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -769,14 +753,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -807,14 +789,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -845,14 +825,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -883,14 +861,12 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL - ) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() ) .supportedOperations( @@ -927,13 +903,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -964,13 +940,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1001,13 +977,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1038,13 +1014,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1075,13 +1051,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1112,13 +1088,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1149,13 +1125,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1186,13 +1162,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1223,13 +1199,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1260,13 +1236,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1297,13 +1273,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1334,13 +1310,13 @@ internal class BenefitsSupportTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/CompanyBenefitTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/CompanyBenefitTest.kt index 17bf547a..e9212c35 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/CompanyBenefitTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/CompanyBenefitTest.kt @@ -14,6 +14,9 @@ internal class CompanyBenefitTest { val companyBenefit = CompanyBenefit.builder() .benefitId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .description("description") + .frequency(BenefitFrequency.EVERY_PAYCHECK) + .type(BenefitType._457) .companyContribution( CompanyBenefit.BenefitCompanyMatchContribution.builder() .addTier( @@ -25,12 +28,12 @@ internal class CompanyBenefitTest { .type(CompanyBenefit.BenefitCompanyMatchContribution.Type.MATCH) .build() ) - .description("description") - .frequency(BenefitFrequency.ONE_TIME) - .type(BenefitType._457) .build() assertThat(companyBenefit.benefitId()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + assertThat(companyBenefit.description()).contains("description") + assertThat(companyBenefit.frequency()).contains(BenefitFrequency.EVERY_PAYCHECK) + assertThat(companyBenefit.type()).contains(BenefitType._457) assertThat(companyBenefit.companyContribution()) .contains( CompanyBenefit.BenefitCompanyMatchContribution.builder() @@ -43,9 +46,6 @@ internal class CompanyBenefitTest { .type(CompanyBenefit.BenefitCompanyMatchContribution.Type.MATCH) .build() ) - assertThat(companyBenefit.description()).contains("description") - assertThat(companyBenefit.frequency()).contains(BenefitFrequency.ONE_TIME) - assertThat(companyBenefit.type()).contains(BenefitType._457) } @Test @@ -54,6 +54,9 @@ internal class CompanyBenefitTest { val companyBenefit = CompanyBenefit.builder() .benefitId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .description("description") + .frequency(BenefitFrequency.EVERY_PAYCHECK) + .type(BenefitType._457) .companyContribution( CompanyBenefit.BenefitCompanyMatchContribution.builder() .addTier( @@ -65,9 +68,6 @@ internal class CompanyBenefitTest { .type(CompanyBenefit.BenefitCompanyMatchContribution.Type.MATCH) .build() ) - .description("description") - .frequency(BenefitFrequency.ONE_TIME) - .type(BenefitType._457) .build() val roundtrippedCompanyBenefit = diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisBenefitCreateParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisBenefitCreateParamsTest.kt index 65de7bff..e1c88f9f 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisBenefitCreateParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisBenefitCreateParamsTest.kt @@ -22,7 +22,7 @@ internal class HrisBenefitCreateParamsTest { .build() ) .description("description") - .frequency(BenefitFrequency.ONE_TIME) + .frequency(BenefitFrequency.EVERY_PAYCHECK) .type(BenefitType._457) .build() } @@ -43,7 +43,7 @@ internal class HrisBenefitCreateParamsTest { .build() ) .description("description") - .frequency(BenefitFrequency.ONE_TIME) + .frequency(BenefitFrequency.EVERY_PAYCHECK) .type(BenefitType._457) .build() @@ -62,7 +62,7 @@ internal class HrisBenefitCreateParamsTest { .build() ) assertThat(body.description()).contains("description") - assertThat(body.frequency()).contains(BenefitFrequency.ONE_TIME) + assertThat(body.frequency()).contains(BenefitFrequency.EVERY_PAYCHECK) assertThat(body.type()).contains(BenefitType._457) } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualBenefitTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualBenefitTest.kt index 3b912383..46bc84ee 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualBenefitTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualBenefitTest.kt @@ -14,7 +14,7 @@ internal class IndividualBenefitTest { val individualBenefit = IndividualBenefit.builder() .body( - IndividualBenefit.Body.builder() + IndividualBenefit.Body.UnionMember0.builder() .annualMaximum(0L) .catchUp(true) .companyContribution( @@ -30,7 +30,7 @@ internal class IndividualBenefitTest { .build() ) .hsaContributionLimit( - IndividualBenefit.Body.HsaContributionLimit.INDIVIDUAL + IndividualBenefit.Body.UnionMember0.HsaContributionLimit.INDIVIDUAL ) .build() ) @@ -39,27 +39,31 @@ internal class IndividualBenefitTest { .build() assertThat(individualBenefit.body()) - .contains( - IndividualBenefit.Body.builder() - .annualMaximum(0L) - .catchUp(true) - .companyContribution( - BenefitContribution.builder() - .amount(0L) - .type(BenefitContribution.Type.FIXED) - .build() - ) - .employeeDeduction( - BenefitContribution.builder() - .amount(0L) - .type(BenefitContribution.Type.FIXED) - .build() - ) - .hsaContributionLimit(IndividualBenefit.Body.HsaContributionLimit.INDIVIDUAL) - .build() + .isEqualTo( + IndividualBenefit.Body.ofUnionMember0( + IndividualBenefit.Body.UnionMember0.builder() + .annualMaximum(0L) + .catchUp(true) + .companyContribution( + BenefitContribution.builder() + .amount(0L) + .type(BenefitContribution.Type.FIXED) + .build() + ) + .employeeDeduction( + BenefitContribution.builder() + .amount(0L) + .type(BenefitContribution.Type.FIXED) + .build() + ) + .hsaContributionLimit( + IndividualBenefit.Body.UnionMember0.HsaContributionLimit.INDIVIDUAL + ) + .build() + ) ) - assertThat(individualBenefit.code()).contains(0L) - assertThat(individualBenefit.individualId()).contains("individual_id") + assertThat(individualBenefit.code()).isEqualTo(0L) + assertThat(individualBenefit.individualId()).isEqualTo("individual_id") } @Test @@ -68,7 +72,7 @@ internal class IndividualBenefitTest { val individualBenefit = IndividualBenefit.builder() .body( - IndividualBenefit.Body.builder() + IndividualBenefit.Body.UnionMember0.builder() .annualMaximum(0L) .catchUp(true) .companyContribution( @@ -84,7 +88,7 @@ internal class IndividualBenefitTest { .build() ) .hsaContributionLimit( - IndividualBenefit.Body.HsaContributionLimit.INDIVIDUAL + IndividualBenefit.Body.UnionMember0.HsaContributionLimit.INDIVIDUAL ) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ProviderTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ProviderTest.kt index b0966799..ab8560ee 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ProviderTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ProviderTest.kt @@ -24,7 +24,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -32,9 +31,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -65,7 +65,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -73,9 +72,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -106,7 +106,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -114,9 +113,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -147,7 +147,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -155,9 +154,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -188,7 +188,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -196,9 +195,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -229,7 +229,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -237,9 +236,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -270,7 +270,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -278,9 +277,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -311,7 +311,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -319,9 +318,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -352,7 +352,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -360,9 +359,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -393,7 +393,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -401,9 +400,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -434,7 +434,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -442,9 +441,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -475,7 +475,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -483,9 +482,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -866,7 +866,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -874,9 +873,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -907,7 +907,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -915,9 +914,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -948,7 +948,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -956,9 +955,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -989,7 +989,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -997,9 +996,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1030,7 +1030,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1038,9 +1037,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1071,7 +1071,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1079,9 +1078,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1112,7 +1112,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1120,9 +1119,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1153,7 +1153,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1161,9 +1160,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1194,7 +1194,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1202,9 +1201,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1235,7 +1235,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1243,9 +1242,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1276,7 +1276,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1284,9 +1283,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1317,7 +1317,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1325,9 +1324,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1710,7 +1710,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1718,9 +1717,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1751,7 +1751,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1759,9 +1758,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1792,7 +1792,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1800,9 +1799,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1833,7 +1833,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1841,9 +1840,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1874,7 +1874,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1882,9 +1881,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1915,7 +1915,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1923,9 +1922,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1956,7 +1956,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -1964,9 +1963,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -1997,7 +1997,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -2005,9 +2004,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -2038,7 +2038,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -2046,9 +2045,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -2079,7 +2079,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -2087,9 +2086,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -2120,7 +2120,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -2128,9 +2127,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) @@ -2161,7 +2161,6 @@ internal class ProviderTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution.FIXED ) @@ -2169,9 +2168,10 @@ internal class ProviderTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) .addHsaContributionLimit( - SupportedBenefit.HsaContributionLimit.INDIVIDUAL + SupportedBenefit.HsaContributionLimit.FAMILY ) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SupportedBenefitTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SupportedBenefitTest.kt index 234efa3a..9afeaf7d 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SupportedBenefitTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SupportedBenefitTest.kt @@ -15,25 +15,24 @@ internal class SupportedBenefitTest { val supportedBenefit = SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.INDIVIDUAL) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() assertThat(supportedBenefit.annualMaximum()).contains(true) - assertThat(supportedBenefit.catchUp()).contains(true) assertThat(supportedBenefit.companyContribution().getOrNull()) .containsExactly(SupportedBenefit.CompanyContribution.FIXED) assertThat(supportedBenefit.description()).contains("description") assertThat(supportedBenefit.employeeDeduction().getOrNull()) .containsExactly(SupportedBenefit.EmployeeDeduction.FIXED) - assertThat(supportedBenefit.frequencies().getOrNull()) - .containsExactly(BenefitFrequency.ONE_TIME) + assertThat(supportedBenefit.frequencies()).containsExactly(BenefitFrequency.EVERY_PAYCHECK) + assertThat(supportedBenefit.catchUp()).contains(true) assertThat(supportedBenefit.hsaContributionLimit().getOrNull()) - .containsExactly(SupportedBenefit.HsaContributionLimit.INDIVIDUAL) + .containsExactly(SupportedBenefit.HsaContributionLimit.FAMILY) } @Test @@ -42,12 +41,12 @@ internal class SupportedBenefitTest { val supportedBenefit = SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution(SupportedBenefit.CompanyContribution.FIXED) .description("description") .addEmployeeDeduction(SupportedBenefit.EmployeeDeduction.FIXED) - .addFrequency(BenefitFrequency.ONE_TIME) - .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.INDIVIDUAL) + .addFrequency(BenefitFrequency.EVERY_PAYCHECK) + .catchUp(true) + .addHsaContributionLimit(SupportedBenefit.HsaContributionLimit.FAMILY) .build() val roundtrippedSupportedBenefit = diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/WebhookEventTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/WebhookEventTest.kt index b136c72b..dbcb91f9 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/WebhookEventTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/WebhookEventTest.kt @@ -32,7 +32,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -41,10 +40,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -75,7 +77,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -84,10 +85,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -118,7 +122,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -127,10 +130,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -161,7 +167,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -170,10 +175,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -204,7 +212,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -213,10 +220,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -247,7 +257,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -256,10 +265,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -290,7 +302,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -299,10 +310,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -333,7 +347,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -342,10 +355,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -376,7 +392,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -385,10 +400,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -419,7 +437,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -428,10 +445,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -462,7 +482,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -471,10 +490,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -505,7 +527,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -514,10 +535,13 @@ internal class WebhookEventTest { .addEmployeeDeduction( SupportedBenefit.EmployeeDeduction.FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit.HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -952,7 +976,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -962,11 +985,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1013,7 +1039,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1023,11 +1048,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1074,7 +1102,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1084,11 +1111,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1135,7 +1165,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1145,11 +1174,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1196,7 +1228,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1206,11 +1237,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1257,7 +1291,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1267,11 +1300,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1318,7 +1354,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1328,11 +1363,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1379,7 +1417,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1389,11 +1426,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1440,7 +1480,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1450,11 +1489,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1501,7 +1543,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1511,11 +1552,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1562,7 +1606,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1572,11 +1615,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) @@ -1623,7 +1669,6 @@ internal class WebhookEventTest { .supportedFeatures( SupportedBenefit.builder() .annualMaximum(true) - .catchUp(true) .addCompanyContribution( SupportedBenefit.CompanyContribution .FIXED @@ -1633,11 +1678,14 @@ internal class WebhookEventTest { SupportedBenefit.EmployeeDeduction .FIXED ) - .addFrequency(BenefitFrequency.ONE_TIME) + .addFrequency( + BenefitFrequency.EVERY_PAYCHECK + ) + .catchUp(true) .addHsaContributionLimit( SupportedBenefit .HsaContributionLimit - .INDIVIDUAL + .FAMILY ) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncTest.kt index 99d7b0e9..eaf0bbb0 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncTest.kt @@ -41,7 +41,7 @@ internal class BenefitServiceAsyncTest { .build() ) .description("description") - .frequency(BenefitFrequency.ONE_TIME) + .frequency(BenefitFrequency.EVERY_PAYCHECK) .type(BenefitType._457) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/hris/BenefitServiceTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/hris/BenefitServiceTest.kt index 334986ff..571983de 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/hris/BenefitServiceTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/hris/BenefitServiceTest.kt @@ -41,7 +41,7 @@ internal class BenefitServiceTest { .build() ) .description("description") - .frequency(BenefitFrequency.ONE_TIME) + .frequency(BenefitFrequency.EVERY_PAYCHECK) .type(BenefitType._457) .build() ) From 32795c657795d4855a237d88ef8509cd6c420aee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 17:00:53 +0000 Subject: [PATCH 15/19] docs: fix missing readme comment --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index afd2ff71..f5ad5396 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ import com.tryfinch.api.models.HrisDirectoryListParams; FinchClient client = FinchOkHttpClient.builder() // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties - Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); @@ -73,7 +73,7 @@ import com.tryfinch.api.client.okhttp.FinchOkHttpClient; FinchClient client = FinchOkHttpClient.builder() // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties - Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); @@ -98,7 +98,7 @@ import com.tryfinch.api.client.okhttp.FinchOkHttpClient; FinchClient client = FinchOkHttpClient.builder() // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties - Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); @@ -161,7 +161,7 @@ import java.util.concurrent.CompletableFuture; FinchClient client = FinchOkHttpClient.builder() // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties - Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); @@ -180,7 +180,7 @@ import java.util.concurrent.CompletableFuture; FinchClientAsync client = FinchOkHttpClientAsync.builder() // Configures using the `finch.clientId`, `finch.clientSecret`, `finch.webhookSecret` and `finch.baseUrl` system properties - Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables + // Or configures using the `FINCH_CLIENT_ID`, `FINCH_CLIENT_SECRET`, `FINCH_WEBHOOK_SECRET` and `FINCH_BASE_URL` environment variables .fromEnv() .accessToken("My Access Token") .build(); From f1e80c04aca7aa069e3a653252705e1e32d3d018 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 01:40:42 +0000 Subject: [PATCH 16/19] fix(client): accidental mutability of some classes --- .../src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt index e95ca383..7c349292 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt @@ -2513,7 +2513,8 @@ private constructor( @JvmStatic fun ofString(string: String) = Value(string = string) @JvmStatic - fun ofJsonValues(jsonValues: List) = Value(jsonValues = jsonValues) + fun ofJsonValues(jsonValues: List) = + Value(jsonValues = jsonValues.toImmutable()) @JvmStatic fun ofJson(json: JsonValue) = Value(json = json) From 8b2df3cab95afc11b9275bbce043a7ba061a1c26 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 03:06:48 +0000 Subject: [PATCH 17/19] chore(internal): remove unnecessary `[...]` in `@see` --- ...nefitIndividualRetrieveManyBenefitsPage.kt | 2 +- ...IndividualRetrieveManyBenefitsPageAsync.kt | 2 +- .../api/models/HrisBenefitListPage.kt | 2 +- .../api/models/HrisBenefitListPageAsync.kt | 2 +- .../HrisBenefitListSupportedBenefitsPage.kt | 2 +- ...isBenefitListSupportedBenefitsPageAsync.kt | 2 +- .../HrisCompanyPayStatementItemListPage.kt | 4 +- ...risCompanyPayStatementItemListPageAsync.kt | 4 +- ...HrisCompanyPayStatementItemRuleListPage.kt | 4 +- ...ompanyPayStatementItemRuleListPageAsync.kt | 4 +- .../HrisDirectoryListIndividualsPage.kt | 6 +- .../HrisDirectoryListIndividualsPageAsync.kt | 6 +- .../api/models/HrisDirectoryListPage.kt | 6 +- .../api/models/HrisDirectoryListPageAsync.kt | 6 +- .../models/HrisEmploymentRetrieveManyPage.kt | 4 +- .../HrisEmploymentRetrieveManyPageAsync.kt | 4 +- .../models/HrisIndividualRetrieveManyPage.kt | 4 +- .../HrisIndividualRetrieveManyPageAsync.kt | 4 +- .../HrisPayStatementRetrieveManyPage.kt | 4 +- .../HrisPayStatementRetrieveManyPageAsync.kt | 4 +- .../api/models/HrisPaymentListPage.kt | 2 +- .../api/models/HrisPaymentListPageAsync.kt | 2 +- .../api/models/PayrollPayGroupListPage.kt | 2 +- .../models/PayrollPayGroupListPageAsync.kt | 2 +- .../tryfinch/api/models/ProviderListPage.kt | 2 +- .../api/models/ProviderListPageAsync.kt | 2 +- .../services/async/AccessTokenServiceAsync.kt | 4 +- .../api/services/async/AccountServiceAsync.kt | 24 +++--- .../services/async/ProviderServiceAsync.kt | 12 +-- .../async/RequestForwardingServiceAsync.kt | 4 +- .../async/connect/SessionServiceAsync.kt | 8 +- .../async/hris/BenefitServiceAsync.kt | 76 +++++++++---------- .../async/hris/CompanyServiceAsync.kt | 12 +-- .../async/hris/DirectoryServiceAsync.kt | 24 +++--- .../async/hris/DocumentServiceAsync.kt | 32 ++++---- .../async/hris/EmploymentServiceAsync.kt | 4 +- .../async/hris/IndividualServiceAsync.kt | 12 +-- .../async/hris/PayStatementServiceAsync.kt | 4 +- .../async/hris/PaymentServiceAsync.kt | 4 +- .../hris/benefits/IndividualServiceAsync.kt | 60 +++++++-------- .../company/PayStatementItemServiceAsync.kt | 12 +-- .../payStatementItem/RuleServiceAsync.kt | 64 ++++++++-------- .../async/jobs/AutomatedServiceAsync.kt | 44 +++++------ .../services/async/jobs/ManualServiceAsync.kt | 20 ++--- .../async/payroll/PayGroupServiceAsync.kt | 32 ++++---- .../async/sandbox/CompanyServiceAsync.kt | 4 +- .../async/sandbox/ConnectionServiceAsync.kt | 4 +- .../async/sandbox/DirectoryServiceAsync.kt | 12 +-- .../async/sandbox/EmploymentServiceAsync.kt | 20 ++--- .../async/sandbox/IndividualServiceAsync.kt | 20 ++--- .../services/async/sandbox/JobServiceAsync.kt | 4 +- .../async/sandbox/PaymentServiceAsync.kt | 12 +-- .../connections/AccountServiceAsync.kt | 16 ++-- .../sandbox/jobs/ConfigurationServiceAsync.kt | 16 ++-- .../services/blocking/AccessTokenService.kt | 4 +- .../api/services/blocking/AccountService.kt | 24 +++--- .../api/services/blocking/ProviderService.kt | 12 +-- .../blocking/RequestForwardingService.kt | 4 +- .../blocking/connect/SessionService.kt | 8 +- .../services/blocking/hris/BenefitService.kt | 76 +++++++++---------- .../services/blocking/hris/CompanyService.kt | 12 +-- .../blocking/hris/DirectoryService.kt | 24 +++--- .../services/blocking/hris/DocumentService.kt | 32 ++++---- .../blocking/hris/EmploymentService.kt | 4 +- .../blocking/hris/IndividualService.kt | 12 +-- .../blocking/hris/PayStatementService.kt | 4 +- .../services/blocking/hris/PaymentService.kt | 4 +- .../hris/benefits/IndividualService.kt | 60 +++++++-------- .../hris/company/PayStatementItemService.kt | 12 +-- .../company/payStatementItem/RuleService.kt | 64 ++++++++-------- .../blocking/jobs/AutomatedService.kt | 44 +++++------ .../services/blocking/jobs/ManualService.kt | 20 ++--- .../blocking/payroll/PayGroupService.kt | 32 ++++---- .../blocking/sandbox/CompanyService.kt | 4 +- .../blocking/sandbox/ConnectionService.kt | 4 +- .../blocking/sandbox/DirectoryService.kt | 12 +-- .../blocking/sandbox/EmploymentService.kt | 20 ++--- .../blocking/sandbox/IndividualService.kt | 20 ++--- .../services/blocking/sandbox/JobService.kt | 4 +- .../blocking/sandbox/PaymentService.kt | 12 +-- .../sandbox/connections/AccountService.kt | 16 ++-- .../sandbox/jobs/ConfigurationService.kt | 16 ++-- 82 files changed, 604 insertions(+), 604 deletions(-) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPage.kt index 672d1d92..44ca77e0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPage.kt @@ -8,7 +8,7 @@ import com.tryfinch.api.core.checkRequired import com.tryfinch.api.services.blocking.hris.benefits.IndividualService import java.util.Objects -/** @see [IndividualService.retrieveManyBenefits] */ +/** @see IndividualService.retrieveManyBenefits */ class HrisBenefitIndividualRetrieveManyBenefitsPage private constructor( private val service: IndividualService, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPageAsync.kt index 22b85713..2b5a04c4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPageAsync.kt @@ -10,7 +10,7 @@ import java.util.Objects import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor -/** @see [IndividualServiceAsync.retrieveManyBenefits] */ +/** @see IndividualServiceAsync.retrieveManyBenefits */ class HrisBenefitIndividualRetrieveManyBenefitsPageAsync private constructor( private val service: IndividualServiceAsync, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPage.kt index 09ca0633..5a17a714 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPage.kt @@ -8,7 +8,7 @@ import com.tryfinch.api.core.checkRequired import com.tryfinch.api.services.blocking.hris.BenefitService import java.util.Objects -/** @see [BenefitService.list] */ +/** @see BenefitService.list */ class HrisBenefitListPage private constructor( private val service: BenefitService, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPageAsync.kt index 884830d5..57b1e4dd 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPageAsync.kt @@ -10,7 +10,7 @@ import java.util.Objects import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor -/** @see [BenefitServiceAsync.list] */ +/** @see BenefitServiceAsync.list */ class HrisBenefitListPageAsync private constructor( private val service: BenefitServiceAsync, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPage.kt index 15f3d0c8..9bd03f24 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPage.kt @@ -10,7 +10,7 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** @see [BenefitService.listSupportedBenefits] */ +/** @see BenefitService.listSupportedBenefits */ class HrisBenefitListSupportedBenefitsPage private constructor( private val service: BenefitService, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPageAsync.kt index cdbc03ea..91b3d1f4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPageAsync.kt @@ -12,7 +12,7 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrNull -/** @see [BenefitServiceAsync.listSupportedBenefits] */ +/** @see BenefitServiceAsync.listSupportedBenefits */ class HrisBenefitListSupportedBenefitsPageAsync private constructor( private val service: BenefitServiceAsync, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListPage.kt index 38a27d53..ba87ea50 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListPage.kt @@ -9,7 +9,7 @@ import com.tryfinch.api.services.blocking.hris.company.PayStatementItemService import java.util.Objects import kotlin.jvm.optionals.getOrNull -/** @see [PayStatementItemService.list] */ +/** @see PayStatementItemService.list */ class HrisCompanyPayStatementItemListPage private constructor( private val service: PayStatementItemService, @@ -21,7 +21,7 @@ private constructor( * Delegates to [HrisCompanyPayStatementItemListPageResponse], but gracefully handles missing * data. * - * @see [HrisCompanyPayStatementItemListPageResponse.responses] + * @see HrisCompanyPayStatementItemListPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListPageAsync.kt index 9ad7c8d2..2c583048 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListPageAsync.kt @@ -11,7 +11,7 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrNull -/** @see [PayStatementItemServiceAsync.list] */ +/** @see PayStatementItemServiceAsync.list */ class HrisCompanyPayStatementItemListPageAsync private constructor( private val service: PayStatementItemServiceAsync, @@ -24,7 +24,7 @@ private constructor( * Delegates to [HrisCompanyPayStatementItemListPageResponse], but gracefully handles missing * data. * - * @see [HrisCompanyPayStatementItemListPageResponse.responses] + * @see HrisCompanyPayStatementItemListPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListPage.kt index 6e23fe25..355f0037 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListPage.kt @@ -9,7 +9,7 @@ import com.tryfinch.api.services.blocking.hris.company.payStatementItem.RuleServ import java.util.Objects import kotlin.jvm.optionals.getOrNull -/** @see [RuleService.list] */ +/** @see RuleService.list */ class HrisCompanyPayStatementItemRuleListPage private constructor( private val service: RuleService, @@ -21,7 +21,7 @@ private constructor( * Delegates to [HrisCompanyPayStatementItemRuleListPageResponse], but gracefully handles * missing data. * - * @see [HrisCompanyPayStatementItemRuleListPageResponse.responses] + * @see HrisCompanyPayStatementItemRuleListPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListPageAsync.kt index 623b1a8a..34df071f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListPageAsync.kt @@ -11,7 +11,7 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrNull -/** @see [RuleServiceAsync.list] */ +/** @see RuleServiceAsync.list */ class HrisCompanyPayStatementItemRuleListPageAsync private constructor( private val service: RuleServiceAsync, @@ -24,7 +24,7 @@ private constructor( * Delegates to [HrisCompanyPayStatementItemRuleListPageResponse], but gracefully handles * missing data. * - * @see [HrisCompanyPayStatementItemRuleListPageResponse.responses] + * @see HrisCompanyPayStatementItemRuleListPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPage.kt index 8f3c042a..70ed0f14 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPage.kt @@ -11,7 +11,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrDefault import kotlin.jvm.optionals.getOrNull -/** @see [DirectoryService.listIndividuals] */ +/** @see DirectoryService.listIndividuals */ @Deprecated("use `list` instead") class HrisDirectoryListIndividualsPage private constructor( @@ -23,7 +23,7 @@ private constructor( /** * Delegates to [HrisDirectoryListIndividualsPageResponse], but gracefully handles missing data. * - * @see [HrisDirectoryListIndividualsPageResponse.individuals] + * @see HrisDirectoryListIndividualsPageResponse.individuals */ fun individuals(): List = response._individuals().getOptional("individuals").getOrNull() ?: emptyList() @@ -31,7 +31,7 @@ private constructor( /** * Delegates to [HrisDirectoryListIndividualsPageResponse], but gracefully handles missing data. * - * @see [HrisDirectoryListIndividualsPageResponse.paging] + * @see HrisDirectoryListIndividualsPageResponse.paging */ fun paging(): Optional = response._paging().getOptional("paging") diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPageAsync.kt index 1a20863f..ab1f2804 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPageAsync.kt @@ -13,7 +13,7 @@ import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrDefault import kotlin.jvm.optionals.getOrNull -/** @see [DirectoryServiceAsync.listIndividuals] */ +/** @see DirectoryServiceAsync.listIndividuals */ @Deprecated("use `list` instead") class HrisDirectoryListIndividualsPageAsync private constructor( @@ -26,7 +26,7 @@ private constructor( /** * Delegates to [HrisDirectoryListIndividualsPageResponse], but gracefully handles missing data. * - * @see [HrisDirectoryListIndividualsPageResponse.individuals] + * @see HrisDirectoryListIndividualsPageResponse.individuals */ fun individuals(): List = response._individuals().getOptional("individuals").getOrNull() ?: emptyList() @@ -34,7 +34,7 @@ private constructor( /** * Delegates to [HrisDirectoryListIndividualsPageResponse], but gracefully handles missing data. * - * @see [HrisDirectoryListIndividualsPageResponse.paging] + * @see HrisDirectoryListIndividualsPageResponse.paging */ fun paging(): Optional = response._paging().getOptional("paging") diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPage.kt index f30e6e3c..978d43ec 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPage.kt @@ -11,7 +11,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrDefault import kotlin.jvm.optionals.getOrNull -/** @see [DirectoryService.list] */ +/** @see DirectoryService.list */ class HrisDirectoryListPage private constructor( private val service: DirectoryService, @@ -22,7 +22,7 @@ private constructor( /** * Delegates to [HrisDirectoryListPageResponse], but gracefully handles missing data. * - * @see [HrisDirectoryListPageResponse.individuals] + * @see HrisDirectoryListPageResponse.individuals */ fun individuals(): List = response._individuals().getOptional("individuals").getOrNull() ?: emptyList() @@ -30,7 +30,7 @@ private constructor( /** * Delegates to [HrisDirectoryListPageResponse], but gracefully handles missing data. * - * @see [HrisDirectoryListPageResponse.paging] + * @see HrisDirectoryListPageResponse.paging */ fun paging(): Optional = response._paging().getOptional("paging") diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPageAsync.kt index 06b6ee3a..057fc609 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPageAsync.kt @@ -13,7 +13,7 @@ import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrDefault import kotlin.jvm.optionals.getOrNull -/** @see [DirectoryServiceAsync.list] */ +/** @see DirectoryServiceAsync.list */ class HrisDirectoryListPageAsync private constructor( private val service: DirectoryServiceAsync, @@ -25,7 +25,7 @@ private constructor( /** * Delegates to [HrisDirectoryListPageResponse], but gracefully handles missing data. * - * @see [HrisDirectoryListPageResponse.individuals] + * @see HrisDirectoryListPageResponse.individuals */ fun individuals(): List = response._individuals().getOptional("individuals").getOrNull() ?: emptyList() @@ -33,7 +33,7 @@ private constructor( /** * Delegates to [HrisDirectoryListPageResponse], but gracefully handles missing data. * - * @see [HrisDirectoryListPageResponse.paging] + * @see HrisDirectoryListPageResponse.paging */ fun paging(): Optional = response._paging().getOptional("paging") diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPage.kt index ac8306aa..b54ca1aa 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPage.kt @@ -9,7 +9,7 @@ import com.tryfinch.api.services.blocking.hris.EmploymentService import java.util.Objects import kotlin.jvm.optionals.getOrNull -/** @see [EmploymentService.retrieveMany] */ +/** @see EmploymentService.retrieveMany */ class HrisEmploymentRetrieveManyPage private constructor( private val service: EmploymentService, @@ -20,7 +20,7 @@ private constructor( /** * Delegates to [HrisEmploymentRetrieveManyPageResponse], but gracefully handles missing data. * - * @see [HrisEmploymentRetrieveManyPageResponse.responses] + * @see HrisEmploymentRetrieveManyPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageAsync.kt index f00e98c9..53f537b2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageAsync.kt @@ -11,7 +11,7 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrNull -/** @see [EmploymentServiceAsync.retrieveMany] */ +/** @see EmploymentServiceAsync.retrieveMany */ class HrisEmploymentRetrieveManyPageAsync private constructor( private val service: EmploymentServiceAsync, @@ -23,7 +23,7 @@ private constructor( /** * Delegates to [HrisEmploymentRetrieveManyPageResponse], but gracefully handles missing data. * - * @see [HrisEmploymentRetrieveManyPageResponse.responses] + * @see HrisEmploymentRetrieveManyPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPage.kt index 19d656c2..639f4619 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPage.kt @@ -9,7 +9,7 @@ import com.tryfinch.api.services.blocking.hris.IndividualService import java.util.Objects import kotlin.jvm.optionals.getOrNull -/** @see [IndividualService.retrieveMany] */ +/** @see IndividualService.retrieveMany */ class HrisIndividualRetrieveManyPage private constructor( private val service: IndividualService, @@ -20,7 +20,7 @@ private constructor( /** * Delegates to [HrisIndividualRetrieveManyPageResponse], but gracefully handles missing data. * - * @see [HrisIndividualRetrieveManyPageResponse.responses] + * @see HrisIndividualRetrieveManyPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPageAsync.kt index c9a0aeb5..5f67dc8c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPageAsync.kt @@ -11,7 +11,7 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrNull -/** @see [IndividualServiceAsync.retrieveMany] */ +/** @see IndividualServiceAsync.retrieveMany */ class HrisIndividualRetrieveManyPageAsync private constructor( private val service: IndividualServiceAsync, @@ -23,7 +23,7 @@ private constructor( /** * Delegates to [HrisIndividualRetrieveManyPageResponse], but gracefully handles missing data. * - * @see [HrisIndividualRetrieveManyPageResponse.responses] + * @see HrisIndividualRetrieveManyPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPage.kt index 09c3d3b8..8c6f2f95 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPage.kt @@ -9,7 +9,7 @@ import com.tryfinch.api.services.blocking.hris.PayStatementService import java.util.Objects import kotlin.jvm.optionals.getOrNull -/** @see [PayStatementService.retrieveMany] */ +/** @see PayStatementService.retrieveMany */ class HrisPayStatementRetrieveManyPage private constructor( private val service: PayStatementService, @@ -20,7 +20,7 @@ private constructor( /** * Delegates to [HrisPayStatementRetrieveManyPageResponse], but gracefully handles missing data. * - * @see [HrisPayStatementRetrieveManyPageResponse.responses] + * @see HrisPayStatementRetrieveManyPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPageAsync.kt index df55d75d..f8168cfc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPageAsync.kt @@ -11,7 +11,7 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrNull -/** @see [PayStatementServiceAsync.retrieveMany] */ +/** @see PayStatementServiceAsync.retrieveMany */ class HrisPayStatementRetrieveManyPageAsync private constructor( private val service: PayStatementServiceAsync, @@ -23,7 +23,7 @@ private constructor( /** * Delegates to [HrisPayStatementRetrieveManyPageResponse], but gracefully handles missing data. * - * @see [HrisPayStatementRetrieveManyPageResponse.responses] + * @see HrisPayStatementRetrieveManyPageResponse.responses */ fun responses(): List = response._responses().getOptional("responses").getOrNull() ?: emptyList() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPage.kt index 66eef149..4592ed53 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPage.kt @@ -8,7 +8,7 @@ import com.tryfinch.api.core.checkRequired import com.tryfinch.api.services.blocking.hris.PaymentService import java.util.Objects -/** @see [PaymentService.list] */ +/** @see PaymentService.list */ class HrisPaymentListPage private constructor( private val service: PaymentService, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPageAsync.kt index e5164328..0ec58e97 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPageAsync.kt @@ -10,7 +10,7 @@ import java.util.Objects import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor -/** @see [PaymentServiceAsync.list] */ +/** @see PaymentServiceAsync.list */ class HrisPaymentListPageAsync private constructor( private val service: PaymentServiceAsync, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPage.kt index 7505d02a..fcb935a1 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPage.kt @@ -8,7 +8,7 @@ import com.tryfinch.api.core.checkRequired import com.tryfinch.api.services.blocking.payroll.PayGroupService import java.util.Objects -/** @see [PayGroupService.list] */ +/** @see PayGroupService.list */ class PayrollPayGroupListPage private constructor( private val service: PayGroupService, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPageAsync.kt index 7c21fa21..c5a7ed5c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPageAsync.kt @@ -10,7 +10,7 @@ import java.util.Objects import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor -/** @see [PayGroupServiceAsync.list] */ +/** @see PayGroupServiceAsync.list */ class PayrollPayGroupListPageAsync private constructor( private val service: PayGroupServiceAsync, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPage.kt index 818565b9..403e725a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPage.kt @@ -8,7 +8,7 @@ import com.tryfinch.api.core.checkRequired import com.tryfinch.api.services.blocking.ProviderService import java.util.Objects -/** @see [ProviderService.list] */ +/** @see ProviderService.list */ class ProviderListPage private constructor( private val service: ProviderService, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPageAsync.kt index f6a62b91..2ed58902 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPageAsync.kt @@ -10,7 +10,7 @@ import java.util.Objects import java.util.concurrent.CompletableFuture import java.util.concurrent.Executor -/** @see [ProviderServiceAsync.list] */ +/** @see ProviderServiceAsync.list */ class ProviderListPageAsync private constructor( private val service: ProviderServiceAsync, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccessTokenServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccessTokenServiceAsync.kt index 36c9661d..938cc061 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccessTokenServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccessTokenServiceAsync.kt @@ -28,7 +28,7 @@ interface AccessTokenServiceAsync { fun create(params: AccessTokenCreateParams): CompletableFuture = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: AccessTokenCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -58,7 +58,7 @@ interface AccessTokenServiceAsync { ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: AccessTokenCreateParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccountServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccountServiceAsync.kt index 7212dfad..3e48b3b2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccountServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/AccountServiceAsync.kt @@ -30,36 +30,36 @@ interface AccountServiceAsync { fun disconnect(): CompletableFuture = disconnect(AccountDisconnectParams.none()) - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect( params: AccountDisconnectParams = AccountDisconnectParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect( params: AccountDisconnectParams = AccountDisconnectParams.none() ): CompletableFuture = disconnect(params, RequestOptions.none()) - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect(requestOptions: RequestOptions): CompletableFuture = disconnect(AccountDisconnectParams.none(), requestOptions) /** Read account information associated with an `access_token` */ fun introspect(): CompletableFuture = introspect(AccountIntrospectParams.none()) - /** @see [introspect] */ + /** @see introspect */ fun introspect( params: AccountIntrospectParams = AccountIntrospectParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [introspect] */ + /** @see introspect */ fun introspect( params: AccountIntrospectParams = AccountIntrospectParams.none() ): CompletableFuture = introspect(params, RequestOptions.none()) - /** @see [introspect] */ + /** @see introspect */ fun introspect(requestOptions: RequestOptions): CompletableFuture = introspect(AccountIntrospectParams.none(), requestOptions) @@ -84,19 +84,19 @@ interface AccountServiceAsync { fun disconnect(): CompletableFuture> = disconnect(AccountDisconnectParams.none()) - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect( params: AccountDisconnectParams = AccountDisconnectParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect( params: AccountDisconnectParams = AccountDisconnectParams.none() ): CompletableFuture> = disconnect(params, RequestOptions.none()) - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect( requestOptions: RequestOptions ): CompletableFuture> = @@ -109,19 +109,19 @@ interface AccountServiceAsync { fun introspect(): CompletableFuture> = introspect(AccountIntrospectParams.none()) - /** @see [introspect] */ + /** @see introspect */ fun introspect( params: AccountIntrospectParams = AccountIntrospectParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [introspect] */ + /** @see introspect */ fun introspect( params: AccountIntrospectParams = AccountIntrospectParams.none() ): CompletableFuture> = introspect(params, RequestOptions.none()) - /** @see [introspect] */ + /** @see introspect */ fun introspect( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ProviderServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ProviderServiceAsync.kt index 40d2a85c..b5776674 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ProviderServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ProviderServiceAsync.kt @@ -27,18 +27,18 @@ interface ProviderServiceAsync { /** Return details on all available payroll and HR systems. */ fun list(): CompletableFuture = list(ProviderListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: ProviderListParams = ProviderListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [list] */ + /** @see list */ fun list( params: ProviderListParams = ProviderListParams.none() ): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): CompletableFuture = list(ProviderListParams.none(), requestOptions) @@ -63,19 +63,19 @@ interface ProviderServiceAsync { fun list(): CompletableFuture> = list(ProviderListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: ProviderListParams = ProviderListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [list] */ + /** @see list */ fun list( params: ProviderListParams = ProviderListParams.none() ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/RequestForwardingServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/RequestForwardingServiceAsync.kt index 883d8abc..69fe6e0e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/RequestForwardingServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/RequestForwardingServiceAsync.kt @@ -33,7 +33,7 @@ interface RequestForwardingServiceAsync { params: RequestForwardingForwardParams ): CompletableFuture = forward(params, RequestOptions.none()) - /** @see [forward] */ + /** @see forward */ fun forward( params: RequestForwardingForwardParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -63,7 +63,7 @@ interface RequestForwardingServiceAsync { ): CompletableFuture> = forward(params, RequestOptions.none()) - /** @see [forward] */ + /** @see forward */ fun forward( params: RequestForwardingForwardParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/connect/SessionServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/connect/SessionServiceAsync.kt index 930e06a7..6d1e37e0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/connect/SessionServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/connect/SessionServiceAsync.kt @@ -30,7 +30,7 @@ interface SessionServiceAsync { fun new_(params: ConnectSessionNewParams): CompletableFuture = new_(params, RequestOptions.none()) - /** @see [new_] */ + /** @see new\_ */ fun new_( params: ConnectSessionNewParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -42,7 +42,7 @@ interface SessionServiceAsync { ): CompletableFuture = reauthenticate(params, RequestOptions.none()) - /** @see [reauthenticate] */ + /** @see reauthenticate */ fun reauthenticate( params: ConnectSessionReauthenticateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -71,7 +71,7 @@ interface SessionServiceAsync { ): CompletableFuture> = new_(params, RequestOptions.none()) - /** @see [new_] */ + /** @see new\_ */ fun new_( params: ConnectSessionNewParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -86,7 +86,7 @@ interface SessionServiceAsync { ): CompletableFuture> = reauthenticate(params, RequestOptions.none()) - /** @see [reauthenticate] */ + /** @see reauthenticate */ fun reauthenticate( params: ConnectSessionReauthenticateParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsync.kt index 3d239a23..08dcd9ab 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsync.kt @@ -42,18 +42,18 @@ interface BenefitServiceAsync { fun create(): CompletableFuture = create(HrisBenefitCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: HrisBenefitCreateParams = HrisBenefitCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [create] */ + /** @see create */ fun create( params: HrisBenefitCreateParams = HrisBenefitCreateParams.none() ): CompletableFuture = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): CompletableFuture = create(HrisBenefitCreateParams.none(), requestOptions) @@ -61,7 +61,7 @@ interface BenefitServiceAsync { fun retrieve(benefitId: String): CompletableFuture = retrieve(benefitId, HrisBenefitRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( benefitId: String, params: HrisBenefitRetrieveParams = HrisBenefitRetrieveParams.none(), @@ -69,23 +69,23 @@ interface BenefitServiceAsync { ): CompletableFuture = retrieve(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( benefitId: String, params: HrisBenefitRetrieveParams = HrisBenefitRetrieveParams.none(), ): CompletableFuture = retrieve(benefitId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisBenefitRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(params: HrisBenefitRetrieveParams): CompletableFuture = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( benefitId: String, requestOptions: RequestOptions, @@ -96,7 +96,7 @@ interface BenefitServiceAsync { fun update(benefitId: String): CompletableFuture = update(benefitId, HrisBenefitUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( benefitId: String, params: HrisBenefitUpdateParams = HrisBenefitUpdateParams.none(), @@ -104,24 +104,24 @@ interface BenefitServiceAsync { ): CompletableFuture = update(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( benefitId: String, params: HrisBenefitUpdateParams = HrisBenefitUpdateParams.none(), ): CompletableFuture = update(benefitId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: HrisBenefitUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [update] */ + /** @see update */ fun update(params: HrisBenefitUpdateParams): CompletableFuture = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( benefitId: String, requestOptions: RequestOptions, @@ -131,18 +131,18 @@ interface BenefitServiceAsync { /** List all company-wide deductions and contributions. */ fun list(): CompletableFuture = list(HrisBenefitListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisBenefitListParams = HrisBenefitListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [list] */ + /** @see list */ fun list( params: HrisBenefitListParams = HrisBenefitListParams.none() ): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): CompletableFuture = list(HrisBenefitListParams.none(), requestOptions) @@ -150,21 +150,21 @@ interface BenefitServiceAsync { fun listSupportedBenefits(): CompletableFuture = listSupportedBenefits(HrisBenefitListSupportedBenefitsParams.none()) - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams = HrisBenefitListSupportedBenefitsParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams = HrisBenefitListSupportedBenefitsParams.none() ): CompletableFuture = listSupportedBenefits(params, RequestOptions.none()) - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( requestOptions: RequestOptions ): CompletableFuture = @@ -193,19 +193,19 @@ interface BenefitServiceAsync { fun create(): CompletableFuture> = create(HrisBenefitCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: HrisBenefitCreateParams = HrisBenefitCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [create] */ + /** @see create */ fun create( params: HrisBenefitCreateParams = HrisBenefitCreateParams.none() ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( requestOptions: RequestOptions ): CompletableFuture> = @@ -218,7 +218,7 @@ interface BenefitServiceAsync { fun retrieve(benefitId: String): CompletableFuture> = retrieve(benefitId, HrisBenefitRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( benefitId: String, params: HrisBenefitRetrieveParams = HrisBenefitRetrieveParams.none(), @@ -226,26 +226,26 @@ interface BenefitServiceAsync { ): CompletableFuture> = retrieve(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( benefitId: String, params: HrisBenefitRetrieveParams = HrisBenefitRetrieveParams.none(), ): CompletableFuture> = retrieve(benefitId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisBenefitRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisBenefitRetrieveParams ): CompletableFuture> = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( benefitId: String, requestOptions: RequestOptions, @@ -261,7 +261,7 @@ interface BenefitServiceAsync { ): CompletableFuture> = update(benefitId, HrisBenefitUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( benefitId: String, params: HrisBenefitUpdateParams = HrisBenefitUpdateParams.none(), @@ -269,26 +269,26 @@ interface BenefitServiceAsync { ): CompletableFuture> = update(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( benefitId: String, params: HrisBenefitUpdateParams = HrisBenefitUpdateParams.none(), ): CompletableFuture> = update(benefitId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: HrisBenefitUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [update] */ + /** @see update */ fun update( params: HrisBenefitUpdateParams ): CompletableFuture> = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( benefitId: String, requestOptions: RequestOptions, @@ -302,19 +302,19 @@ interface BenefitServiceAsync { fun list(): CompletableFuture> = list(HrisBenefitListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisBenefitListParams = HrisBenefitListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [list] */ + /** @see list */ fun list( params: HrisBenefitListParams = HrisBenefitListParams.none() ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture> = @@ -328,21 +328,21 @@ interface BenefitServiceAsync { CompletableFuture> = listSupportedBenefits(HrisBenefitListSupportedBenefitsParams.none()) - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams = HrisBenefitListSupportedBenefitsParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams = HrisBenefitListSupportedBenefitsParams.none() ): CompletableFuture> = listSupportedBenefits(params, RequestOptions.none()) - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsync.kt index ca3d512f..051498a6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsync.kt @@ -30,18 +30,18 @@ interface CompanyServiceAsync { /** Read basic company data */ fun retrieve(): CompletableFuture = retrieve(HrisCompanyRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisCompanyRetrieveParams = HrisCompanyRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisCompanyRetrieveParams = HrisCompanyRetrieveParams.none() ): CompletableFuture = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(requestOptions: RequestOptions): CompletableFuture = retrieve(HrisCompanyRetrieveParams.none(), requestOptions) @@ -68,18 +68,18 @@ interface CompanyServiceAsync { fun retrieve(): CompletableFuture> = retrieve(HrisCompanyRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisCompanyRetrieveParams = HrisCompanyRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisCompanyRetrieveParams = HrisCompanyRetrieveParams.none() ): CompletableFuture> = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(requestOptions: RequestOptions): CompletableFuture> = retrieve(HrisCompanyRetrieveParams.none(), requestOptions) } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsync.kt index 9bfba346..a898e548 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsync.kt @@ -29,18 +29,18 @@ interface DirectoryServiceAsync { /** Read company directory and organization structure */ fun list(): CompletableFuture = list(HrisDirectoryListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisDirectoryListParams = HrisDirectoryListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [list] */ + /** @see list */ fun list( params: HrisDirectoryListParams = HrisDirectoryListParams.none() ): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): CompletableFuture = list(HrisDirectoryListParams.none(), requestOptions) @@ -49,21 +49,21 @@ interface DirectoryServiceAsync { fun listIndividuals(): CompletableFuture = listIndividuals(HrisDirectoryListIndividualsParams.none()) - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals( params: HrisDirectoryListIndividualsParams = HrisDirectoryListIndividualsParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals( params: HrisDirectoryListIndividualsParams = HrisDirectoryListIndividualsParams.none() ): CompletableFuture = listIndividuals(params, RequestOptions.none()) - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals( requestOptions: RequestOptions @@ -91,19 +91,19 @@ interface DirectoryServiceAsync { fun list(): CompletableFuture> = list(HrisDirectoryListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisDirectoryListParams = HrisDirectoryListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [list] */ + /** @see list */ fun list( params: HrisDirectoryListParams = HrisDirectoryListParams.none() ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture> = @@ -118,21 +118,21 @@ interface DirectoryServiceAsync { CompletableFuture> = listIndividuals(HrisDirectoryListIndividualsParams.none()) - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals( params: HrisDirectoryListIndividualsParams = HrisDirectoryListIndividualsParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals( params: HrisDirectoryListIndividualsParams = HrisDirectoryListIndividualsParams.none() ): CompletableFuture> = listIndividuals(params, RequestOptions.none()) - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals( requestOptions: RequestOptions diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DocumentServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DocumentServiceAsync.kt index 22ffb8a9..b1738b75 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DocumentServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DocumentServiceAsync.kt @@ -31,18 +31,18 @@ interface DocumentServiceAsync { */ fun list(): CompletableFuture = list(HrisDocumentListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisDocumentListParams = HrisDocumentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [list] */ + /** @see list */ fun list( params: HrisDocumentListParams = HrisDocumentListParams.none() ): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): CompletableFuture = list(HrisDocumentListParams.none(), requestOptions) @@ -53,7 +53,7 @@ interface DocumentServiceAsync { fun retreive(documentId: String): CompletableFuture = retreive(documentId, HrisDocumentRetreiveParams.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive( documentId: String, params: HrisDocumentRetreiveParams = HrisDocumentRetreiveParams.none(), @@ -61,24 +61,24 @@ interface DocumentServiceAsync { ): CompletableFuture = retreive(params.toBuilder().documentId(documentId).build(), requestOptions) - /** @see [retreive] */ + /** @see retreive */ fun retreive( documentId: String, params: HrisDocumentRetreiveParams = HrisDocumentRetreiveParams.none(), ): CompletableFuture = retreive(documentId, params, RequestOptions.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive( params: HrisDocumentRetreiveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [retreive] */ + /** @see retreive */ fun retreive(params: HrisDocumentRetreiveParams): CompletableFuture = retreive(params, RequestOptions.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive( documentId: String, requestOptions: RequestOptions, @@ -106,19 +106,19 @@ interface DocumentServiceAsync { fun list(): CompletableFuture> = list(HrisDocumentListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisDocumentListParams = HrisDocumentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [list] */ + /** @see list */ fun list( params: HrisDocumentListParams = HrisDocumentListParams.none() ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture> = @@ -133,7 +133,7 @@ interface DocumentServiceAsync { ): CompletableFuture> = retreive(documentId, HrisDocumentRetreiveParams.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive( documentId: String, params: HrisDocumentRetreiveParams = HrisDocumentRetreiveParams.none(), @@ -141,26 +141,26 @@ interface DocumentServiceAsync { ): CompletableFuture> = retreive(params.toBuilder().documentId(documentId).build(), requestOptions) - /** @see [retreive] */ + /** @see retreive */ fun retreive( documentId: String, params: HrisDocumentRetreiveParams = HrisDocumentRetreiveParams.none(), ): CompletableFuture> = retreive(documentId, params, RequestOptions.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive( params: HrisDocumentRetreiveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retreive] */ + /** @see retreive */ fun retreive( params: HrisDocumentRetreiveParams ): CompletableFuture> = retreive(params, RequestOptions.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive( documentId: String, requestOptions: RequestOptions, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/EmploymentServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/EmploymentServiceAsync.kt index 6ad32bab..15d5c485 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/EmploymentServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/EmploymentServiceAsync.kt @@ -30,7 +30,7 @@ interface EmploymentServiceAsync { ): CompletableFuture = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisEmploymentRetrieveManyParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -60,7 +60,7 @@ interface EmploymentServiceAsync { ): CompletableFuture> = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisEmploymentRetrieveManyParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/IndividualServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/IndividualServiceAsync.kt index e05abbc3..8f491a04 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/IndividualServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/IndividualServiceAsync.kt @@ -28,19 +28,19 @@ interface IndividualServiceAsync { fun retrieveMany(): CompletableFuture = retrieveMany(HrisIndividualRetrieveManyParams.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.none() ): CompletableFuture = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( requestOptions: RequestOptions ): CompletableFuture = @@ -69,19 +69,19 @@ interface IndividualServiceAsync { CompletableFuture> = retrieveMany(HrisIndividualRetrieveManyParams.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.none() ): CompletableFuture> = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PayStatementServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PayStatementServiceAsync.kt index 586f6283..67c84784 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PayStatementServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PayStatementServiceAsync.kt @@ -34,7 +34,7 @@ interface PayStatementServiceAsync { ): CompletableFuture = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisPayStatementRetrieveManyParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -64,7 +64,7 @@ interface PayStatementServiceAsync { ): CompletableFuture> = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisPayStatementRetrieveManyParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PaymentServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PaymentServiceAsync.kt index fb6012e9..c78bd6b9 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PaymentServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/PaymentServiceAsync.kt @@ -28,7 +28,7 @@ interface PaymentServiceAsync { fun list(params: HrisPaymentListParams): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisPaymentListParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -57,7 +57,7 @@ interface PaymentServiceAsync { ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisPaymentListParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/benefits/IndividualServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/benefits/IndividualServiceAsync.kt index 691053a3..a4f89b5f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/benefits/IndividualServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/benefits/IndividualServiceAsync.kt @@ -32,7 +32,7 @@ interface IndividualServiceAsync { fun enrolledIds(benefitId: String): CompletableFuture = enrolledIds(benefitId, HrisBenefitIndividualEnrolledIdsParams.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, params: HrisBenefitIndividualEnrolledIdsParams = @@ -41,7 +41,7 @@ interface IndividualServiceAsync { ): CompletableFuture = enrolledIds(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, params: HrisBenefitIndividualEnrolledIdsParams = @@ -49,18 +49,18 @@ interface IndividualServiceAsync { ): CompletableFuture = enrolledIds(benefitId, params, RequestOptions.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams ): CompletableFuture = enrolledIds(params, RequestOptions.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, requestOptions: RequestOptions, @@ -73,7 +73,7 @@ interface IndividualServiceAsync { ): CompletableFuture = retrieveManyBenefits(benefitId, HrisBenefitIndividualRetrieveManyBenefitsParams.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, params: HrisBenefitIndividualRetrieveManyBenefitsParams = @@ -82,7 +82,7 @@ interface IndividualServiceAsync { ): CompletableFuture = retrieveManyBenefits(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, params: HrisBenefitIndividualRetrieveManyBenefitsParams = @@ -90,19 +90,19 @@ interface IndividualServiceAsync { ): CompletableFuture = retrieveManyBenefits(benefitId, params, RequestOptions.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams ): CompletableFuture = retrieveManyBenefits(params, RequestOptions.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, requestOptions: RequestOptions, @@ -117,7 +117,7 @@ interface IndividualServiceAsync { fun unenrollMany(benefitId: String): CompletableFuture = unenrollMany(benefitId, HrisBenefitIndividualUnenrollManyParams.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, params: HrisBenefitIndividualUnenrollManyParams = @@ -126,7 +126,7 @@ interface IndividualServiceAsync { ): CompletableFuture = unenrollMany(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, params: HrisBenefitIndividualUnenrollManyParams = @@ -134,19 +134,19 @@ interface IndividualServiceAsync { ): CompletableFuture = unenrollMany(benefitId, params, RequestOptions.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams ): CompletableFuture = unenrollMany(params, RequestOptions.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, requestOptions: RequestOptions, @@ -177,7 +177,7 @@ interface IndividualServiceAsync { ): CompletableFuture> = enrolledIds(benefitId, HrisBenefitIndividualEnrolledIdsParams.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, params: HrisBenefitIndividualEnrolledIdsParams = @@ -186,7 +186,7 @@ interface IndividualServiceAsync { ): CompletableFuture> = enrolledIds(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, params: HrisBenefitIndividualEnrolledIdsParams = @@ -194,19 +194,19 @@ interface IndividualServiceAsync { ): CompletableFuture> = enrolledIds(benefitId, params, RequestOptions.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams ): CompletableFuture> = enrolledIds(params, RequestOptions.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, requestOptions: RequestOptions, @@ -222,7 +222,7 @@ interface IndividualServiceAsync { ): CompletableFuture> = retrieveManyBenefits(benefitId, HrisBenefitIndividualRetrieveManyBenefitsParams.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, params: HrisBenefitIndividualRetrieveManyBenefitsParams = @@ -231,7 +231,7 @@ interface IndividualServiceAsync { ): CompletableFuture> = retrieveManyBenefits(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, params: HrisBenefitIndividualRetrieveManyBenefitsParams = @@ -239,19 +239,19 @@ interface IndividualServiceAsync { ): CompletableFuture> = retrieveManyBenefits(benefitId, params, RequestOptions.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams ): CompletableFuture> = retrieveManyBenefits(params, RequestOptions.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, requestOptions: RequestOptions, @@ -271,7 +271,7 @@ interface IndividualServiceAsync { ): CompletableFuture> = unenrollMany(benefitId, HrisBenefitIndividualUnenrollManyParams.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, params: HrisBenefitIndividualUnenrollManyParams = @@ -280,7 +280,7 @@ interface IndividualServiceAsync { ): CompletableFuture> = unenrollMany(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, params: HrisBenefitIndividualUnenrollManyParams = @@ -288,19 +288,19 @@ interface IndividualServiceAsync { ): CompletableFuture> = unenrollMany(benefitId, params, RequestOptions.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams ): CompletableFuture> = unenrollMany(params, RequestOptions.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, requestOptions: RequestOptions, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/PayStatementItemServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/PayStatementItemServiceAsync.kt index 939e8743..0f04a11b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/PayStatementItemServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/PayStatementItemServiceAsync.kt @@ -35,20 +35,20 @@ interface PayStatementItemServiceAsync { fun list(): CompletableFuture = list(HrisCompanyPayStatementItemListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemListParams = HrisCompanyPayStatementItemListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemListParams = HrisCompanyPayStatementItemListParams.none() ): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture = @@ -78,21 +78,21 @@ interface PayStatementItemServiceAsync { fun list(): CompletableFuture> = list(HrisCompanyPayStatementItemListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemListParams = HrisCompanyPayStatementItemListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemListParams = HrisCompanyPayStatementItemListParams.none() ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/payStatementItem/RuleServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/payStatementItem/RuleServiceAsync.kt index 6fa6af04..fc72dda7 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/payStatementItem/RuleServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/company/payStatementItem/RuleServiceAsync.kt @@ -40,20 +40,20 @@ interface RuleServiceAsync { fun create(): CompletableFuture = create(HrisCompanyPayStatementItemRuleCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: HrisCompanyPayStatementItemRuleCreateParams = HrisCompanyPayStatementItemRuleCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [create] */ + /** @see create */ fun create( params: HrisCompanyPayStatementItemRuleCreateParams = HrisCompanyPayStatementItemRuleCreateParams.none() ): CompletableFuture = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): CompletableFuture = create(HrisCompanyPayStatementItemRuleCreateParams.none(), requestOptions) @@ -64,7 +64,7 @@ interface RuleServiceAsync { fun update(ruleId: String): CompletableFuture = update(ruleId, HrisCompanyPayStatementItemRuleUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( ruleId: String, params: HrisCompanyPayStatementItemRuleUpdateParams = @@ -73,25 +73,25 @@ interface RuleServiceAsync { ): CompletableFuture = update(params.toBuilder().ruleId(ruleId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( ruleId: String, params: HrisCompanyPayStatementItemRuleUpdateParams = HrisCompanyPayStatementItemRuleUpdateParams.none(), ): CompletableFuture = update(ruleId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: HrisCompanyPayStatementItemRuleUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [update] */ + /** @see update */ fun update( params: HrisCompanyPayStatementItemRuleUpdateParams ): CompletableFuture = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( ruleId: String, requestOptions: RequestOptions, @@ -105,21 +105,21 @@ interface RuleServiceAsync { fun list(): CompletableFuture = list(HrisCompanyPayStatementItemRuleListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemRuleListParams = HrisCompanyPayStatementItemRuleListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemRuleListParams = HrisCompanyPayStatementItemRuleListParams.none() ): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture = @@ -132,7 +132,7 @@ interface RuleServiceAsync { fun delete(ruleId: String): CompletableFuture = delete(ruleId, HrisCompanyPayStatementItemRuleDeleteParams.none()) - /** @see [delete] */ + /** @see delete */ fun delete( ruleId: String, params: HrisCompanyPayStatementItemRuleDeleteParams = @@ -141,25 +141,25 @@ interface RuleServiceAsync { ): CompletableFuture = delete(params.toBuilder().ruleId(ruleId).build(), requestOptions) - /** @see [delete] */ + /** @see delete */ fun delete( ruleId: String, params: HrisCompanyPayStatementItemRuleDeleteParams = HrisCompanyPayStatementItemRuleDeleteParams.none(), ): CompletableFuture = delete(ruleId, params, RequestOptions.none()) - /** @see [delete] */ + /** @see delete */ fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [delete] */ + /** @see delete */ fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams ): CompletableFuture = delete(params, RequestOptions.none()) - /** @see [delete] */ + /** @see delete */ fun delete( ruleId: String, requestOptions: RequestOptions, @@ -183,21 +183,21 @@ interface RuleServiceAsync { fun create(): CompletableFuture> = create(HrisCompanyPayStatementItemRuleCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: HrisCompanyPayStatementItemRuleCreateParams = HrisCompanyPayStatementItemRuleCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [create] */ + /** @see create */ fun create( params: HrisCompanyPayStatementItemRuleCreateParams = HrisCompanyPayStatementItemRuleCreateParams.none() ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( requestOptions: RequestOptions ): CompletableFuture> = @@ -210,7 +210,7 @@ interface RuleServiceAsync { fun update(ruleId: String): CompletableFuture> = update(ruleId, HrisCompanyPayStatementItemRuleUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( ruleId: String, params: HrisCompanyPayStatementItemRuleUpdateParams = @@ -219,7 +219,7 @@ interface RuleServiceAsync { ): CompletableFuture> = update(params.toBuilder().ruleId(ruleId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( ruleId: String, params: HrisCompanyPayStatementItemRuleUpdateParams = @@ -227,19 +227,19 @@ interface RuleServiceAsync { ): CompletableFuture> = update(ruleId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: HrisCompanyPayStatementItemRuleUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [update] */ + /** @see update */ fun update( params: HrisCompanyPayStatementItemRuleUpdateParams ): CompletableFuture> = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( ruleId: String, requestOptions: RequestOptions, @@ -254,21 +254,21 @@ interface RuleServiceAsync { CompletableFuture> = list(HrisCompanyPayStatementItemRuleListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemRuleListParams = HrisCompanyPayStatementItemRuleListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemRuleListParams = HrisCompanyPayStatementItemRuleListParams.none() ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture> = @@ -281,7 +281,7 @@ interface RuleServiceAsync { fun delete(ruleId: String): CompletableFuture> = delete(ruleId, HrisCompanyPayStatementItemRuleDeleteParams.none()) - /** @see [delete] */ + /** @see delete */ fun delete( ruleId: String, params: HrisCompanyPayStatementItemRuleDeleteParams = @@ -290,7 +290,7 @@ interface RuleServiceAsync { ): CompletableFuture> = delete(params.toBuilder().ruleId(ruleId).build(), requestOptions) - /** @see [delete] */ + /** @see delete */ fun delete( ruleId: String, params: HrisCompanyPayStatementItemRuleDeleteParams = @@ -298,19 +298,19 @@ interface RuleServiceAsync { ): CompletableFuture> = delete(ruleId, params, RequestOptions.none()) - /** @see [delete] */ + /** @see delete */ fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [delete] */ + /** @see delete */ fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams ): CompletableFuture> = delete(params, RequestOptions.none()) - /** @see [delete] */ + /** @see delete */ fun delete( ruleId: String, requestOptions: RequestOptions, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt index d6854525..3f8d98ce 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt @@ -46,18 +46,18 @@ interface AutomatedServiceAsync { fun create(): CompletableFuture = create(JobAutomatedCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: JobAutomatedCreateParams = JobAutomatedCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [create] */ + /** @see create */ fun create( params: JobAutomatedCreateParams = JobAutomatedCreateParams.none() ): CompletableFuture = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): CompletableFuture = create(JobAutomatedCreateParams.none(), requestOptions) @@ -65,7 +65,7 @@ interface AutomatedServiceAsync { fun retrieve(jobId: String): CompletableFuture = retrieve(jobId, JobAutomatedRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobAutomatedRetrieveParams = JobAutomatedRetrieveParams.none(), @@ -73,23 +73,23 @@ interface AutomatedServiceAsync { ): CompletableFuture = retrieve(params.toBuilder().jobId(jobId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobAutomatedRetrieveParams = JobAutomatedRetrieveParams.none(), ): CompletableFuture = retrieve(jobId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: JobAutomatedRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(params: JobAutomatedRetrieveParams): CompletableFuture = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, requestOptions: RequestOptions, @@ -103,18 +103,18 @@ interface AutomatedServiceAsync { */ fun list(): CompletableFuture = list(JobAutomatedListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: JobAutomatedListParams = JobAutomatedListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [list] */ + /** @see list */ fun list( params: JobAutomatedListParams = JobAutomatedListParams.none() ): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): CompletableFuture = list(JobAutomatedListParams.none(), requestOptions) @@ -139,19 +139,19 @@ interface AutomatedServiceAsync { fun create(): CompletableFuture> = create(JobAutomatedCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: JobAutomatedCreateParams = JobAutomatedCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [create] */ + /** @see create */ fun create( params: JobAutomatedCreateParams = JobAutomatedCreateParams.none() ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( requestOptions: RequestOptions ): CompletableFuture> = @@ -164,7 +164,7 @@ interface AutomatedServiceAsync { fun retrieve(jobId: String): CompletableFuture> = retrieve(jobId, JobAutomatedRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobAutomatedRetrieveParams = JobAutomatedRetrieveParams.none(), @@ -172,26 +172,26 @@ interface AutomatedServiceAsync { ): CompletableFuture> = retrieve(params.toBuilder().jobId(jobId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobAutomatedRetrieveParams = JobAutomatedRetrieveParams.none(), ): CompletableFuture> = retrieve(jobId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: JobAutomatedRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: JobAutomatedRetrieveParams ): CompletableFuture> = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, requestOptions: RequestOptions, @@ -205,19 +205,19 @@ interface AutomatedServiceAsync { fun list(): CompletableFuture> = list(JobAutomatedListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: JobAutomatedListParams = JobAutomatedListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [list] */ + /** @see list */ fun list( params: JobAutomatedListParams = JobAutomatedListParams.none() ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/ManualServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/ManualServiceAsync.kt index a7cdb0bf..3f270aeb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/ManualServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/ManualServiceAsync.kt @@ -31,7 +31,7 @@ interface ManualServiceAsync { fun retrieve(jobId: String): CompletableFuture = retrieve(jobId, JobManualRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobManualRetrieveParams = JobManualRetrieveParams.none(), @@ -39,23 +39,23 @@ interface ManualServiceAsync { ): CompletableFuture = retrieve(params.toBuilder().jobId(jobId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobManualRetrieveParams = JobManualRetrieveParams.none(), ): CompletableFuture = retrieve(jobId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: JobManualRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(params: JobManualRetrieveParams): CompletableFuture = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(jobId: String, requestOptions: RequestOptions): CompletableFuture = retrieve(jobId, JobManualRetrieveParams.none(), requestOptions) @@ -80,7 +80,7 @@ interface ManualServiceAsync { fun retrieve(jobId: String): CompletableFuture> = retrieve(jobId, JobManualRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobManualRetrieveParams = JobManualRetrieveParams.none(), @@ -88,26 +88,26 @@ interface ManualServiceAsync { ): CompletableFuture> = retrieve(params.toBuilder().jobId(jobId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobManualRetrieveParams = JobManualRetrieveParams.none(), ): CompletableFuture> = retrieve(jobId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: JobManualRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: JobManualRetrieveParams ): CompletableFuture> = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, requestOptions: RequestOptions, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/payroll/PayGroupServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/payroll/PayGroupServiceAsync.kt index 02e5f8a8..ac10ec77 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/payroll/PayGroupServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/payroll/PayGroupServiceAsync.kt @@ -30,7 +30,7 @@ interface PayGroupServiceAsync { fun retrieve(payGroupId: String): CompletableFuture = retrieve(payGroupId, PayrollPayGroupRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( payGroupId: String, params: PayrollPayGroupRetrieveParams = PayrollPayGroupRetrieveParams.none(), @@ -38,25 +38,25 @@ interface PayGroupServiceAsync { ): CompletableFuture = retrieve(params.toBuilder().payGroupId(payGroupId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( payGroupId: String, params: PayrollPayGroupRetrieveParams = PayrollPayGroupRetrieveParams.none(), ): CompletableFuture = retrieve(payGroupId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: PayrollPayGroupRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: PayrollPayGroupRetrieveParams ): CompletableFuture = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( payGroupId: String, requestOptions: RequestOptions, @@ -67,18 +67,18 @@ interface PayGroupServiceAsync { fun list(): CompletableFuture = list(PayrollPayGroupListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: PayrollPayGroupListParams = PayrollPayGroupListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [list] */ + /** @see list */ fun list( params: PayrollPayGroupListParams = PayrollPayGroupListParams.none() ): CompletableFuture = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): CompletableFuture = list(PayrollPayGroupListParams.none(), requestOptions) @@ -105,7 +105,7 @@ interface PayGroupServiceAsync { ): CompletableFuture> = retrieve(payGroupId, PayrollPayGroupRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( payGroupId: String, params: PayrollPayGroupRetrieveParams = PayrollPayGroupRetrieveParams.none(), @@ -113,26 +113,26 @@ interface PayGroupServiceAsync { ): CompletableFuture> = retrieve(params.toBuilder().payGroupId(payGroupId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( payGroupId: String, params: PayrollPayGroupRetrieveParams = PayrollPayGroupRetrieveParams.none(), ): CompletableFuture> = retrieve(payGroupId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: PayrollPayGroupRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: PayrollPayGroupRetrieveParams ): CompletableFuture> = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( payGroupId: String, requestOptions: RequestOptions, @@ -146,19 +146,19 @@ interface PayGroupServiceAsync { fun list(): CompletableFuture> = list(PayrollPayGroupListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: PayrollPayGroupListParams = PayrollPayGroupListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [list] */ + /** @see list */ fun list( params: PayrollPayGroupListParams = PayrollPayGroupListParams.none() ): CompletableFuture> = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/CompanyServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/CompanyServiceAsync.kt index 5a8a0f05..be9a4456 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/CompanyServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/CompanyServiceAsync.kt @@ -28,7 +28,7 @@ interface CompanyServiceAsync { fun update(params: SandboxCompanyUpdateParams): CompletableFuture = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxCompanyUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -57,7 +57,7 @@ interface CompanyServiceAsync { ): CompletableFuture> = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxCompanyUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/ConnectionServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/ConnectionServiceAsync.kt index a56b40d9..84fb6472 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/ConnectionServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/ConnectionServiceAsync.kt @@ -31,7 +31,7 @@ interface ConnectionServiceAsync { fun create(params: SandboxConnectionCreateParams): CompletableFuture = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxConnectionCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -63,7 +63,7 @@ interface ConnectionServiceAsync { ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxConnectionCreateParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/DirectoryServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/DirectoryServiceAsync.kt index 9068bce6..2d566ef2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/DirectoryServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/DirectoryServiceAsync.kt @@ -28,18 +28,18 @@ interface DirectoryServiceAsync { fun create(): CompletableFuture> = create(SandboxDirectoryCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxDirectoryCreateParams = SandboxDirectoryCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [create] */ + /** @see create */ fun create( params: SandboxDirectoryCreateParams = SandboxDirectoryCreateParams.none() ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): CompletableFuture> = create(SandboxDirectoryCreateParams.none(), requestOptions) @@ -64,19 +64,19 @@ interface DirectoryServiceAsync { fun create(): CompletableFuture>> = create(SandboxDirectoryCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxDirectoryCreateParams = SandboxDirectoryCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture>> - /** @see [create] */ + /** @see create */ fun create( params: SandboxDirectoryCreateParams = SandboxDirectoryCreateParams.none() ): CompletableFuture>> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( requestOptions: RequestOptions ): CompletableFuture>> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/EmploymentServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/EmploymentServiceAsync.kt index e025f5a1..017ea3b7 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/EmploymentServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/EmploymentServiceAsync.kt @@ -28,7 +28,7 @@ interface EmploymentServiceAsync { fun update(individualId: String): CompletableFuture = update(individualId, SandboxEmploymentUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxEmploymentUpdateParams = SandboxEmploymentUpdateParams.none(), @@ -36,24 +36,24 @@ interface EmploymentServiceAsync { ): CompletableFuture = update(params.toBuilder().individualId(individualId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxEmploymentUpdateParams = SandboxEmploymentUpdateParams.none(), ): CompletableFuture = update(individualId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxEmploymentUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [update] */ + /** @see update */ fun update(params: SandboxEmploymentUpdateParams): CompletableFuture = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, requestOptions: RequestOptions, @@ -84,7 +84,7 @@ interface EmploymentServiceAsync { ): CompletableFuture> = update(individualId, SandboxEmploymentUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxEmploymentUpdateParams = SandboxEmploymentUpdateParams.none(), @@ -92,26 +92,26 @@ interface EmploymentServiceAsync { ): CompletableFuture> = update(params.toBuilder().individualId(individualId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxEmploymentUpdateParams = SandboxEmploymentUpdateParams.none(), ): CompletableFuture> = update(individualId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxEmploymentUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [update] */ + /** @see update */ fun update( params: SandboxEmploymentUpdateParams ): CompletableFuture> = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, requestOptions: RequestOptions, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/IndividualServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/IndividualServiceAsync.kt index f91b34e6..bc2868b4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/IndividualServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/IndividualServiceAsync.kt @@ -28,7 +28,7 @@ interface IndividualServiceAsync { fun update(individualId: String): CompletableFuture = update(individualId, SandboxIndividualUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxIndividualUpdateParams = SandboxIndividualUpdateParams.none(), @@ -36,24 +36,24 @@ interface IndividualServiceAsync { ): CompletableFuture = update(params.toBuilder().individualId(individualId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxIndividualUpdateParams = SandboxIndividualUpdateParams.none(), ): CompletableFuture = update(individualId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxIndividualUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [update] */ + /** @see update */ fun update(params: SandboxIndividualUpdateParams): CompletableFuture = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, requestOptions: RequestOptions, @@ -84,7 +84,7 @@ interface IndividualServiceAsync { ): CompletableFuture> = update(individualId, SandboxIndividualUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxIndividualUpdateParams = SandboxIndividualUpdateParams.none(), @@ -92,26 +92,26 @@ interface IndividualServiceAsync { ): CompletableFuture> = update(params.toBuilder().individualId(individualId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxIndividualUpdateParams = SandboxIndividualUpdateParams.none(), ): CompletableFuture> = update(individualId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxIndividualUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [update] */ + /** @see update */ fun update( params: SandboxIndividualUpdateParams ): CompletableFuture> = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, requestOptions: RequestOptions, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/JobServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/JobServiceAsync.kt index 30011030..b9560dac 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/JobServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/JobServiceAsync.kt @@ -31,7 +31,7 @@ interface JobServiceAsync { fun create(params: SandboxJobCreateParams): CompletableFuture = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxJobCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -58,7 +58,7 @@ interface JobServiceAsync { ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxJobCreateParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/PaymentServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/PaymentServiceAsync.kt index b1668fdb..b63448a2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/PaymentServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/PaymentServiceAsync.kt @@ -28,18 +28,18 @@ interface PaymentServiceAsync { fun create(): CompletableFuture = create(SandboxPaymentCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxPaymentCreateParams = SandboxPaymentCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [create] */ + /** @see create */ fun create( params: SandboxPaymentCreateParams = SandboxPaymentCreateParams.none() ): CompletableFuture = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): CompletableFuture = create(SandboxPaymentCreateParams.none(), requestOptions) @@ -64,19 +64,19 @@ interface PaymentServiceAsync { fun create(): CompletableFuture> = create(SandboxPaymentCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxPaymentCreateParams = SandboxPaymentCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [create] */ + /** @see create */ fun create( params: SandboxPaymentCreateParams = SandboxPaymentCreateParams.none() ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/connections/AccountServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/connections/AccountServiceAsync.kt index 1afa9577..453adce9 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/connections/AccountServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/connections/AccountServiceAsync.kt @@ -31,7 +31,7 @@ interface AccountServiceAsync { params: SandboxConnectionAccountCreateParams ): CompletableFuture = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxConnectionAccountCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -44,18 +44,18 @@ interface AccountServiceAsync { fun update(): CompletableFuture = update(SandboxConnectionAccountUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxConnectionAccountUpdateParams = SandboxConnectionAccountUpdateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** @see [update] */ + /** @see update */ fun update( params: SandboxConnectionAccountUpdateParams = SandboxConnectionAccountUpdateParams.none() ): CompletableFuture = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update(requestOptions: RequestOptions): CompletableFuture = update(SandboxConnectionAccountUpdateParams.none(), requestOptions) @@ -82,7 +82,7 @@ interface AccountServiceAsync { ): CompletableFuture> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxConnectionAccountCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -95,21 +95,21 @@ interface AccountServiceAsync { fun update(): CompletableFuture> = update(SandboxConnectionAccountUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxConnectionAccountUpdateParams = SandboxConnectionAccountUpdateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [update] */ + /** @see update */ fun update( params: SandboxConnectionAccountUpdateParams = SandboxConnectionAccountUpdateParams.none() ): CompletableFuture> = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( requestOptions: RequestOptions ): CompletableFuture> = diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/jobs/ConfigurationServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/jobs/ConfigurationServiceAsync.kt index bbacb035..5152768a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/jobs/ConfigurationServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/sandbox/jobs/ConfigurationServiceAsync.kt @@ -29,19 +29,19 @@ interface ConfigurationServiceAsync { fun retrieve(): CompletableFuture> = retrieve(SandboxJobConfigurationRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: SandboxJobConfigurationRetrieveParams = SandboxJobConfigurationRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: SandboxJobConfigurationRetrieveParams = SandboxJobConfigurationRetrieveParams.none() ): CompletableFuture> = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(requestOptions: RequestOptions): CompletableFuture> = retrieve(SandboxJobConfigurationRetrieveParams.none(), requestOptions) @@ -50,7 +50,7 @@ interface ConfigurationServiceAsync { params: SandboxJobConfigurationUpdateParams ): CompletableFuture = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxJobConfigurationUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -78,21 +78,21 @@ interface ConfigurationServiceAsync { fun retrieve(): CompletableFuture>> = retrieve(SandboxJobConfigurationRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: SandboxJobConfigurationRetrieveParams = SandboxJobConfigurationRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture>> - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: SandboxJobConfigurationRetrieveParams = SandboxJobConfigurationRetrieveParams.none() ): CompletableFuture>> = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( requestOptions: RequestOptions ): CompletableFuture>> = @@ -107,7 +107,7 @@ interface ConfigurationServiceAsync { ): CompletableFuture> = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxJobConfigurationUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccessTokenService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccessTokenService.kt index c927481f..143e1c18 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccessTokenService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccessTokenService.kt @@ -28,7 +28,7 @@ interface AccessTokenService { fun create(params: AccessTokenCreateParams): CreateAccessTokenResponse = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: AccessTokenCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -56,7 +56,7 @@ interface AccessTokenService { fun create(params: AccessTokenCreateParams): HttpResponseFor = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: AccessTokenCreateParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccountService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccountService.kt index 67064bbd..fc92f131 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccountService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/AccountService.kt @@ -29,36 +29,36 @@ interface AccountService { /** Disconnect one or more `access_token`s from your application. */ fun disconnect(): DisconnectResponse = disconnect(AccountDisconnectParams.none()) - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect( params: AccountDisconnectParams = AccountDisconnectParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): DisconnectResponse - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect( params: AccountDisconnectParams = AccountDisconnectParams.none() ): DisconnectResponse = disconnect(params, RequestOptions.none()) - /** @see [disconnect] */ + /** @see disconnect */ fun disconnect(requestOptions: RequestOptions): DisconnectResponse = disconnect(AccountDisconnectParams.none(), requestOptions) /** Read account information associated with an `access_token` */ fun introspect(): Introspection = introspect(AccountIntrospectParams.none()) - /** @see [introspect] */ + /** @see introspect */ fun introspect( params: AccountIntrospectParams = AccountIntrospectParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): Introspection - /** @see [introspect] */ + /** @see introspect */ fun introspect( params: AccountIntrospectParams = AccountIntrospectParams.none() ): Introspection = introspect(params, RequestOptions.none()) - /** @see [introspect] */ + /** @see introspect */ fun introspect(requestOptions: RequestOptions): Introspection = introspect(AccountIntrospectParams.none(), requestOptions) @@ -80,20 +80,20 @@ interface AccountService { fun disconnect(): HttpResponseFor = disconnect(AccountDisconnectParams.none()) - /** @see [disconnect] */ + /** @see disconnect */ @MustBeClosed fun disconnect( params: AccountDisconnectParams = AccountDisconnectParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [disconnect] */ + /** @see disconnect */ @MustBeClosed fun disconnect( params: AccountDisconnectParams = AccountDisconnectParams.none() ): HttpResponseFor = disconnect(params, RequestOptions.none()) - /** @see [disconnect] */ + /** @see disconnect */ @MustBeClosed fun disconnect(requestOptions: RequestOptions): HttpResponseFor = disconnect(AccountDisconnectParams.none(), requestOptions) @@ -106,20 +106,20 @@ interface AccountService { fun introspect(): HttpResponseFor = introspect(AccountIntrospectParams.none()) - /** @see [introspect] */ + /** @see introspect */ @MustBeClosed fun introspect( params: AccountIntrospectParams = AccountIntrospectParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [introspect] */ + /** @see introspect */ @MustBeClosed fun introspect( params: AccountIntrospectParams = AccountIntrospectParams.none() ): HttpResponseFor = introspect(params, RequestOptions.none()) - /** @see [introspect] */ + /** @see introspect */ @MustBeClosed fun introspect(requestOptions: RequestOptions): HttpResponseFor = introspect(AccountIntrospectParams.none(), requestOptions) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/ProviderService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/ProviderService.kt index a2c68ded..0af589f8 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/ProviderService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/ProviderService.kt @@ -27,17 +27,17 @@ interface ProviderService { /** Return details on all available payroll and HR systems. */ fun list(): ProviderListPage = list(ProviderListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: ProviderListParams = ProviderListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): ProviderListPage - /** @see [list] */ + /** @see list */ fun list(params: ProviderListParams = ProviderListParams.none()): ProviderListPage = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): ProviderListPage = list(ProviderListParams.none(), requestOptions) @@ -58,20 +58,20 @@ interface ProviderService { @MustBeClosed fun list(): HttpResponseFor = list(ProviderListParams.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: ProviderListParams = ProviderListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: ProviderListParams = ProviderListParams.none() ): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list(requestOptions: RequestOptions): HttpResponseFor = list(ProviderListParams.none(), requestOptions) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/RequestForwardingService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/RequestForwardingService.kt index a180b608..a478ebc8 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/RequestForwardingService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/RequestForwardingService.kt @@ -32,7 +32,7 @@ interface RequestForwardingService { fun forward(params: RequestForwardingForwardParams): RequestForwardingForwardResponse = forward(params, RequestOptions.none()) - /** @see [forward] */ + /** @see forward */ fun forward( params: RequestForwardingForwardParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -63,7 +63,7 @@ interface RequestForwardingService { ): HttpResponseFor = forward(params, RequestOptions.none()) - /** @see [forward] */ + /** @see forward */ @MustBeClosed fun forward( params: RequestForwardingForwardParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/connect/SessionService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/connect/SessionService.kt index 7ca4c307..e83b7a29 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/connect/SessionService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/connect/SessionService.kt @@ -30,7 +30,7 @@ interface SessionService { fun new_(params: ConnectSessionNewParams): SessionNewResponse = new_(params, RequestOptions.none()) - /** @see [new_] */ + /** @see new\_ */ fun new_( params: ConnectSessionNewParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -40,7 +40,7 @@ interface SessionService { fun reauthenticate(params: ConnectSessionReauthenticateParams): SessionReauthenticateResponse = reauthenticate(params, RequestOptions.none()) - /** @see [reauthenticate] */ + /** @see reauthenticate */ fun reauthenticate( params: ConnectSessionReauthenticateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -64,7 +64,7 @@ interface SessionService { fun new_(params: ConnectSessionNewParams): HttpResponseFor = new_(params, RequestOptions.none()) - /** @see [new_] */ + /** @see new\_ */ @MustBeClosed fun new_( params: ConnectSessionNewParams, @@ -81,7 +81,7 @@ interface SessionService { ): HttpResponseFor = reauthenticate(params, RequestOptions.none()) - /** @see [reauthenticate] */ + /** @see reauthenticate */ @MustBeClosed fun reauthenticate( params: ConnectSessionReauthenticateParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/BenefitService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/BenefitService.kt index 5cda4c26..a7c53e69 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/BenefitService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/BenefitService.kt @@ -41,18 +41,18 @@ interface BenefitService { */ fun create(): CreateCompanyBenefitsResponse = create(HrisBenefitCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: HrisBenefitCreateParams = HrisBenefitCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CreateCompanyBenefitsResponse - /** @see [create] */ + /** @see create */ fun create( params: HrisBenefitCreateParams = HrisBenefitCreateParams.none() ): CreateCompanyBenefitsResponse = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): CreateCompanyBenefitsResponse = create(HrisBenefitCreateParams.none(), requestOptions) @@ -60,30 +60,30 @@ interface BenefitService { fun retrieve(benefitId: String): CompanyBenefit = retrieve(benefitId, HrisBenefitRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( benefitId: String, params: HrisBenefitRetrieveParams = HrisBenefitRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompanyBenefit = retrieve(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( benefitId: String, params: HrisBenefitRetrieveParams = HrisBenefitRetrieveParams.none(), ): CompanyBenefit = retrieve(benefitId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisBenefitRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompanyBenefit - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(params: HrisBenefitRetrieveParams): CompanyBenefit = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(benefitId: String, requestOptions: RequestOptions): CompanyBenefit = retrieve(benefitId, HrisBenefitRetrieveParams.none(), requestOptions) @@ -91,7 +91,7 @@ interface BenefitService { fun update(benefitId: String): UpdateCompanyBenefitResponse = update(benefitId, HrisBenefitUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( benefitId: String, params: HrisBenefitUpdateParams = HrisBenefitUpdateParams.none(), @@ -99,40 +99,40 @@ interface BenefitService { ): UpdateCompanyBenefitResponse = update(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( benefitId: String, params: HrisBenefitUpdateParams = HrisBenefitUpdateParams.none(), ): UpdateCompanyBenefitResponse = update(benefitId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: HrisBenefitUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): UpdateCompanyBenefitResponse - /** @see [update] */ + /** @see update */ fun update(params: HrisBenefitUpdateParams): UpdateCompanyBenefitResponse = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update(benefitId: String, requestOptions: RequestOptions): UpdateCompanyBenefitResponse = update(benefitId, HrisBenefitUpdateParams.none(), requestOptions) /** List all company-wide deductions and contributions. */ fun list(): HrisBenefitListPage = list(HrisBenefitListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisBenefitListParams = HrisBenefitListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HrisBenefitListPage - /** @see [list] */ + /** @see list */ fun list(params: HrisBenefitListParams = HrisBenefitListParams.none()): HrisBenefitListPage = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): HrisBenefitListPage = list(HrisBenefitListParams.none(), requestOptions) @@ -140,20 +140,20 @@ interface BenefitService { fun listSupportedBenefits(): HrisBenefitListSupportedBenefitsPage = listSupportedBenefits(HrisBenefitListSupportedBenefitsParams.none()) - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams = HrisBenefitListSupportedBenefitsParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HrisBenefitListSupportedBenefitsPage - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams = HrisBenefitListSupportedBenefitsParams.none() ): HrisBenefitListSupportedBenefitsPage = listSupportedBenefits(params, RequestOptions.none()) - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ fun listSupportedBenefits( requestOptions: RequestOptions ): HrisBenefitListSupportedBenefitsPage = @@ -179,20 +179,20 @@ interface BenefitService { fun create(): HttpResponseFor = create(HrisBenefitCreateParams.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: HrisBenefitCreateParams = HrisBenefitCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: HrisBenefitCreateParams = HrisBenefitCreateParams.none() ): HttpResponseFor = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create(requestOptions: RequestOptions): HttpResponseFor = create(HrisBenefitCreateParams.none(), requestOptions) @@ -205,7 +205,7 @@ interface BenefitService { fun retrieve(benefitId: String): HttpResponseFor = retrieve(benefitId, HrisBenefitRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( benefitId: String, @@ -214,26 +214,26 @@ interface BenefitService { ): HttpResponseFor = retrieve(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( benefitId: String, params: HrisBenefitRetrieveParams = HrisBenefitRetrieveParams.none(), ): HttpResponseFor = retrieve(benefitId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: HrisBenefitRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve(params: HrisBenefitRetrieveParams): HttpResponseFor = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( benefitId: String, @@ -249,7 +249,7 @@ interface BenefitService { fun update(benefitId: String): HttpResponseFor = update(benefitId, HrisBenefitUpdateParams.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( benefitId: String, @@ -258,7 +258,7 @@ interface BenefitService { ): HttpResponseFor = update(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( benefitId: String, @@ -266,19 +266,19 @@ interface BenefitService { ): HttpResponseFor = update(benefitId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: HrisBenefitUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [update] */ + /** @see update */ @MustBeClosed fun update(params: HrisBenefitUpdateParams): HttpResponseFor = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( benefitId: String, @@ -293,20 +293,20 @@ interface BenefitService { @MustBeClosed fun list(): HttpResponseFor = list(HrisBenefitListParams.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisBenefitListParams = HrisBenefitListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisBenefitListParams = HrisBenefitListParams.none() ): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list(requestOptions: RequestOptions): HttpResponseFor = list(HrisBenefitListParams.none(), requestOptions) @@ -319,7 +319,7 @@ interface BenefitService { fun listSupportedBenefits(): HttpResponseFor = listSupportedBenefits(HrisBenefitListSupportedBenefitsParams.none()) - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ @MustBeClosed fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams = @@ -327,7 +327,7 @@ interface BenefitService { requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ @MustBeClosed fun listSupportedBenefits( params: HrisBenefitListSupportedBenefitsParams = @@ -335,7 +335,7 @@ interface BenefitService { ): HttpResponseFor = listSupportedBenefits(params, RequestOptions.none()) - /** @see [listSupportedBenefits] */ + /** @see listSupportedBenefits */ @MustBeClosed fun listSupportedBenefits( requestOptions: RequestOptions diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/CompanyService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/CompanyService.kt index befdb985..eeed98c1 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/CompanyService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/CompanyService.kt @@ -30,17 +30,17 @@ interface CompanyService { /** Read basic company data */ fun retrieve(): Company = retrieve(HrisCompanyRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: HrisCompanyRetrieveParams = HrisCompanyRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): Company - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(params: HrisCompanyRetrieveParams = HrisCompanyRetrieveParams.none()): Company = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(requestOptions: RequestOptions): Company = retrieve(HrisCompanyRetrieveParams.none(), requestOptions) @@ -63,20 +63,20 @@ interface CompanyService { @MustBeClosed fun retrieve(): HttpResponseFor = retrieve(HrisCompanyRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: HrisCompanyRetrieveParams = HrisCompanyRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: HrisCompanyRetrieveParams = HrisCompanyRetrieveParams.none() ): HttpResponseFor = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve(requestOptions: RequestOptions): HttpResponseFor = retrieve(HrisCompanyRetrieveParams.none(), requestOptions) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DirectoryService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DirectoryService.kt index 6fb6faf4..ac7f08ea 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DirectoryService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DirectoryService.kt @@ -29,18 +29,18 @@ interface DirectoryService { /** Read company directory and organization structure */ fun list(): HrisDirectoryListPage = list(HrisDirectoryListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisDirectoryListParams = HrisDirectoryListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HrisDirectoryListPage - /** @see [list] */ + /** @see list */ fun list( params: HrisDirectoryListParams = HrisDirectoryListParams.none() ): HrisDirectoryListPage = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): HrisDirectoryListPage = list(HrisDirectoryListParams.none(), requestOptions) @@ -49,20 +49,20 @@ interface DirectoryService { fun listIndividuals(): HrisDirectoryListIndividualsPage = listIndividuals(HrisDirectoryListIndividualsParams.none()) - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals( params: HrisDirectoryListIndividualsParams = HrisDirectoryListIndividualsParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HrisDirectoryListIndividualsPage - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals( params: HrisDirectoryListIndividualsParams = HrisDirectoryListIndividualsParams.none() ): HrisDirectoryListIndividualsPage = listIndividuals(params, RequestOptions.none()) - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") fun listIndividuals(requestOptions: RequestOptions): HrisDirectoryListIndividualsPage = listIndividuals(HrisDirectoryListIndividualsParams.none(), requestOptions) @@ -84,20 +84,20 @@ interface DirectoryService { @MustBeClosed fun list(): HttpResponseFor = list(HrisDirectoryListParams.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisDirectoryListParams = HrisDirectoryListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisDirectoryListParams = HrisDirectoryListParams.none() ): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list(requestOptions: RequestOptions): HttpResponseFor = list(HrisDirectoryListParams.none(), requestOptions) @@ -111,7 +111,7 @@ interface DirectoryService { fun listIndividuals(): HttpResponseFor = listIndividuals(HrisDirectoryListIndividualsParams.none()) - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") @MustBeClosed fun listIndividuals( @@ -119,7 +119,7 @@ interface DirectoryService { requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") @MustBeClosed fun listIndividuals( @@ -127,7 +127,7 @@ interface DirectoryService { ): HttpResponseFor = listIndividuals(params, RequestOptions.none()) - /** @see [listIndividuals] */ + /** @see listIndividuals */ @Deprecated("use `list` instead") @MustBeClosed fun listIndividuals( diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DocumentService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DocumentService.kt index 1e34a568..0aa6571e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DocumentService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/DocumentService.kt @@ -31,17 +31,17 @@ interface DocumentService { */ fun list(): DocumentListResponse = list(HrisDocumentListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisDocumentListParams = HrisDocumentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): DocumentListResponse - /** @see [list] */ + /** @see list */ fun list(params: HrisDocumentListParams = HrisDocumentListParams.none()): DocumentListResponse = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): DocumentListResponse = list(HrisDocumentListParams.none(), requestOptions) @@ -52,7 +52,7 @@ interface DocumentService { fun retreive(documentId: String): DocumentRetreiveResponse = retreive(documentId, HrisDocumentRetreiveParams.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive( documentId: String, params: HrisDocumentRetreiveParams = HrisDocumentRetreiveParams.none(), @@ -60,23 +60,23 @@ interface DocumentService { ): DocumentRetreiveResponse = retreive(params.toBuilder().documentId(documentId).build(), requestOptions) - /** @see [retreive] */ + /** @see retreive */ fun retreive( documentId: String, params: HrisDocumentRetreiveParams = HrisDocumentRetreiveParams.none(), ): DocumentRetreiveResponse = retreive(documentId, params, RequestOptions.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive( params: HrisDocumentRetreiveParams, requestOptions: RequestOptions = RequestOptions.none(), ): DocumentRetreiveResponse - /** @see [retreive] */ + /** @see retreive */ fun retreive(params: HrisDocumentRetreiveParams): DocumentRetreiveResponse = retreive(params, RequestOptions.none()) - /** @see [retreive] */ + /** @see retreive */ fun retreive(documentId: String, requestOptions: RequestOptions): DocumentRetreiveResponse = retreive(documentId, HrisDocumentRetreiveParams.none(), requestOptions) @@ -97,20 +97,20 @@ interface DocumentService { @MustBeClosed fun list(): HttpResponseFor = list(HrisDocumentListParams.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisDocumentListParams = HrisDocumentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisDocumentListParams = HrisDocumentListParams.none() ): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list(requestOptions: RequestOptions): HttpResponseFor = list(HrisDocumentListParams.none(), requestOptions) @@ -123,7 +123,7 @@ interface DocumentService { fun retreive(documentId: String): HttpResponseFor = retreive(documentId, HrisDocumentRetreiveParams.none()) - /** @see [retreive] */ + /** @see retreive */ @MustBeClosed fun retreive( documentId: String, @@ -132,7 +132,7 @@ interface DocumentService { ): HttpResponseFor = retreive(params.toBuilder().documentId(documentId).build(), requestOptions) - /** @see [retreive] */ + /** @see retreive */ @MustBeClosed fun retreive( documentId: String, @@ -140,20 +140,20 @@ interface DocumentService { ): HttpResponseFor = retreive(documentId, params, RequestOptions.none()) - /** @see [retreive] */ + /** @see retreive */ @MustBeClosed fun retreive( params: HrisDocumentRetreiveParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [retreive] */ + /** @see retreive */ @MustBeClosed fun retreive( params: HrisDocumentRetreiveParams ): HttpResponseFor = retreive(params, RequestOptions.none()) - /** @see [retreive] */ + /** @see retreive */ @MustBeClosed fun retreive( documentId: String, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/EmploymentService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/EmploymentService.kt index f3842a5e..29aba9f8 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/EmploymentService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/EmploymentService.kt @@ -28,7 +28,7 @@ interface EmploymentService { fun retrieveMany(params: HrisEmploymentRetrieveManyParams): HrisEmploymentRetrieveManyPage = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisEmploymentRetrieveManyParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -56,7 +56,7 @@ interface EmploymentService { ): HttpResponseFor = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ @MustBeClosed fun retrieveMany( params: HrisEmploymentRetrieveManyParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/IndividualService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/IndividualService.kt index 3b38fc15..697e5dcc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/IndividualService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/IndividualService.kt @@ -28,18 +28,18 @@ interface IndividualService { fun retrieveMany(): HrisIndividualRetrieveManyPage = retrieveMany(HrisIndividualRetrieveManyParams.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HrisIndividualRetrieveManyPage - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.none() ): HrisIndividualRetrieveManyPage = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany(requestOptions: RequestOptions): HrisIndividualRetrieveManyPage = retrieveMany(HrisIndividualRetrieveManyParams.none(), requestOptions) @@ -63,21 +63,21 @@ interface IndividualService { fun retrieveMany(): HttpResponseFor = retrieveMany(HrisIndividualRetrieveManyParams.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ @MustBeClosed fun retrieveMany( params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [retrieveMany] */ + /** @see retrieveMany */ @MustBeClosed fun retrieveMany( params: HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams.none() ): HttpResponseFor = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ @MustBeClosed fun retrieveMany( requestOptions: RequestOptions diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PayStatementService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PayStatementService.kt index 59692114..1af347eb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PayStatementService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PayStatementService.kt @@ -32,7 +32,7 @@ interface PayStatementService { fun retrieveMany(params: HrisPayStatementRetrieveManyParams): HrisPayStatementRetrieveManyPage = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ fun retrieveMany( params: HrisPayStatementRetrieveManyParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -62,7 +62,7 @@ interface PayStatementService { ): HttpResponseFor = retrieveMany(params, RequestOptions.none()) - /** @see [retrieveMany] */ + /** @see retrieveMany */ @MustBeClosed fun retrieveMany( params: HrisPayStatementRetrieveManyParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PaymentService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PaymentService.kt index d72883ab..40b6192f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PaymentService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/PaymentService.kt @@ -28,7 +28,7 @@ interface PaymentService { fun list(params: HrisPaymentListParams): HrisPaymentListPage = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisPaymentListParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -52,7 +52,7 @@ interface PaymentService { fun list(params: HrisPaymentListParams): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisPaymentListParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/benefits/IndividualService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/benefits/IndividualService.kt index c62cf835..60e8f7c9 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/benefits/IndividualService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/benefits/IndividualService.kt @@ -32,7 +32,7 @@ interface IndividualService { fun enrolledIds(benefitId: String): IndividualEnrolledIdsResponse = enrolledIds(benefitId, HrisBenefitIndividualEnrolledIdsParams.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, params: HrisBenefitIndividualEnrolledIdsParams = @@ -41,24 +41,24 @@ interface IndividualService { ): IndividualEnrolledIdsResponse = enrolledIds(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, params: HrisBenefitIndividualEnrolledIdsParams = HrisBenefitIndividualEnrolledIdsParams.none(), ): IndividualEnrolledIdsResponse = enrolledIds(benefitId, params, RequestOptions.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams, requestOptions: RequestOptions = RequestOptions.none(), ): IndividualEnrolledIdsResponse - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds(params: HrisBenefitIndividualEnrolledIdsParams): IndividualEnrolledIdsResponse = enrolledIds(params, RequestOptions.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ fun enrolledIds( benefitId: String, requestOptions: RequestOptions, @@ -69,7 +69,7 @@ interface IndividualService { fun retrieveManyBenefits(benefitId: String): HrisBenefitIndividualRetrieveManyBenefitsPage = retrieveManyBenefits(benefitId, HrisBenefitIndividualRetrieveManyBenefitsParams.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, params: HrisBenefitIndividualRetrieveManyBenefitsParams = @@ -78,7 +78,7 @@ interface IndividualService { ): HrisBenefitIndividualRetrieveManyBenefitsPage = retrieveManyBenefits(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, params: HrisBenefitIndividualRetrieveManyBenefitsParams = @@ -86,19 +86,19 @@ interface IndividualService { ): HrisBenefitIndividualRetrieveManyBenefitsPage = retrieveManyBenefits(benefitId, params, RequestOptions.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams, requestOptions: RequestOptions = RequestOptions.none(), ): HrisBenefitIndividualRetrieveManyBenefitsPage - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams ): HrisBenefitIndividualRetrieveManyBenefitsPage = retrieveManyBenefits(params, RequestOptions.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ fun retrieveManyBenefits( benefitId: String, requestOptions: RequestOptions, @@ -113,7 +113,7 @@ interface IndividualService { fun unenrollMany(benefitId: String): UnenrolledIndividualBenefitResponse = unenrollMany(benefitId, HrisBenefitIndividualUnenrollManyParams.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, params: HrisBenefitIndividualUnenrollManyParams = @@ -122,25 +122,25 @@ interface IndividualService { ): UnenrolledIndividualBenefitResponse = unenrollMany(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, params: HrisBenefitIndividualUnenrollManyParams = HrisBenefitIndividualUnenrollManyParams.none(), ): UnenrolledIndividualBenefitResponse = unenrollMany(benefitId, params, RequestOptions.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams, requestOptions: RequestOptions = RequestOptions.none(), ): UnenrolledIndividualBenefitResponse - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams ): UnenrolledIndividualBenefitResponse = unenrollMany(params, RequestOptions.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ fun unenrollMany( benefitId: String, requestOptions: RequestOptions, @@ -167,7 +167,7 @@ interface IndividualService { fun enrolledIds(benefitId: String): HttpResponseFor = enrolledIds(benefitId, HrisBenefitIndividualEnrolledIdsParams.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ @MustBeClosed fun enrolledIds( benefitId: String, @@ -177,7 +177,7 @@ interface IndividualService { ): HttpResponseFor = enrolledIds(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [enrolledIds] */ + /** @see enrolledIds */ @MustBeClosed fun enrolledIds( benefitId: String, @@ -186,21 +186,21 @@ interface IndividualService { ): HttpResponseFor = enrolledIds(benefitId, params, RequestOptions.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ @MustBeClosed fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [enrolledIds] */ + /** @see enrolledIds */ @MustBeClosed fun enrolledIds( params: HrisBenefitIndividualEnrolledIdsParams ): HttpResponseFor = enrolledIds(params, RequestOptions.none()) - /** @see [enrolledIds] */ + /** @see enrolledIds */ @MustBeClosed fun enrolledIds( benefitId: String, @@ -218,7 +218,7 @@ interface IndividualService { ): HttpResponseFor = retrieveManyBenefits(benefitId, HrisBenefitIndividualRetrieveManyBenefitsParams.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ @MustBeClosed fun retrieveManyBenefits( benefitId: String, @@ -228,7 +228,7 @@ interface IndividualService { ): HttpResponseFor = retrieveManyBenefits(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ @MustBeClosed fun retrieveManyBenefits( benefitId: String, @@ -237,21 +237,21 @@ interface IndividualService { ): HttpResponseFor = retrieveManyBenefits(benefitId, params, RequestOptions.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ @MustBeClosed fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ @MustBeClosed fun retrieveManyBenefits( params: HrisBenefitIndividualRetrieveManyBenefitsParams ): HttpResponseFor = retrieveManyBenefits(params, RequestOptions.none()) - /** @see [retrieveManyBenefits] */ + /** @see retrieveManyBenefits */ @MustBeClosed fun retrieveManyBenefits( benefitId: String, @@ -271,7 +271,7 @@ interface IndividualService { fun unenrollMany(benefitId: String): HttpResponseFor = unenrollMany(benefitId, HrisBenefitIndividualUnenrollManyParams.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ @MustBeClosed fun unenrollMany( benefitId: String, @@ -281,7 +281,7 @@ interface IndividualService { ): HttpResponseFor = unenrollMany(params.toBuilder().benefitId(benefitId).build(), requestOptions) - /** @see [unenrollMany] */ + /** @see unenrollMany */ @MustBeClosed fun unenrollMany( benefitId: String, @@ -290,21 +290,21 @@ interface IndividualService { ): HttpResponseFor = unenrollMany(benefitId, params, RequestOptions.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ @MustBeClosed fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [unenrollMany] */ + /** @see unenrollMany */ @MustBeClosed fun unenrollMany( params: HrisBenefitIndividualUnenrollManyParams ): HttpResponseFor = unenrollMany(params, RequestOptions.none()) - /** @see [unenrollMany] */ + /** @see unenrollMany */ @MustBeClosed fun unenrollMany( benefitId: String, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/PayStatementItemService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/PayStatementItemService.kt index 9b75490b..fcee1301 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/PayStatementItemService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/PayStatementItemService.kt @@ -35,19 +35,19 @@ interface PayStatementItemService { fun list(): HrisCompanyPayStatementItemListPage = list(HrisCompanyPayStatementItemListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemListParams = HrisCompanyPayStatementItemListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HrisCompanyPayStatementItemListPage - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemListParams = HrisCompanyPayStatementItemListParams.none() ): HrisCompanyPayStatementItemListPage = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): HrisCompanyPayStatementItemListPage = list(HrisCompanyPayStatementItemListParams.none(), requestOptions) @@ -76,7 +76,7 @@ interface PayStatementItemService { fun list(): HttpResponseFor = list(HrisCompanyPayStatementItemListParams.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisCompanyPayStatementItemListParams = @@ -84,7 +84,7 @@ interface PayStatementItemService { requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisCompanyPayStatementItemListParams = @@ -92,7 +92,7 @@ interface PayStatementItemService { ): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( requestOptions: RequestOptions diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/payStatementItem/RuleService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/payStatementItem/RuleService.kt index 9014d674..23d76fa9 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/payStatementItem/RuleService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/hris/company/payStatementItem/RuleService.kt @@ -39,20 +39,20 @@ interface RuleService { */ fun create(): RuleCreateResponse = create(HrisCompanyPayStatementItemRuleCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: HrisCompanyPayStatementItemRuleCreateParams = HrisCompanyPayStatementItemRuleCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): RuleCreateResponse - /** @see [create] */ + /** @see create */ fun create( params: HrisCompanyPayStatementItemRuleCreateParams = HrisCompanyPayStatementItemRuleCreateParams.none() ): RuleCreateResponse = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): RuleCreateResponse = create(HrisCompanyPayStatementItemRuleCreateParams.none(), requestOptions) @@ -63,7 +63,7 @@ interface RuleService { fun update(ruleId: String): RuleUpdateResponse = update(ruleId, HrisCompanyPayStatementItemRuleUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( ruleId: String, params: HrisCompanyPayStatementItemRuleUpdateParams = @@ -71,24 +71,24 @@ interface RuleService { requestOptions: RequestOptions = RequestOptions.none(), ): RuleUpdateResponse = update(params.toBuilder().ruleId(ruleId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( ruleId: String, params: HrisCompanyPayStatementItemRuleUpdateParams = HrisCompanyPayStatementItemRuleUpdateParams.none(), ): RuleUpdateResponse = update(ruleId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: HrisCompanyPayStatementItemRuleUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): RuleUpdateResponse - /** @see [update] */ + /** @see update */ fun update(params: HrisCompanyPayStatementItemRuleUpdateParams): RuleUpdateResponse = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update(ruleId: String, requestOptions: RequestOptions): RuleUpdateResponse = update(ruleId, HrisCompanyPayStatementItemRuleUpdateParams.none(), requestOptions) @@ -99,20 +99,20 @@ interface RuleService { fun list(): HrisCompanyPayStatementItemRuleListPage = list(HrisCompanyPayStatementItemRuleListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemRuleListParams = HrisCompanyPayStatementItemRuleListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HrisCompanyPayStatementItemRuleListPage - /** @see [list] */ + /** @see list */ fun list( params: HrisCompanyPayStatementItemRuleListParams = HrisCompanyPayStatementItemRuleListParams.none() ): HrisCompanyPayStatementItemRuleListPage = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): HrisCompanyPayStatementItemRuleListPage = list(HrisCompanyPayStatementItemRuleListParams.none(), requestOptions) @@ -123,7 +123,7 @@ interface RuleService { fun delete(ruleId: String): RuleDeleteResponse = delete(ruleId, HrisCompanyPayStatementItemRuleDeleteParams.none()) - /** @see [delete] */ + /** @see delete */ fun delete( ruleId: String, params: HrisCompanyPayStatementItemRuleDeleteParams = @@ -131,24 +131,24 @@ interface RuleService { requestOptions: RequestOptions = RequestOptions.none(), ): RuleDeleteResponse = delete(params.toBuilder().ruleId(ruleId).build(), requestOptions) - /** @see [delete] */ + /** @see delete */ fun delete( ruleId: String, params: HrisCompanyPayStatementItemRuleDeleteParams = HrisCompanyPayStatementItemRuleDeleteParams.none(), ): RuleDeleteResponse = delete(ruleId, params, RequestOptions.none()) - /** @see [delete] */ + /** @see delete */ fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams, requestOptions: RequestOptions = RequestOptions.none(), ): RuleDeleteResponse - /** @see [delete] */ + /** @see delete */ fun delete(params: HrisCompanyPayStatementItemRuleDeleteParams): RuleDeleteResponse = delete(params, RequestOptions.none()) - /** @see [delete] */ + /** @see delete */ fun delete(ruleId: String, requestOptions: RequestOptions): RuleDeleteResponse = delete(ruleId, HrisCompanyPayStatementItemRuleDeleteParams.none(), requestOptions) @@ -170,7 +170,7 @@ interface RuleService { fun create(): HttpResponseFor = create(HrisCompanyPayStatementItemRuleCreateParams.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: HrisCompanyPayStatementItemRuleCreateParams = @@ -178,14 +178,14 @@ interface RuleService { requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: HrisCompanyPayStatementItemRuleCreateParams = HrisCompanyPayStatementItemRuleCreateParams.none() ): HttpResponseFor = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create(requestOptions: RequestOptions): HttpResponseFor = create(HrisCompanyPayStatementItemRuleCreateParams.none(), requestOptions) @@ -198,7 +198,7 @@ interface RuleService { fun update(ruleId: String): HttpResponseFor = update(ruleId, HrisCompanyPayStatementItemRuleUpdateParams.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( ruleId: String, @@ -208,7 +208,7 @@ interface RuleService { ): HttpResponseFor = update(params.toBuilder().ruleId(ruleId).build(), requestOptions) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( ruleId: String, @@ -216,20 +216,20 @@ interface RuleService { HrisCompanyPayStatementItemRuleUpdateParams.none(), ): HttpResponseFor = update(ruleId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: HrisCompanyPayStatementItemRuleUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: HrisCompanyPayStatementItemRuleUpdateParams ): HttpResponseFor = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( ruleId: String, @@ -245,7 +245,7 @@ interface RuleService { fun list(): HttpResponseFor = list(HrisCompanyPayStatementItemRuleListParams.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisCompanyPayStatementItemRuleListParams = @@ -253,7 +253,7 @@ interface RuleService { requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: HrisCompanyPayStatementItemRuleListParams = @@ -261,7 +261,7 @@ interface RuleService { ): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( requestOptions: RequestOptions @@ -276,7 +276,7 @@ interface RuleService { fun delete(ruleId: String): HttpResponseFor = delete(ruleId, HrisCompanyPayStatementItemRuleDeleteParams.none()) - /** @see [delete] */ + /** @see delete */ @MustBeClosed fun delete( ruleId: String, @@ -286,7 +286,7 @@ interface RuleService { ): HttpResponseFor = delete(params.toBuilder().ruleId(ruleId).build(), requestOptions) - /** @see [delete] */ + /** @see delete */ @MustBeClosed fun delete( ruleId: String, @@ -294,20 +294,20 @@ interface RuleService { HrisCompanyPayStatementItemRuleDeleteParams.none(), ): HttpResponseFor = delete(ruleId, params, RequestOptions.none()) - /** @see [delete] */ + /** @see delete */ @MustBeClosed fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [delete] */ + /** @see delete */ @MustBeClosed fun delete( params: HrisCompanyPayStatementItemRuleDeleteParams ): HttpResponseFor = delete(params, RequestOptions.none()) - /** @see [delete] */ + /** @see delete */ @MustBeClosed fun delete( ruleId: String, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt index ff25fa31..71bf6cb1 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt @@ -45,18 +45,18 @@ interface AutomatedService { */ fun create(): AutomatedCreateResponse = create(JobAutomatedCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: JobAutomatedCreateParams = JobAutomatedCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): AutomatedCreateResponse - /** @see [create] */ + /** @see create */ fun create( params: JobAutomatedCreateParams = JobAutomatedCreateParams.none() ): AutomatedCreateResponse = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): AutomatedCreateResponse = create(JobAutomatedCreateParams.none(), requestOptions) @@ -64,30 +64,30 @@ interface AutomatedService { fun retrieve(jobId: String): AutomatedAsyncJob = retrieve(jobId, JobAutomatedRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobAutomatedRetrieveParams = JobAutomatedRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): AutomatedAsyncJob = retrieve(params.toBuilder().jobId(jobId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobAutomatedRetrieveParams = JobAutomatedRetrieveParams.none(), ): AutomatedAsyncJob = retrieve(jobId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: JobAutomatedRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): AutomatedAsyncJob - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(params: JobAutomatedRetrieveParams): AutomatedAsyncJob = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(jobId: String, requestOptions: RequestOptions): AutomatedAsyncJob = retrieve(jobId, JobAutomatedRetrieveParams.none(), requestOptions) @@ -98,18 +98,18 @@ interface AutomatedService { */ fun list(): AutomatedListResponse = list(JobAutomatedListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: JobAutomatedListParams = JobAutomatedListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): AutomatedListResponse - /** @see [list] */ + /** @see list */ fun list( params: JobAutomatedListParams = JobAutomatedListParams.none() ): AutomatedListResponse = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): AutomatedListResponse = list(JobAutomatedListParams.none(), requestOptions) @@ -131,20 +131,20 @@ interface AutomatedService { fun create(): HttpResponseFor = create(JobAutomatedCreateParams.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: JobAutomatedCreateParams = JobAutomatedCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: JobAutomatedCreateParams = JobAutomatedCreateParams.none() ): HttpResponseFor = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create(requestOptions: RequestOptions): HttpResponseFor = create(JobAutomatedCreateParams.none(), requestOptions) @@ -157,7 +157,7 @@ interface AutomatedService { fun retrieve(jobId: String): HttpResponseFor = retrieve(jobId, JobAutomatedRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( jobId: String, @@ -166,26 +166,26 @@ interface AutomatedService { ): HttpResponseFor = retrieve(params.toBuilder().jobId(jobId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( jobId: String, params: JobAutomatedRetrieveParams = JobAutomatedRetrieveParams.none(), ): HttpResponseFor = retrieve(jobId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: JobAutomatedRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve(params: JobAutomatedRetrieveParams): HttpResponseFor = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( jobId: String, @@ -200,20 +200,20 @@ interface AutomatedService { @MustBeClosed fun list(): HttpResponseFor = list(JobAutomatedListParams.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: JobAutomatedListParams = JobAutomatedListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: JobAutomatedListParams = JobAutomatedListParams.none() ): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list(requestOptions: RequestOptions): HttpResponseFor = list(JobAutomatedListParams.none(), requestOptions) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/ManualService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/ManualService.kt index 4b375204..3c3d89fb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/ManualService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/ManualService.kt @@ -30,30 +30,30 @@ interface ManualService { */ fun retrieve(jobId: String): ManualAsyncJob = retrieve(jobId, JobManualRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobManualRetrieveParams = JobManualRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): ManualAsyncJob = retrieve(params.toBuilder().jobId(jobId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( jobId: String, params: JobManualRetrieveParams = JobManualRetrieveParams.none(), ): ManualAsyncJob = retrieve(jobId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: JobManualRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): ManualAsyncJob - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(params: JobManualRetrieveParams): ManualAsyncJob = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(jobId: String, requestOptions: RequestOptions): ManualAsyncJob = retrieve(jobId, JobManualRetrieveParams.none(), requestOptions) @@ -75,7 +75,7 @@ interface ManualService { fun retrieve(jobId: String): HttpResponseFor = retrieve(jobId, JobManualRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( jobId: String, @@ -84,26 +84,26 @@ interface ManualService { ): HttpResponseFor = retrieve(params.toBuilder().jobId(jobId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( jobId: String, params: JobManualRetrieveParams = JobManualRetrieveParams.none(), ): HttpResponseFor = retrieve(jobId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: JobManualRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve(params: JobManualRetrieveParams): HttpResponseFor = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( jobId: String, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/payroll/PayGroupService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/payroll/PayGroupService.kt index cef03233..d1cce00c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/payroll/PayGroupService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/payroll/PayGroupService.kt @@ -30,7 +30,7 @@ interface PayGroupService { fun retrieve(payGroupId: String): PayGroupRetrieveResponse = retrieve(payGroupId, PayrollPayGroupRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( payGroupId: String, params: PayrollPayGroupRetrieveParams = PayrollPayGroupRetrieveParams.none(), @@ -38,41 +38,41 @@ interface PayGroupService { ): PayGroupRetrieveResponse = retrieve(params.toBuilder().payGroupId(payGroupId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( payGroupId: String, params: PayrollPayGroupRetrieveParams = PayrollPayGroupRetrieveParams.none(), ): PayGroupRetrieveResponse = retrieve(payGroupId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: PayrollPayGroupRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): PayGroupRetrieveResponse - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(params: PayrollPayGroupRetrieveParams): PayGroupRetrieveResponse = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(payGroupId: String, requestOptions: RequestOptions): PayGroupRetrieveResponse = retrieve(payGroupId, PayrollPayGroupRetrieveParams.none(), requestOptions) /** Read company pay groups and frequencies */ fun list(): PayrollPayGroupListPage = list(PayrollPayGroupListParams.none()) - /** @see [list] */ + /** @see list */ fun list( params: PayrollPayGroupListParams = PayrollPayGroupListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): PayrollPayGroupListPage - /** @see [list] */ + /** @see list */ fun list( params: PayrollPayGroupListParams = PayrollPayGroupListParams.none() ): PayrollPayGroupListPage = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ fun list(requestOptions: RequestOptions): PayrollPayGroupListPage = list(PayrollPayGroupListParams.none(), requestOptions) @@ -94,7 +94,7 @@ interface PayGroupService { fun retrieve(payGroupId: String): HttpResponseFor = retrieve(payGroupId, PayrollPayGroupRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( payGroupId: String, @@ -103,7 +103,7 @@ interface PayGroupService { ): HttpResponseFor = retrieve(params.toBuilder().payGroupId(payGroupId).build(), requestOptions) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( payGroupId: String, @@ -111,20 +111,20 @@ interface PayGroupService { ): HttpResponseFor = retrieve(payGroupId, params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: PayrollPayGroupRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: PayrollPayGroupRetrieveParams ): HttpResponseFor = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( payGroupId: String, @@ -140,20 +140,20 @@ interface PayGroupService { fun list(): HttpResponseFor = list(PayrollPayGroupListParams.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: PayrollPayGroupListParams = PayrollPayGroupListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [list] */ + /** @see list */ @MustBeClosed fun list( params: PayrollPayGroupListParams = PayrollPayGroupListParams.none() ): HttpResponseFor = list(params, RequestOptions.none()) - /** @see [list] */ + /** @see list */ @MustBeClosed fun list(requestOptions: RequestOptions): HttpResponseFor = list(PayrollPayGroupListParams.none(), requestOptions) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/CompanyService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/CompanyService.kt index e01715b6..05c427c2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/CompanyService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/CompanyService.kt @@ -28,7 +28,7 @@ interface CompanyService { fun update(params: SandboxCompanyUpdateParams): CompanyUpdateResponse = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxCompanyUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -52,7 +52,7 @@ interface CompanyService { fun update(params: SandboxCompanyUpdateParams): HttpResponseFor = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: SandboxCompanyUpdateParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionService.kt index 1cf89b9f..1dc98bc3 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionService.kt @@ -31,7 +31,7 @@ interface ConnectionService { fun create(params: SandboxConnectionCreateParams): ConnectionCreateResponse = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxConnectionCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -60,7 +60,7 @@ interface ConnectionService { params: SandboxConnectionCreateParams ): HttpResponseFor = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: SandboxConnectionCreateParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryService.kt index aafbb8b7..2b9fda7d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryService.kt @@ -27,18 +27,18 @@ interface DirectoryService { /** Add new individuals to a sandbox company */ fun create(): List = create(SandboxDirectoryCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxDirectoryCreateParams = SandboxDirectoryCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): List - /** @see [create] */ + /** @see create */ fun create( params: SandboxDirectoryCreateParams = SandboxDirectoryCreateParams.none() ): List = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): List = create(SandboxDirectoryCreateParams.none(), requestOptions) @@ -60,20 +60,20 @@ interface DirectoryService { fun create(): HttpResponseFor> = create(SandboxDirectoryCreateParams.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: SandboxDirectoryCreateParams = SandboxDirectoryCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor> - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: SandboxDirectoryCreateParams = SandboxDirectoryCreateParams.none() ): HttpResponseFor> = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create(requestOptions: RequestOptions): HttpResponseFor> = create(SandboxDirectoryCreateParams.none(), requestOptions) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentService.kt index b33e45c7..3a8a3750 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentService.kt @@ -28,7 +28,7 @@ interface EmploymentService { fun update(individualId: String): EmploymentUpdateResponse = update(individualId, SandboxEmploymentUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxEmploymentUpdateParams = SandboxEmploymentUpdateParams.none(), @@ -36,23 +36,23 @@ interface EmploymentService { ): EmploymentUpdateResponse = update(params.toBuilder().individualId(individualId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxEmploymentUpdateParams = SandboxEmploymentUpdateParams.none(), ): EmploymentUpdateResponse = update(individualId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxEmploymentUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): EmploymentUpdateResponse - /** @see [update] */ + /** @see update */ fun update(params: SandboxEmploymentUpdateParams): EmploymentUpdateResponse = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update(individualId: String, requestOptions: RequestOptions): EmploymentUpdateResponse = update(individualId, SandboxEmploymentUpdateParams.none(), requestOptions) @@ -76,7 +76,7 @@ interface EmploymentService { fun update(individualId: String): HttpResponseFor = update(individualId, SandboxEmploymentUpdateParams.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( individualId: String, @@ -85,7 +85,7 @@ interface EmploymentService { ): HttpResponseFor = update(params.toBuilder().individualId(individualId).build(), requestOptions) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( individualId: String, @@ -93,20 +93,20 @@ interface EmploymentService { ): HttpResponseFor = update(individualId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: SandboxEmploymentUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: SandboxEmploymentUpdateParams ): HttpResponseFor = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( individualId: String, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/IndividualService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/IndividualService.kt index 50633080..0b6ea10d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/IndividualService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/IndividualService.kt @@ -28,7 +28,7 @@ interface IndividualService { fun update(individualId: String): IndividualUpdateResponse = update(individualId, SandboxIndividualUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxIndividualUpdateParams = SandboxIndividualUpdateParams.none(), @@ -36,23 +36,23 @@ interface IndividualService { ): IndividualUpdateResponse = update(params.toBuilder().individualId(individualId).build(), requestOptions) - /** @see [update] */ + /** @see update */ fun update( individualId: String, params: SandboxIndividualUpdateParams = SandboxIndividualUpdateParams.none(), ): IndividualUpdateResponse = update(individualId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxIndividualUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): IndividualUpdateResponse - /** @see [update] */ + /** @see update */ fun update(params: SandboxIndividualUpdateParams): IndividualUpdateResponse = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update(individualId: String, requestOptions: RequestOptions): IndividualUpdateResponse = update(individualId, SandboxIndividualUpdateParams.none(), requestOptions) @@ -76,7 +76,7 @@ interface IndividualService { fun update(individualId: String): HttpResponseFor = update(individualId, SandboxIndividualUpdateParams.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( individualId: String, @@ -85,7 +85,7 @@ interface IndividualService { ): HttpResponseFor = update(params.toBuilder().individualId(individualId).build(), requestOptions) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( individualId: String, @@ -93,20 +93,20 @@ interface IndividualService { ): HttpResponseFor = update(individualId, params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: SandboxIndividualUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: SandboxIndividualUpdateParams ): HttpResponseFor = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( individualId: String, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/JobService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/JobService.kt index 76af0515..5781b08a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/JobService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/JobService.kt @@ -31,7 +31,7 @@ interface JobService { fun create(params: SandboxJobCreateParams): JobCreateResponse = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxJobCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -57,7 +57,7 @@ interface JobService { fun create(params: SandboxJobCreateParams): HttpResponseFor = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: SandboxJobCreateParams, diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentService.kt index 8c4d831c..bf14651b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentService.kt @@ -27,18 +27,18 @@ interface PaymentService { /** Add a new sandbox payment */ fun create(): PaymentCreateResponse = create(SandboxPaymentCreateParams.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxPaymentCreateParams = SandboxPaymentCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): PaymentCreateResponse - /** @see [create] */ + /** @see create */ fun create( params: SandboxPaymentCreateParams = SandboxPaymentCreateParams.none() ): PaymentCreateResponse = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create(requestOptions: RequestOptions): PaymentCreateResponse = create(SandboxPaymentCreateParams.none(), requestOptions) @@ -60,20 +60,20 @@ interface PaymentService { fun create(): HttpResponseFor = create(SandboxPaymentCreateParams.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: SandboxPaymentCreateParams = SandboxPaymentCreateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: SandboxPaymentCreateParams = SandboxPaymentCreateParams.none() ): HttpResponseFor = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create(requestOptions: RequestOptions): HttpResponseFor = create(SandboxPaymentCreateParams.none(), requestOptions) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/connections/AccountService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/connections/AccountService.kt index 57e81402..e79f1520 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/connections/AccountService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/connections/AccountService.kt @@ -30,7 +30,7 @@ interface AccountService { fun create(params: SandboxConnectionAccountCreateParams): AccountCreateResponse = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ fun create( params: SandboxConnectionAccountCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -42,18 +42,18 @@ interface AccountService { */ fun update(): AccountUpdateResponse = update(SandboxConnectionAccountUpdateParams.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxConnectionAccountUpdateParams = SandboxConnectionAccountUpdateParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): AccountUpdateResponse - /** @see [update] */ + /** @see update */ fun update( params: SandboxConnectionAccountUpdateParams = SandboxConnectionAccountUpdateParams.none() ): AccountUpdateResponse = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update(requestOptions: RequestOptions): AccountUpdateResponse = update(SandboxConnectionAccountUpdateParams.none(), requestOptions) @@ -76,7 +76,7 @@ interface AccountService { params: SandboxConnectionAccountCreateParams ): HttpResponseFor = create(params, RequestOptions.none()) - /** @see [create] */ + /** @see create */ @MustBeClosed fun create( params: SandboxConnectionAccountCreateParams, @@ -91,7 +91,7 @@ interface AccountService { fun update(): HttpResponseFor = update(SandboxConnectionAccountUpdateParams.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: SandboxConnectionAccountUpdateParams = @@ -99,14 +99,14 @@ interface AccountService { requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: SandboxConnectionAccountUpdateParams = SandboxConnectionAccountUpdateParams.none() ): HttpResponseFor = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update(requestOptions: RequestOptions): HttpResponseFor = update(SandboxConnectionAccountUpdateParams.none(), requestOptions) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/jobs/ConfigurationService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/jobs/ConfigurationService.kt index 527c841e..e8623714 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/jobs/ConfigurationService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/sandbox/jobs/ConfigurationService.kt @@ -29,19 +29,19 @@ interface ConfigurationService { fun retrieve(): List = retrieve(SandboxJobConfigurationRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: SandboxJobConfigurationRetrieveParams = SandboxJobConfigurationRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), ): List - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve( params: SandboxJobConfigurationRetrieveParams = SandboxJobConfigurationRetrieveParams.none() ): List = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ fun retrieve(requestOptions: RequestOptions): List = retrieve(SandboxJobConfigurationRetrieveParams.none(), requestOptions) @@ -49,7 +49,7 @@ interface ConfigurationService { fun update(params: SandboxJobConfigurationUpdateParams): SandboxJobConfiguration = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ fun update( params: SandboxJobConfigurationUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -77,7 +77,7 @@ interface ConfigurationService { fun retrieve(): HttpResponseFor> = retrieve(SandboxJobConfigurationRetrieveParams.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: SandboxJobConfigurationRetrieveParams = @@ -85,14 +85,14 @@ interface ConfigurationService { requestOptions: RequestOptions = RequestOptions.none(), ): HttpResponseFor> - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( params: SandboxJobConfigurationRetrieveParams = SandboxJobConfigurationRetrieveParams.none() ): HttpResponseFor> = retrieve(params, RequestOptions.none()) - /** @see [retrieve] */ + /** @see retrieve */ @MustBeClosed fun retrieve( requestOptions: RequestOptions @@ -108,7 +108,7 @@ interface ConfigurationService { params: SandboxJobConfigurationUpdateParams ): HttpResponseFor = update(params, RequestOptions.none()) - /** @see [update] */ + /** @see update */ @MustBeClosed fun update( params: SandboxJobConfigurationUpdateParams, From 7e48fcff3d3c3a80fae1585250d7ae9767a8cea7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 16:28:21 +0000 Subject: [PATCH 18/19] docs: more code comments --- README.md | 4 +- .../api/client/okhttp/FinchOkHttpClient.kt | 68 ++++++++- .../client/okhttp/FinchOkHttpClientAsync.kt | 68 ++++++++- .../com/tryfinch/api/core/ClientOptions.kt | 133 ++++++++++++++++++ .../api/models/AccessTokenCreateParams.kt | 2 + .../api/models/AccountDisconnectParams.kt | 3 + .../api/models/AccountIntrospectParams.kt | 2 + .../api/models/ConnectSessionNewParams.kt | 2 + .../ConnectSessionReauthenticateParams.kt | 2 + .../api/models/HrisBenefitCreateParams.kt | 2 + .../HrisBenefitIndividualEnrolledIdsParams.kt | 2 + ...fitIndividualRetrieveManyBenefitsParams.kt | 2 + ...HrisBenefitIndividualUnenrollManyParams.kt | 2 + .../api/models/HrisBenefitListParams.kt | 2 + .../HrisBenefitListSupportedBenefitsParams.kt | 2 + .../api/models/HrisBenefitRetrieveParams.kt | 2 + .../api/models/HrisBenefitUpdateParams.kt | 2 + .../HrisCompanyPayStatementItemListParams.kt | 2 + ...CompanyPayStatementItemRuleCreateParams.kt | 2 + ...CompanyPayStatementItemRuleDeleteParams.kt | 3 + ...isCompanyPayStatementItemRuleListParams.kt | 2 + ...CompanyPayStatementItemRuleUpdateParams.kt | 2 + .../api/models/HrisCompanyRetrieveParams.kt | 2 + .../HrisDirectoryListIndividualsParams.kt | 2 + .../api/models/HrisDirectoryListParams.kt | 2 + .../api/models/HrisDocumentListParams.kt | 2 + .../api/models/HrisDocumentRetreiveParams.kt | 2 + .../HrisEmploymentRetrieveManyParams.kt | 2 + .../HrisIndividualRetrieveManyParams.kt | 2 + .../HrisPayStatementRetrieveManyParams.kt | 2 + .../api/models/HrisPaymentListParams.kt | 2 + .../api/models/JobAutomatedCreateParams.kt | 2 + .../api/models/JobAutomatedListParams.kt | 2 + .../api/models/JobAutomatedRetrieveParams.kt | 2 + .../api/models/JobManualRetrieveParams.kt | 2 + .../api/models/PayrollPayGroupListParams.kt | 2 + .../models/PayrollPayGroupRetrieveParams.kt | 2 + .../tryfinch/api/models/ProviderListParams.kt | 2 + .../models/RequestForwardingForwardParams.kt | 2 + .../api/models/SandboxCompanyUpdateParams.kt | 2 + .../SandboxConnectionAccountCreateParams.kt | 2 + .../SandboxConnectionAccountUpdateParams.kt | 2 + .../models/SandboxConnectionCreateParams.kt | 2 + .../models/SandboxDirectoryCreateParams.kt | 2 + .../models/SandboxEmploymentUpdateParams.kt | 2 + .../models/SandboxIndividualUpdateParams.kt | 2 + .../SandboxJobConfigurationRetrieveParams.kt | 2 + .../SandboxJobConfigurationUpdateParams.kt | 2 + .../api/models/SandboxJobCreateParams.kt | 2 + .../api/models/SandboxPaymentCreateParams.kt | 2 + 50 files changed, 363 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f5ad5396..8559e726 100644 --- a/README.md +++ b/README.md @@ -380,7 +380,7 @@ If the SDK threw an exception, but you're _certain_ the version is compatible, t ### Retries -The SDK automatically retries 2 times by default, with a short exponential backoff. +The SDK automatically retries 2 times by default, with a short exponential backoff between requests. Only the following error types are retried: @@ -390,7 +390,7 @@ Only the following error types are retried: - 429 Rate Limit - 5xx Internal -The API may also explicitly instruct the SDK to retry or not retry a response. +The API may also explicitly instruct the SDK to retry or not retry a request. To set a custom number of retries, configure the client using the `maxRetries` method: diff --git a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt index aee9edfa..a41f3cdd 100644 --- a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt +++ b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClient.kt @@ -7,7 +7,9 @@ import com.tryfinch.api.client.FinchClient import com.tryfinch.api.client.FinchClientImpl import com.tryfinch.api.core.ClientOptions import com.tryfinch.api.core.Timeout +import com.tryfinch.api.core.http.AsyncStreamResponse import com.tryfinch.api.core.http.Headers +import com.tryfinch.api.core.http.HttpClient import com.tryfinch.api.core.http.QueryParams import com.tryfinch.api.core.jsonMapper import java.net.Proxy @@ -20,13 +22,22 @@ import javax.net.ssl.SSLSocketFactory import javax.net.ssl.X509TrustManager import kotlin.jvm.optionals.getOrNull +/** + * A class that allows building an instance of [FinchClient] with [OkHttpClient] as the underlying + * [HttpClient]. + */ class FinchOkHttpClient private constructor() { companion object { - /** Returns a mutable builder for constructing an instance of [FinchOkHttpClient]. */ + /** Returns a mutable builder for constructing an instance of [FinchClient]. */ @JvmStatic fun builder() = Builder() + /** + * Returns a client configured using system properties and environment variables. + * + * @see ClientOptions.Builder.fromEnv + */ @JvmStatic fun fromEnv(): FinchClient = builder().fromEnv().build() } @@ -103,23 +114,58 @@ class FinchOkHttpClient private constructor() { clientOptions.checkJacksonVersionCompatibility(checkJacksonVersionCompatibility) } + /** + * The Jackson JSON mapper to use for serializing and deserializing JSON. + * + * Defaults to [com.tryfinch.api.core.jsonMapper]. The default is usually sufficient and + * rarely needs to be overridden. + */ fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) } + /** + * The executor to use for running [AsyncStreamResponse.Handler] callbacks. + * + * Defaults to a dedicated cached thread pool. + */ fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { clientOptions.streamHandlerExecutor(streamHandlerExecutor) } + /** + * The clock to use for operations that require timing, like retries. + * + * This is primarily useful for using a fake clock in tests. + * + * Defaults to [Clock.systemUTC]. + */ fun clock(clock: Clock) = apply { clientOptions.clock(clock) } + /** + * The base URL to use for every request. + * + * Defaults to the production environment: `https://api.tryfinch.com`. + */ fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) } /** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */ fun baseUrl(baseUrl: Optional) = baseUrl(baseUrl.getOrNull()) + /** + * Whether to call `validate` on every response before returning it. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ fun responseValidation(responseValidation: Boolean) = apply { clientOptions.responseValidation(responseValidation) } + /** + * Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding + * retries. + * + * Defaults to [Timeout.default]. + */ fun timeout(timeout: Timeout) = apply { clientOptions.timeout(timeout) } /** @@ -131,6 +177,21 @@ class FinchOkHttpClient private constructor() { */ fun timeout(timeout: Duration) = apply { clientOptions.timeout(timeout) } + /** + * The maximum number of times to retry failed requests, with a short exponential backoff + * between requests. + * + * Only the following error types are retried: + * - Connection errors (for example, due to a network connectivity problem) + * - 408 Request Timeout + * - 409 Conflict + * - 429 Rate Limit + * - 5xx Internal + * + * The API may also explicitly instruct the SDK to retry or not retry a request. + * + * Defaults to 2. + */ fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } fun accessToken(accessToken: String?) = apply { clientOptions.accessToken(accessToken) } @@ -236,6 +297,11 @@ class FinchOkHttpClient private constructor() { clientOptions.removeAllQueryParams(keys) } + /** + * Updates configuration using system properties and environment variables. + * + * @see ClientOptions.Builder.fromEnv + */ fun fromEnv() = apply { clientOptions.fromEnv() } /** diff --git a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt index 7279181b..23d05eb1 100644 --- a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt +++ b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/FinchOkHttpClientAsync.kt @@ -7,7 +7,9 @@ import com.tryfinch.api.client.FinchClientAsync import com.tryfinch.api.client.FinchClientAsyncImpl import com.tryfinch.api.core.ClientOptions import com.tryfinch.api.core.Timeout +import com.tryfinch.api.core.http.AsyncStreamResponse import com.tryfinch.api.core.http.Headers +import com.tryfinch.api.core.http.HttpClient import com.tryfinch.api.core.http.QueryParams import com.tryfinch.api.core.jsonMapper import java.net.Proxy @@ -20,13 +22,22 @@ import javax.net.ssl.SSLSocketFactory import javax.net.ssl.X509TrustManager import kotlin.jvm.optionals.getOrNull +/** + * A class that allows building an instance of [FinchClientAsync] with [OkHttpClient] as the + * underlying [HttpClient]. + */ class FinchOkHttpClientAsync private constructor() { companion object { - /** Returns a mutable builder for constructing an instance of [FinchOkHttpClientAsync]. */ + /** Returns a mutable builder for constructing an instance of [FinchClientAsync]. */ @JvmStatic fun builder() = Builder() + /** + * Returns a client configured using system properties and environment variables. + * + * @see ClientOptions.Builder.fromEnv + */ @JvmStatic fun fromEnv(): FinchClientAsync = builder().fromEnv().build() } @@ -103,23 +114,58 @@ class FinchOkHttpClientAsync private constructor() { clientOptions.checkJacksonVersionCompatibility(checkJacksonVersionCompatibility) } + /** + * The Jackson JSON mapper to use for serializing and deserializing JSON. + * + * Defaults to [com.tryfinch.api.core.jsonMapper]. The default is usually sufficient and + * rarely needs to be overridden. + */ fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) } + /** + * The executor to use for running [AsyncStreamResponse.Handler] callbacks. + * + * Defaults to a dedicated cached thread pool. + */ fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { clientOptions.streamHandlerExecutor(streamHandlerExecutor) } + /** + * The clock to use for operations that require timing, like retries. + * + * This is primarily useful for using a fake clock in tests. + * + * Defaults to [Clock.systemUTC]. + */ fun clock(clock: Clock) = apply { clientOptions.clock(clock) } + /** + * The base URL to use for every request. + * + * Defaults to the production environment: `https://api.tryfinch.com`. + */ fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) } /** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */ fun baseUrl(baseUrl: Optional) = baseUrl(baseUrl.getOrNull()) + /** + * Whether to call `validate` on every response before returning it. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ fun responseValidation(responseValidation: Boolean) = apply { clientOptions.responseValidation(responseValidation) } + /** + * Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding + * retries. + * + * Defaults to [Timeout.default]. + */ fun timeout(timeout: Timeout) = apply { clientOptions.timeout(timeout) } /** @@ -131,6 +177,21 @@ class FinchOkHttpClientAsync private constructor() { */ fun timeout(timeout: Duration) = apply { clientOptions.timeout(timeout) } + /** + * The maximum number of times to retry failed requests, with a short exponential backoff + * between requests. + * + * Only the following error types are retried: + * - Connection errors (for example, due to a network connectivity problem) + * - 408 Request Timeout + * - 409 Conflict + * - 429 Rate Limit + * - 5xx Internal + * + * The API may also explicitly instruct the SDK to retry or not retry a request. + * + * Defaults to 2. + */ fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } fun accessToken(accessToken: String?) = apply { clientOptions.accessToken(accessToken) } @@ -236,6 +297,11 @@ class FinchOkHttpClientAsync private constructor() { clientOptions.removeAllQueryParams(keys) } + /** + * Updates configuration using system properties and environment variables. + * + * @see ClientOptions.Builder.fromEnv + */ fun fromEnv() = apply { clientOptions.fromEnv() } /** diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt index 51ed9fd6..4412cdc0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/core/ClientOptions.kt @@ -3,6 +3,7 @@ package com.tryfinch.api.core import com.fasterxml.jackson.databind.json.JsonMapper +import com.tryfinch.api.core.http.AsyncStreamResponse import com.tryfinch.api.core.http.Headers import com.tryfinch.api.core.http.HttpClient import com.tryfinch.api.core.http.PhantomReachableClosingHttpClient @@ -18,9 +19,15 @@ import java.util.concurrent.ThreadFactory import java.util.concurrent.atomic.AtomicLong import kotlin.jvm.optionals.getOrNull +/** A class representing the SDK client configuration. */ class ClientOptions private constructor( private val originalHttpClient: HttpClient, + /** + * The HTTP client to use in the SDK. + * + * Use the one published in `finch-java-client-okhttp` or implement your own. + */ @get:JvmName("httpClient") val httpClient: HttpClient, /** * Whether to throw an exception if any of the Jackson versions detected at runtime are @@ -30,14 +37,61 @@ private constructor( * the SDK will work correctly when using an incompatible Jackson version. */ @get:JvmName("checkJacksonVersionCompatibility") val checkJacksonVersionCompatibility: Boolean, + /** + * The Jackson JSON mapper to use for serializing and deserializing JSON. + * + * Defaults to [com.tryfinch.api.core.jsonMapper]. The default is usually sufficient and rarely + * needs to be overridden. + */ @get:JvmName("jsonMapper") val jsonMapper: JsonMapper, + /** + * The executor to use for running [AsyncStreamResponse.Handler] callbacks. + * + * Defaults to a dedicated cached thread pool. + */ @get:JvmName("streamHandlerExecutor") val streamHandlerExecutor: Executor, + /** + * The clock to use for operations that require timing, like retries. + * + * This is primarily useful for using a fake clock in tests. + * + * Defaults to [Clock.systemUTC]. + */ @get:JvmName("clock") val clock: Clock, private val baseUrl: String?, + /** Headers to send with the request. */ @get:JvmName("headers") val headers: Headers, + /** Query params to send with the request. */ @get:JvmName("queryParams") val queryParams: QueryParams, + /** + * Whether to call `validate` on every response before returning it. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ @get:JvmName("responseValidation") val responseValidation: Boolean, + /** + * Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding + * retries. + * + * Defaults to [Timeout.default]. + */ @get:JvmName("timeout") val timeout: Timeout, + /** + * The maximum number of times to retry failed requests, with a short exponential backoff + * between requests. + * + * Only the following error types are retried: + * - Connection errors (for example, due to a network connectivity problem) + * - 408 Request Timeout + * - 409 Conflict + * - 429 Rate Limit + * - 5xx Internal + * + * The API may also explicitly instruct the SDK to retry or not retry a request. + * + * Defaults to 2. + */ @get:JvmName("maxRetries") val maxRetries: Int, private val accessToken: String?, private val clientId: String?, @@ -51,6 +105,11 @@ private constructor( } } + /** + * The base URL to use for every request. + * + * Defaults to the production environment: `https://api.tryfinch.com`. + */ fun baseUrl(): String = baseUrl ?: PRODUCTION_URL fun accessToken(): Optional = Optional.ofNullable(accessToken) @@ -77,6 +136,11 @@ private constructor( */ @JvmStatic fun builder() = Builder() + /** + * Returns options configured using system properties and environment variables. + * + * @see Builder.fromEnv + */ @JvmStatic fun fromEnv(): ClientOptions = builder().fromEnv().build() } @@ -118,6 +182,11 @@ private constructor( webhookSecret = clientOptions.webhookSecret } + /** + * The HTTP client to use in the SDK. + * + * Use the one published in `finch-java-client-okhttp` or implement your own. + */ fun httpClient(httpClient: HttpClient) = apply { this.httpClient = PhantomReachableClosingHttpClient(httpClient) } @@ -133,23 +202,58 @@ private constructor( this.checkJacksonVersionCompatibility = checkJacksonVersionCompatibility } + /** + * The Jackson JSON mapper to use for serializing and deserializing JSON. + * + * Defaults to [com.tryfinch.api.core.jsonMapper]. The default is usually sufficient and + * rarely needs to be overridden. + */ fun jsonMapper(jsonMapper: JsonMapper) = apply { this.jsonMapper = jsonMapper } + /** + * The executor to use for running [AsyncStreamResponse.Handler] callbacks. + * + * Defaults to a dedicated cached thread pool. + */ fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { this.streamHandlerExecutor = streamHandlerExecutor } + /** + * The clock to use for operations that require timing, like retries. + * + * This is primarily useful for using a fake clock in tests. + * + * Defaults to [Clock.systemUTC]. + */ fun clock(clock: Clock) = apply { this.clock = clock } + /** + * The base URL to use for every request. + * + * Defaults to the production environment: `https://api.tryfinch.com`. + */ fun baseUrl(baseUrl: String?) = apply { this.baseUrl = baseUrl } /** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */ fun baseUrl(baseUrl: Optional) = baseUrl(baseUrl.getOrNull()) + /** + * Whether to call `validate` on every response before returning it. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ fun responseValidation(responseValidation: Boolean) = apply { this.responseValidation = responseValidation } + /** + * Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding + * retries. + * + * Defaults to [Timeout.default]. + */ fun timeout(timeout: Timeout) = apply { this.timeout = timeout } /** @@ -161,6 +265,21 @@ private constructor( */ fun timeout(timeout: Duration) = timeout(Timeout.builder().request(timeout).build()) + /** + * The maximum number of times to retry failed requests, with a short exponential backoff + * between requests. + * + * Only the following error types are retried: + * - Connection errors (for example, due to a network connectivity problem) + * - 408 Request Timeout + * - 409 Conflict + * - 429 Rate Limit + * - 5xx Internal + * + * The API may also explicitly instruct the SDK to retry or not retry a request. + * + * Defaults to 2. + */ fun maxRetries(maxRetries: Int) = apply { this.maxRetries = maxRetries } fun accessToken(accessToken: String?) = apply { this.accessToken = accessToken } @@ -266,6 +385,20 @@ private constructor( fun timeout(): Timeout = timeout + /** + * Updates configuration using system properties and environment variables. + * + * See this table for the available options: + * + * |Setter |System property |Environment variable |Required|Default value | + * |---------------|---------------------|----------------------|--------|----------------------------| + * |`clientId` |`finch.clientId` |`FINCH_CLIENT_ID` |false |- | + * |`clientSecret` |`finch.clientSecret` |`FINCH_CLIENT_SECRET` |false |- | + * |`webhookSecret`|`finch.webhookSecret`|`FINCH_WEBHOOK_SECRET`|false |- | + * |`baseUrl` |`finch.baseUrl` |`FINCH_BASE_URL` |true |`"https://api.tryfinch.com"`| + * + * System properties take precedence over environment variables. + */ fun fromEnv() = apply { (System.getProperty("finch.baseUrl") ?: System.getenv("FINCH_BASE_URL"))?.let { baseUrl(it) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt index 6a89eec0..05e11284 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt @@ -81,8 +81,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountDisconnectParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountDisconnectParams.kt index 20b1623d..72e823e6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountDisconnectParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountDisconnectParams.kt @@ -18,10 +18,13 @@ private constructor( private val additionalBodyProperties: Map, ) : Params { + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountIntrospectParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountIntrospectParams.kt index 946ad406..c79e5862 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountIntrospectParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountIntrospectParams.kt @@ -14,8 +14,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionNewParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionNewParams.kt index a2c22053..4f01e4c2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionNewParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionNewParams.kt @@ -152,8 +152,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParams.kt index ebd35f98..f005460b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParams.kt @@ -93,8 +93,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt index 1155b8eb..6cfe2de0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt @@ -100,8 +100,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualEnrolledIdsParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualEnrolledIdsParams.kt index bdd47916..34df79fc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualEnrolledIdsParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualEnrolledIdsParams.kt @@ -19,8 +19,10 @@ private constructor( fun benefitId(): Optional = Optional.ofNullable(benefitId) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsParams.kt index 7c6e196e..56d0e06b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsParams.kt @@ -26,8 +26,10 @@ private constructor( */ fun individualIds(): Optional = Optional.ofNullable(individualIds) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyParams.kt index 45431317..7a191a78 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyParams.kt @@ -49,8 +49,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListParams.kt index daaa4c63..97aebd76 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListParams.kt @@ -14,8 +14,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsParams.kt index df408510..1987b178 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsParams.kt @@ -14,8 +14,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitRetrieveParams.kt index c6fa8c33..620b4343 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun benefitId(): Optional = Optional.ofNullable(benefitId) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitUpdateParams.kt index 90b691f3..f9341f0c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitUpdateParams.kt @@ -47,8 +47,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListParams.kt index 5c38f85d..72693bb0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemListParams.kt @@ -55,8 +55,10 @@ private constructor( /** String search by pay statement item type. */ fun type(): Optional = Optional.ofNullable(type) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleCreateParams.kt index 62891454..89f27eb5 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleCreateParams.kt @@ -113,8 +113,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleDeleteParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleDeleteParams.kt index 1f47cbe2..f52d38c6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleDeleteParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleDeleteParams.kt @@ -25,10 +25,13 @@ private constructor( fun ruleId(): Optional = Optional.ofNullable(ruleId) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListParams.kt index a958f121..64806711 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleListParams.kt @@ -17,8 +17,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleUpdateParams.kt index e509e8bf..aea721df 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyPayStatementItemRuleUpdateParams.kt @@ -36,8 +36,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyRetrieveParams.kt index ddb27057..87d63be6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyRetrieveParams.kt @@ -14,8 +14,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParams.kt index 6975371d..b324bc6e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParams.kt @@ -25,8 +25,10 @@ private constructor( /** Index to start from (defaults to 0) */ fun offset(): Optional = Optional.ofNullable(offset) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListParams.kt index be838dc8..365a5ed2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListParams.kt @@ -24,8 +24,10 @@ private constructor( /** Index to start from (defaults to 0) */ fun offset(): Optional = Optional.ofNullable(offset) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDocumentListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDocumentListParams.kt index dd322628..2dd65346 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDocumentListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDocumentListParams.kt @@ -40,8 +40,10 @@ private constructor( /** Comma-delimited list of document types to filter on. If empty, defaults to all types */ fun types(): Optional> = Optional.ofNullable(types) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDocumentRetreiveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDocumentRetreiveParams.kt index c0d046d1..8647208e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDocumentRetreiveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDocumentRetreiveParams.kt @@ -22,8 +22,10 @@ private constructor( fun documentId(): Optional = Optional.ofNullable(documentId) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyParams.kt index 869a198d..8723ad66 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyParams.kt @@ -46,8 +46,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyParams.kt index 6a0cedfb..9f29d452 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyParams.kt @@ -57,8 +57,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParams.kt index 62779262..0ce7f943 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParams.kt @@ -51,8 +51,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListParams.kt index 918a4ba6..e331e044 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListParams.kt @@ -24,8 +24,10 @@ private constructor( /** The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` format. */ fun startDate(): LocalDate = startDate + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedCreateParams.kt index 939ba0bc..27724e8e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedCreateParams.kt @@ -54,8 +54,10 @@ private constructor( fun body(): Optional = Optional.ofNullable(body) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListParams.kt index bcd9259d..66e3c08c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListParams.kt @@ -28,8 +28,10 @@ private constructor( /** Index to start from (defaults to 0) */ fun offset(): Optional = Optional.ofNullable(offset) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedRetrieveParams.kt index 220a5b3b..a5ccd582 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun jobId(): Optional = Optional.ofNullable(jobId) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobManualRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobManualRetrieveParams.kt index 0ec08bb9..630bd34f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobManualRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobManualRetrieveParams.kt @@ -22,8 +22,10 @@ private constructor( fun jobId(): Optional = Optional.ofNullable(jobId) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListParams.kt index 327b9204..fadd5553 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListParams.kt @@ -23,8 +23,10 @@ private constructor( fun payFrequencies(): Optional> = Optional.ofNullable(payFrequencies) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupRetrieveParams.kt index f64580b6..283acea6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun payGroupId(): Optional = Optional.ofNullable(payGroupId) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListParams.kt index dbf39fca..d7d76719 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListParams.kt @@ -14,8 +14,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardParams.kt index b66c89fe..b2655961 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardParams.kt @@ -95,8 +95,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxCompanyUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxCompanyUpdateParams.kt index 96b53822..98835732 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxCompanyUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxCompanyUpdateParams.kt @@ -153,8 +153,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountCreateParams.kt index 18a7ccc0..e1a9ad67 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountCreateParams.kt @@ -91,8 +91,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountUpdateParams.kt index 815ad542..4fa41642 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountUpdateParams.kt @@ -46,8 +46,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParams.kt index 3b877625..e364914c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParams.kt @@ -92,8 +92,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParams.kt index 2f14178b..5dc978e5 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParams.kt @@ -36,8 +36,10 @@ private constructor( */ fun body(): Optional> = Optional.ofNullable(body) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParams.kt index ef6429a9..8ea4defe 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParams.kt @@ -303,8 +303,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxIndividualUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxIndividualUpdateParams.kt index 7d886f90..5d950cd0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxIndividualUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxIndividualUpdateParams.kt @@ -211,8 +211,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationRetrieveParams.kt index 85e0f79d..b85c72dd 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationRetrieveParams.kt @@ -14,8 +14,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationUpdateParams.kt index bd0c1ba4..47faa27f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationUpdateParams.kt @@ -22,8 +22,10 @@ private constructor( fun _additionalBodyProperties(): Map = sandboxJobConfiguration._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobCreateParams.kt index c102b323..bc749f79 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobCreateParams.kt @@ -45,8 +45,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParams.kt index 4de48809..c529782a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParams.kt @@ -75,8 +75,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) From 9bc98280eb886917d135e67159f4c77482a34e93 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 16:28:45 +0000 Subject: [PATCH 19/19] release: 7.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b1028a56..037c241f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "7.3.1" + ".": "7.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c1c5cc6b..f847bdfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## 7.4.0 (2025-07-24) + +Full Changelog: [v7.3.1...v7.4.0](https://github.com/Finch-API/finch-api-java/compare/v7.3.1...v7.4.0) + +### Features + +* **api:** api update ([f1f21d9](https://github.com/Finch-API/finch-api-java/commit/f1f21d90ad56582d33c0e1f8b7248cba3ccf381a)) +* **api:** api update ([21939b3](https://github.com/Finch-API/finch-api-java/commit/21939b3e793ae932cfe333a50e4996388900464f)) +* **client:** add `{QueryParams,Headers}#put(String, JsonValue)` methods ([c85d73a](https://github.com/Finch-API/finch-api-java/commit/c85d73ace557d4a52fadccbfca80ebf81a63c15d)) +* **client:** add https config options ([4ae1b1a](https://github.com/Finch-API/finch-api-java/commit/4ae1b1ad7b9ba3f76f027ae32e5bee6525706dd5)) +* **client:** allow configuring env via system properties ([acdb059](https://github.com/Finch-API/finch-api-java/commit/acdb059e62754399064125ff41c1d5a2ac1305ab)) + + +### Bug Fixes + +* **client:** accidental mutability of some classes ([f1e80c0](https://github.com/Finch-API/finch-api-java/commit/f1e80c04aca7aa069e3a653252705e1e32d3d018)) +* **client:** ensure error handling always occurs ([98e72bc](https://github.com/Finch-API/finch-api-java/commit/98e72bc3ee2085f94175a8326f2bc75c11dca281)) +* **internal:** fix error handlers on ClientImpl ([8cfda8e](https://github.com/Finch-API/finch-api-java/commit/8cfda8eb135f79e051f882b23eeb61e18367da5b)) +* use errorHandler ([f1f1119](https://github.com/Finch-API/finch-api-java/commit/f1f11199de44aa3277553ffdfa35715e966bc13c)) + + +### Chores + +* **ci:** bump `actions/setup-java` to v4 ([a15c7b6](https://github.com/Finch-API/finch-api-java/commit/a15c7b62eedd8278ea6f4cc65dc1211b3d2c92da)) +* **internal:** allow running specific example from cli ([c1eebc5](https://github.com/Finch-API/finch-api-java/commit/c1eebc5989312477b4c60d26e21e7b59e43a6c1d)) +* **internal:** refactor delegating from client to options ([e9e1c40](https://github.com/Finch-API/finch-api-java/commit/e9e1c400440734ec210fc759149de5b014102d11)) +* **internal:** remove unnecessary `[...]` in `[@see](https://github.com/see)` ([8b2df3c](https://github.com/Finch-API/finch-api-java/commit/8b2df3cab95afc11b9275bbce043a7ba061a1c26)) + + +### Documentation + +* fix missing readme comment ([32795c6](https://github.com/Finch-API/finch-api-java/commit/32795c657795d4855a237d88ef8509cd6c420aee)) +* more code comments ([7e48fcf](https://github.com/Finch-API/finch-api-java/commit/7e48fcff3d3c3a80fae1585250d7ae9767a8cea7)) + ## 7.3.1 (2025-07-08) Full Changelog: [v7.3.0...v7.3.1](https://github.com/Finch-API/finch-api-java/compare/v7.3.0...v7.3.1) diff --git a/README.md b/README.md index 8559e726..a6555c8b 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/7.3.1) -[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/7.3.1/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.3.1) +[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/7.4.0) +[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/7.4.0/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.4.0) @@ -15,7 +15,7 @@ It is generated with [Stainless](https://www.stainless.com/). -The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.3.1). +The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.4.0). @@ -26,7 +26,7 @@ The REST API documentation can be found on [developer.tryfinch.com](https://deve ### Gradle ```kotlin -implementation("com.tryfinch.api:finch-java:7.3.1") +implementation("com.tryfinch.api:finch-java:7.4.0") ``` ### Maven @@ -35,7 +35,7 @@ implementation("com.tryfinch.api:finch-java:7.3.1") com.tryfinch.api finch-java - 7.3.1 + 7.4.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 7464272e..82ff7f2f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.tryfinch.api" - version = "7.3.1" // x-release-please-version + version = "7.4.0" // x-release-please-version } subprojects {