Skip to content

Commit c306413

Browse files
stainless-botstainless-app[bot]
authored andcommitted
fix(api): update employer_size parameter to employee_size (#141)
1 parent 92a2c62 commit c306413

3 files changed

Lines changed: 24 additions & 24 deletions

File tree

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SandboxConnectionCreateParams
2121
constructor(
2222
private val providerId: String,
2323
private val authenticationType: AuthenticationType?,
24-
private val employerSize: Long?,
24+
private val employeeSize: Long?,
2525
private val products: List<String>?,
2626
private val additionalQueryParams: Map<String, List<String>>,
2727
private val additionalHeaders: Map<String, List<String>>,
@@ -32,7 +32,7 @@ constructor(
3232

3333
fun authenticationType(): Optional<AuthenticationType> = Optional.ofNullable(authenticationType)
3434

35-
fun employerSize(): Optional<Long> = Optional.ofNullable(employerSize)
35+
fun employeeSize(): Optional<Long> = Optional.ofNullable(employeeSize)
3636

3737
fun products(): Optional<List<String>> = Optional.ofNullable(products)
3838

@@ -41,7 +41,7 @@ constructor(
4141
return SandboxConnectionCreateBody(
4242
providerId,
4343
authenticationType,
44-
employerSize,
44+
employeeSize,
4545
products,
4646
additionalBodyProperties,
4747
)
@@ -57,7 +57,7 @@ constructor(
5757
internal constructor(
5858
private val providerId: String?,
5959
private val authenticationType: AuthenticationType?,
60-
private val employerSize: Long?,
60+
private val employeeSize: Long?,
6161
private val products: List<String>?,
6262
private val additionalProperties: Map<String, JsonValue>,
6363
) {
@@ -70,7 +70,7 @@ constructor(
7070
fun authenticationType(): AuthenticationType? = authenticationType
7171

7272
/** Optional: the size of the employer to be created with this connection. Defaults to 20 */
73-
@JsonProperty("employer_size") fun employerSize(): Long? = employerSize
73+
@JsonProperty("employee_size") fun employeeSize(): Long? = employeeSize
7474

7575
@JsonProperty("products") fun products(): List<String>? = products
7676

@@ -88,7 +88,7 @@ constructor(
8888
return other is SandboxConnectionCreateBody &&
8989
this.providerId == other.providerId &&
9090
this.authenticationType == other.authenticationType &&
91-
this.employerSize == other.employerSize &&
91+
this.employeeSize == other.employeeSize &&
9292
this.products == other.products &&
9393
this.additionalProperties == other.additionalProperties
9494
}
@@ -99,7 +99,7 @@ constructor(
9999
Objects.hash(
100100
providerId,
101101
authenticationType,
102-
employerSize,
102+
employeeSize,
103103
products,
104104
additionalProperties,
105105
)
@@ -108,7 +108,7 @@ constructor(
108108
}
109109

110110
override fun toString() =
111-
"SandboxConnectionCreateBody{providerId=$providerId, authenticationType=$authenticationType, employerSize=$employerSize, products=$products, additionalProperties=$additionalProperties}"
111+
"SandboxConnectionCreateBody{providerId=$providerId, authenticationType=$authenticationType, employeeSize=$employeeSize, products=$products, additionalProperties=$additionalProperties}"
112112

113113
companion object {
114114

@@ -119,15 +119,15 @@ constructor(
119119

120120
private var providerId: String? = null
121121
private var authenticationType: AuthenticationType? = null
122-
private var employerSize: Long? = null
122+
private var employeeSize: Long? = null
123123
private var products: List<String>? = null
124124
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
125125

126126
@JvmSynthetic
127127
internal fun from(sandboxConnectionCreateBody: SandboxConnectionCreateBody) = apply {
128128
this.providerId = sandboxConnectionCreateBody.providerId
129129
this.authenticationType = sandboxConnectionCreateBody.authenticationType
130-
this.employerSize = sandboxConnectionCreateBody.employerSize
130+
this.employeeSize = sandboxConnectionCreateBody.employeeSize
131131
this.products = sandboxConnectionCreateBody.products
132132
additionalProperties(sandboxConnectionCreateBody.additionalProperties)
133133
}
@@ -143,8 +143,8 @@ constructor(
143143
/**
144144
* Optional: the size of the employer to be created with this connection. Defaults to 20
145145
*/
146-
@JsonProperty("employer_size")
147-
fun employerSize(employerSize: Long) = apply { this.employerSize = employerSize }
146+
@JsonProperty("employee_size")
147+
fun employeeSize(employeeSize: Long) = apply { this.employeeSize = employeeSize }
148148

149149
@JsonProperty("products")
150150
fun products(products: List<String>) = apply { this.products = products }
@@ -167,7 +167,7 @@ constructor(
167167
SandboxConnectionCreateBody(
168168
checkNotNull(providerId) { "`providerId` is required but was not set" },
169169
authenticationType,
170-
employerSize,
170+
employeeSize,
171171
products?.toUnmodifiable(),
172172
additionalProperties.toUnmodifiable(),
173173
)
@@ -188,7 +188,7 @@ constructor(
188188
return other is SandboxConnectionCreateParams &&
189189
this.providerId == other.providerId &&
190190
this.authenticationType == other.authenticationType &&
191-
this.employerSize == other.employerSize &&
191+
this.employeeSize == other.employeeSize &&
192192
this.products == other.products &&
193193
this.additionalQueryParams == other.additionalQueryParams &&
194194
this.additionalHeaders == other.additionalHeaders &&
@@ -199,7 +199,7 @@ constructor(
199199
return Objects.hash(
200200
providerId,
201201
authenticationType,
202-
employerSize,
202+
employeeSize,
203203
products,
204204
additionalQueryParams,
205205
additionalHeaders,
@@ -208,7 +208,7 @@ constructor(
208208
}
209209

210210
override fun toString() =
211-
"SandboxConnectionCreateParams{providerId=$providerId, authenticationType=$authenticationType, employerSize=$employerSize, products=$products, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
211+
"SandboxConnectionCreateParams{providerId=$providerId, authenticationType=$authenticationType, employeeSize=$employeeSize, products=$products, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
212212

213213
fun toBuilder() = Builder().from(this)
214214

@@ -222,7 +222,7 @@ constructor(
222222

223223
private var providerId: String? = null
224224
private var authenticationType: AuthenticationType? = null
225-
private var employerSize: Long? = null
225+
private var employeeSize: Long? = null
226226
private var products: MutableList<String> = mutableListOf()
227227
private var additionalQueryParams: MutableMap<String, MutableList<String>> = mutableMapOf()
228228
private var additionalHeaders: MutableMap<String, MutableList<String>> = mutableMapOf()
@@ -232,7 +232,7 @@ constructor(
232232
internal fun from(sandboxConnectionCreateParams: SandboxConnectionCreateParams) = apply {
233233
this.providerId = sandboxConnectionCreateParams.providerId
234234
this.authenticationType = sandboxConnectionCreateParams.authenticationType
235-
this.employerSize = sandboxConnectionCreateParams.employerSize
235+
this.employeeSize = sandboxConnectionCreateParams.employeeSize
236236
this.products(sandboxConnectionCreateParams.products ?: listOf())
237237
additionalQueryParams(sandboxConnectionCreateParams.additionalQueryParams)
238238
additionalHeaders(sandboxConnectionCreateParams.additionalHeaders)
@@ -246,7 +246,7 @@ constructor(
246246
}
247247

248248
/** Optional: the size of the employer to be created with this connection. Defaults to 20 */
249-
fun employerSize(employerSize: Long) = apply { this.employerSize = employerSize }
249+
fun employeeSize(employeeSize: Long) = apply { this.employeeSize = employeeSize }
250250

251251
fun products(products: List<String>) = apply {
252252
this.products.clear()
@@ -313,7 +313,7 @@ constructor(
313313
SandboxConnectionCreateParams(
314314
checkNotNull(providerId) { "`providerId` is required but was not set" },
315315
authenticationType,
316-
employerSize,
316+
employeeSize,
317317
if (products.size == 0) null else products.toUnmodifiable(),
318318
additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
319319
additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),

finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParamsTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class SandboxConnectionCreateParamsTest {
1313
SandboxConnectionCreateParams.builder()
1414
.providerId("string")
1515
.authenticationType(SandboxConnectionCreateParams.AuthenticationType.CREDENTIAL)
16-
.employerSize(123L)
16+
.employeeSize(123L)
1717
.products(listOf("string"))
1818
.build()
1919
}
@@ -24,15 +24,15 @@ class SandboxConnectionCreateParamsTest {
2424
SandboxConnectionCreateParams.builder()
2525
.providerId("string")
2626
.authenticationType(SandboxConnectionCreateParams.AuthenticationType.CREDENTIAL)
27-
.employerSize(123L)
27+
.employeeSize(123L)
2828
.products(listOf("string"))
2929
.build()
3030
val body = params.getBody()
3131
assertThat(body).isNotNull
3232
assertThat(body.providerId()).isEqualTo("string")
3333
assertThat(body.authenticationType())
3434
.isEqualTo(SandboxConnectionCreateParams.AuthenticationType.CREDENTIAL)
35-
assertThat(body.employerSize()).isEqualTo(123L)
35+
assertThat(body.employeeSize()).isEqualTo(123L)
3636
assertThat(body.products()).isEqualTo(listOf("string"))
3737
}
3838

finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ConnectionServiceTest {
2626
SandboxConnectionCreateParams.builder()
2727
.providerId("string")
2828
.authenticationType(SandboxConnectionCreateParams.AuthenticationType.CREDENTIAL)
29-
.employerSize(123L)
29+
.employeeSize(123L)
3030
.products(listOf("string"))
3131
.build()
3232
)

0 commit comments

Comments
 (0)