Skip to content

Commit 511b7fb

Browse files
feat(api): add models for hrs benefits individuals async responses
1 parent 5463e75 commit 511b7fb

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bf858f37d7ab420841ddc6329dad8c46377308b6a5c8e935908011d0f9845e22.yml
33
openapi_spec_hash: 2523952a32436e3c7fd3b55508c2e7ee
4-
config_hash: 9faa2458e0e8bb125bf5d41e514a19e7
4+
config_hash: bedc278fd693e36e7d8dc508d75ab76a

finch-java-core/src/main/kotlin/com/tryfinch/api/models/EnrolledIndividualBenefit.kt renamed to finch-java-core/src/main/kotlin/com/tryfinch/api/models/EnrolledIndividualBenefitResponse.kt

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import com.tryfinch.api.errors.FinchInvalidDataException
1515
import java.util.Collections
1616
import java.util.Objects
1717

18-
class EnrolledIndividualBenefit
18+
class EnrolledIndividualBenefitResponse
1919
private constructor(
2020
private val jobId: JsonField<String>,
2121
private val additionalProperties: MutableMap<String, JsonValue>,
@@ -54,7 +54,8 @@ private constructor(
5454
companion object {
5555

5656
/**
57-
* Returns a mutable builder for constructing an instance of [EnrolledIndividualBenefit].
57+
* Returns a mutable builder for constructing an instance of
58+
* [EnrolledIndividualBenefitResponse].
5859
*
5960
* The following fields are required:
6061
* ```java
@@ -64,17 +65,19 @@ private constructor(
6465
@JvmStatic fun builder() = Builder()
6566
}
6667

67-
/** A builder for [EnrolledIndividualBenefit]. */
68+
/** A builder for [EnrolledIndividualBenefitResponse]. */
6869
class Builder internal constructor() {
6970

7071
private var jobId: JsonField<String>? = null
7172
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
7273

7374
@JvmSynthetic
74-
internal fun from(enrolledIndividualBenefit: EnrolledIndividualBenefit) = apply {
75-
jobId = enrolledIndividualBenefit.jobId
76-
additionalProperties = enrolledIndividualBenefit.additionalProperties.toMutableMap()
77-
}
75+
internal fun from(enrolledIndividualBenefitResponse: EnrolledIndividualBenefitResponse) =
76+
apply {
77+
jobId = enrolledIndividualBenefitResponse.jobId
78+
additionalProperties =
79+
enrolledIndividualBenefitResponse.additionalProperties.toMutableMap()
80+
}
7881

7982
fun jobId(jobId: String) = jobId(JsonField.of(jobId))
8083

@@ -106,7 +109,7 @@ private constructor(
106109
}
107110

108111
/**
109-
* Returns an immutable instance of [EnrolledIndividualBenefit].
112+
* Returns an immutable instance of [EnrolledIndividualBenefitResponse].
110113
*
111114
* Further updates to this [Builder] will not mutate the returned instance.
112115
*
@@ -117,16 +120,16 @@ private constructor(
117120
*
118121
* @throws IllegalStateException if any required field is unset.
119122
*/
120-
fun build(): EnrolledIndividualBenefit =
121-
EnrolledIndividualBenefit(
123+
fun build(): EnrolledIndividualBenefitResponse =
124+
EnrolledIndividualBenefitResponse(
122125
checkRequired("jobId", jobId),
123126
additionalProperties.toMutableMap(),
124127
)
125128
}
126129

127130
private var validated: Boolean = false
128131

129-
fun validate(): EnrolledIndividualBenefit = apply {
132+
fun validate(): EnrolledIndividualBenefitResponse = apply {
130133
if (validated) {
131134
return@apply
132135
}
@@ -155,7 +158,7 @@ private constructor(
155158
return true
156159
}
157160

158-
return /* spotless:off */ other is EnrolledIndividualBenefit && jobId == other.jobId && additionalProperties == other.additionalProperties /* spotless:on */
161+
return /* spotless:off */ other is EnrolledIndividualBenefitResponse && jobId == other.jobId && additionalProperties == other.additionalProperties /* spotless:on */
159162
}
160163

161164
/* spotless:off */
@@ -165,5 +168,5 @@ private constructor(
165168
override fun hashCode(): Int = hashCode
166169

167170
override fun toString() =
168-
"EnrolledIndividualBenefit{jobId=$jobId, additionalProperties=$additionalProperties}"
171+
"EnrolledIndividualBenefitResponse{jobId=$jobId, additionalProperties=$additionalProperties}"
169172
}

finch-java-core/src/test/kotlin/com/tryfinch/api/models/EnrolledIndividualBenefitTest.kt renamed to finch-java-core/src/test/kotlin/com/tryfinch/api/models/EnrolledIndividualBenefitResponseTest.kt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,34 @@ import com.tryfinch.api.core.jsonMapper
77
import org.assertj.core.api.Assertions.assertThat
88
import org.junit.jupiter.api.Test
99

10-
internal class EnrolledIndividualBenefitTest {
10+
internal class EnrolledIndividualBenefitResponseTest {
1111

1212
@Test
1313
fun create() {
14-
val enrolledIndividualBenefit =
15-
EnrolledIndividualBenefit.builder()
14+
val enrolledIndividualBenefitResponse =
15+
EnrolledIndividualBenefitResponse.builder()
1616
.jobId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
1717
.build()
1818

19-
assertThat(enrolledIndividualBenefit.jobId())
19+
assertThat(enrolledIndividualBenefitResponse.jobId())
2020
.isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
2121
}
2222

2323
@Test
2424
fun roundtrip() {
2525
val jsonMapper = jsonMapper()
26-
val enrolledIndividualBenefit =
27-
EnrolledIndividualBenefit.builder()
26+
val enrolledIndividualBenefitResponse =
27+
EnrolledIndividualBenefitResponse.builder()
2828
.jobId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
2929
.build()
3030

31-
val roundtrippedEnrolledIndividualBenefit =
31+
val roundtrippedEnrolledIndividualBenefitResponse =
3232
jsonMapper.readValue(
33-
jsonMapper.writeValueAsString(enrolledIndividualBenefit),
34-
jacksonTypeRef<EnrolledIndividualBenefit>(),
33+
jsonMapper.writeValueAsString(enrolledIndividualBenefitResponse),
34+
jacksonTypeRef<EnrolledIndividualBenefitResponse>(),
3535
)
3636

37-
assertThat(roundtrippedEnrolledIndividualBenefit).isEqualTo(enrolledIndividualBenefit)
37+
assertThat(roundtrippedEnrolledIndividualBenefitResponse)
38+
.isEqualTo(enrolledIndividualBenefitResponse)
3839
}
3940
}

0 commit comments

Comments
 (0)