Skip to content

Commit a923265

Browse files
authored
chore: reformatting and response auto-closing (#34)
This PR contains commits from the following PRs: - #33 - #31 - #29 --- After merging this PR, if there are any user facing changes, another PR will be created with the changelog & version bump.
2 parents c5b93fe + b428fc2 commit a923265

30 files changed

Lines changed: 52 additions & 52 deletions

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ constructor(
4747
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4848
->
4949
response
50-
.let { disconnectHandler.handle(it) }
50+
.use { disconnectHandler.handle(it) }
5151
.apply {
5252
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
5353
validate()
@@ -75,7 +75,7 @@ constructor(
7575
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
7676
->
7777
response
78-
.let { introspectHandler.handle(it) }
78+
.use { introspectHandler.handle(it) }
7979
.apply {
8080
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
8181
validate()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ constructor(
4040
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4141
->
4242
response
43-
.let { listHandler.handle(it) }
43+
.use { listHandler.handle(it) }
4444
.apply {
4545
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
4646
forEach { it.validate() }

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ats/ApplicationServiceAsyncImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ constructor(
4141
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4242
->
4343
response
44-
.let { retrieveHandler.handle(it) }
44+
.use { retrieveHandler.handle(it) }
4545
.apply {
4646
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
4747
validate()
@@ -70,7 +70,7 @@ constructor(
7070
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
7171
->
7272
response
73-
.let { listHandler.handle(it) }
73+
.use { listHandler.handle(it) }
7474
.apply {
7575
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
7676
validate()

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ats/CandidateServiceAsyncImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ constructor(
4444
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4545
->
4646
response
47-
.let { retrieveHandler.handle(it) }
47+
.use { retrieveHandler.handle(it) }
4848
.apply {
4949
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
5050
validate()
@@ -76,7 +76,7 @@ constructor(
7676
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
7777
->
7878
response
79-
.let { listHandler.handle(it) }
79+
.use { listHandler.handle(it) }
8080
.apply {
8181
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
8282
validate()

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ats/JobServiceAsyncImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ constructor(
4141
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4242
->
4343
response
44-
.let { retrieveHandler.handle(it) }
44+
.use { retrieveHandler.handle(it) }
4545
.apply {
4646
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
4747
validate()
@@ -70,7 +70,7 @@ constructor(
7070
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
7171
->
7272
response
73-
.let { listHandler.handle(it) }
73+
.use { listHandler.handle(it) }
7474
.apply {
7575
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
7676
validate()

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ats/OfferServiceAsyncImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ constructor(
4141
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4242
->
4343
response
44-
.let { retrieveHandler.handle(it) }
44+
.use { retrieveHandler.handle(it) }
4545
.apply {
4646
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
4747
validate()
@@ -70,7 +70,7 @@ constructor(
7070
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
7171
->
7272
response
73-
.let { listHandler.handle(it) }
73+
.use { listHandler.handle(it) }
7474
.apply {
7575
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
7676
validate()

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/ats/StageServiceAsyncImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ constructor(
4444
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4545
->
4646
response
47-
.let { listHandler.handle(it) }
47+
.use { listHandler.handle(it) }
4848
.apply {
4949
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
5050
forEach { it.validate() }

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/BenefitServiceAsyncImpl.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ constructor(
6464
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
6565
->
6666
response
67-
.let { createHandler.handle(it) }
67+
.use { createHandler.handle(it) }
6868
.apply {
6969
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
7070
validate()
@@ -96,7 +96,7 @@ constructor(
9696
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
9797
->
9898
response
99-
.let { retrieveHandler.handle(it) }
99+
.use { retrieveHandler.handle(it) }
100100
.apply {
101101
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
102102
validate()
@@ -130,7 +130,7 @@ constructor(
130130
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
131131
->
132132
response
133-
.let { updateHandler.handle(it) }
133+
.use { updateHandler.handle(it) }
134134
.apply {
135135
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
136136
validate()
@@ -162,7 +162,7 @@ constructor(
162162
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
163163
->
164164
response
165-
.let { listHandler.handle(it) }
165+
.use { listHandler.handle(it) }
166166
.apply {
167167
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
168168
forEach { it.validate() }
@@ -196,7 +196,7 @@ constructor(
196196
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
197197
->
198198
response
199-
.let { listSupportedBenefitsHandler.handle(it) }
199+
.use { listSupportedBenefitsHandler.handle(it) }
200200
.apply {
201201
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
202202
forEach { it.validate() }

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/CompanyServiceAsyncImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ constructor(
3939
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4040
->
4141
response
42-
.let { retrieveHandler.handle(it) }
42+
.use { retrieveHandler.handle(it) }
4343
.apply {
4444
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
4545
validate()

finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/hris/DirectoryServiceAsyncImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ constructor(
4040
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4141
->
4242
response
43-
.let { listIndividualsHandler.handle(it) }
43+
.use { listIndividualsHandler.handle(it) }
4444
.apply {
4545
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
4646
validate()

0 commit comments

Comments
 (0)