diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 180ef9e3..c09ad87a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "7.0.0" + ".": "7.1.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9cbd6b8d..7e8e0176 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-5b00a0bc705b1d5bfcb5ea79c7af544766d51ec12ccc4721825664ab397789d8.yml -openapi_spec_hash: 34891659cff31395ba7683a8153b1db5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-dbbf65e94ae7a53cd5a313974761102447ccda3096fd40967c137ad3f80f7154.yml +openapi_spec_hash: 3cc9d87b60dc27283735d610d4b51a53 config_hash: 53778a0b839c4f6ad34fbba051f5e8a6 diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ad4b1b..13c5622d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 7.1.0 (2025-05-16) + +Full Changelog: [v7.0.0...v7.1.0](https://github.com/Finch-API/finch-api-java/compare/v7.0.0...v7.1.0) + +### Features + +* **api:** api update ([c5fd789](https://github.com/Finch-API/finch-api-java/commit/c5fd789cdfe81c008678b52250feef981f2fa2b6)) + ## 7.0.0 (2025-05-16) Full Changelog: [v6.0.0...v7.0.0](https://github.com/Finch-API/finch-api-java/compare/v6.0.0...v7.0.0) diff --git a/README.md b/README.md index 4ac5dff0..5aae37e8 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.0.0) -[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/7.0.0/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.0.0) +[![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.1.0) +[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/7.1.0/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.1.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.0.0). +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.1.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.0.0") +implementation("com.tryfinch.api:finch-java:7.1.0") ``` ### Maven @@ -35,7 +35,7 @@ implementation("com.tryfinch.api:finch-java:7.0.0") com.tryfinch.api finch-java - 7.0.0 + 7.1.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 7d01d9e2..32793b7d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.tryfinch.api" - version = "7.0.0" // x-release-please-version + version = "7.1.0" // x-release-please-version } subprojects { 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 d62ad375..3f09ee3b 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 @@ -219,12 +219,12 @@ private constructor( private val location: JsonField, private val manager: JsonField, private val middleName: JsonField, - private val sourceId: JsonField, private val startDate: JsonField, private val title: JsonField, private val workId: JsonField, private val income: JsonField, private val incomeHistory: JsonField>, + private val sourceId: JsonField, private val additionalProperties: MutableMap, ) { @@ -266,9 +266,6 @@ private constructor( @JsonProperty("middle_name") @ExcludeMissing middleName: JsonField = JsonMissing.of(), - @JsonProperty("source_id") - @ExcludeMissing - sourceId: JsonField = JsonMissing.of(), @JsonProperty("start_date") @ExcludeMissing startDate: JsonField = JsonMissing.of(), @@ -278,6 +275,9 @@ private constructor( @JsonProperty("income_history") @ExcludeMissing incomeHistory: JsonField> = JsonMissing.of(), + @JsonProperty("source_id") + @ExcludeMissing + sourceId: JsonField = JsonMissing.of(), ) : this( id, classCode, @@ -293,12 +293,12 @@ private constructor( location, manager, middleName, - sourceId, startDate, title, workId, income, incomeHistory, + sourceId, mutableMapOf(), ) @@ -412,14 +412,6 @@ private constructor( */ fun middleName(): Optional = middleName.getOptional("middle_name") - /** - * The source system's unique employment identifier for this individual - * - * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun sourceId(): Optional = sourceId.getOptional("source_id") - /** * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -460,6 +452,14 @@ private constructor( */ fun incomeHistory(): Optional> = incomeHistory.getOptional("income_history") + /** + * The source system's unique employment identifier for this individual + * + * @throws FinchInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun sourceId(): Optional = sourceId.getOptional("source_id") + /** * Returns the raw JSON value of [id]. * @@ -573,13 +573,6 @@ private constructor( @ExcludeMissing fun _middleName(): JsonField = middleName - /** - * Returns the raw JSON value of [sourceId]. - * - * Unlike [sourceId], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("source_id") @ExcludeMissing fun _sourceId(): JsonField = sourceId - /** * Returns the raw JSON value of [startDate]. * @@ -621,6 +614,13 @@ private constructor( @ExcludeMissing fun _incomeHistory(): JsonField> = incomeHistory + /** + * Returns the raw JSON value of [sourceId]. + * + * Unlike [sourceId], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("source_id") @ExcludeMissing fun _sourceId(): JsonField = sourceId + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -654,7 +654,6 @@ private constructor( * .location() * .manager() * .middleName() - * .sourceId() * .startDate() * .title() * .workId() @@ -680,12 +679,12 @@ private constructor( private var location: JsonField? = null private var manager: JsonField? = null private var middleName: JsonField? = null - private var sourceId: JsonField? = null private var startDate: JsonField? = null private var title: JsonField? = null private var workId: JsonField? = null private var income: JsonField = JsonMissing.of() private var incomeHistory: JsonField>? = null + private var sourceId: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -704,12 +703,12 @@ private constructor( location = unionMember0.location manager = unionMember0.manager middleName = unionMember0.middleName - sourceId = unionMember0.sourceId startDate = unionMember0.startDate title = unionMember0.title workId = unionMember0.workId income = unionMember0.income incomeHistory = unionMember0.incomeHistory.map { it.toMutableList() } + sourceId = unionMember0.sourceId additionalProperties = unionMember0.additionalProperties.toMutableMap() } @@ -962,21 +961,6 @@ private constructor( */ fun middleName(middleName: JsonField) = apply { this.middleName = middleName } - /** The source system's unique employment identifier for this individual */ - fun sourceId(sourceId: String?) = sourceId(JsonField.ofNullable(sourceId)) - - /** Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */ - fun sourceId(sourceId: Optional) = sourceId(sourceId.getOrNull()) - - /** - * Sets [Builder.sourceId] to an arbitrary JSON value. - * - * You should usually call [Builder.sourceId] with a well-typed [String] value instead. - * This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun sourceId(sourceId: JsonField) = apply { this.sourceId = sourceId } - fun startDate(startDate: String?) = startDate(JsonField.ofNullable(startDate)) /** Alias for calling [Builder.startDate] with `startDate.orElse(null)`. */ @@ -1074,6 +1058,21 @@ private constructor( } } + /** The source system's unique employment identifier for this individual */ + fun sourceId(sourceId: String?) = sourceId(JsonField.ofNullable(sourceId)) + + /** Alias for calling [Builder.sourceId] with `sourceId.orElse(null)`. */ + fun sourceId(sourceId: Optional) = sourceId(sourceId.getOrNull()) + + /** + * Sets [Builder.sourceId] to an arbitrary JSON value. + * + * You should usually call [Builder.sourceId] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun sourceId(sourceId: JsonField) = apply { this.sourceId = sourceId } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -1114,7 +1113,6 @@ private constructor( * .location() * .manager() * .middleName() - * .sourceId() * .startDate() * .title() * .workId() @@ -1138,12 +1136,12 @@ private constructor( checkRequired("location", location), checkRequired("manager", manager), checkRequired("middleName", middleName), - checkRequired("sourceId", sourceId), checkRequired("startDate", startDate), checkRequired("title", title), checkRequired("workId", workId), income, (incomeHistory ?: JsonMissing.of()).map { it.toImmutable() }, + sourceId, additionalProperties.toMutableMap(), ) } @@ -1169,12 +1167,12 @@ private constructor( location().ifPresent { it.validate() } manager().ifPresent { it.validate() } middleName() - sourceId() startDate() title() workId() income().ifPresent { it.validate() } incomeHistory().ifPresent { it.forEach { it?.validate() } } + sourceId() validated = true } @@ -1208,12 +1206,13 @@ private constructor( (location.asKnown().getOrNull()?.validity() ?: 0) + (manager.asKnown().getOrNull()?.validity() ?: 0) + (if (middleName.asKnown().isPresent) 1 else 0) + - (if (sourceId.asKnown().isPresent) 1 else 0) + (if (startDate.asKnown().isPresent) 1 else 0) + (if (title.asKnown().isPresent) 1 else 0) + (if (workId.asKnown().isPresent) 1 else 0) + (income.asKnown().getOrNull()?.validity() ?: 0) + - (incomeHistory.asKnown().getOrNull()?.sumOf { (it?.validity() ?: 0).toInt() } ?: 0) + (incomeHistory.asKnown().getOrNull()?.sumOf { (it?.validity() ?: 0).toInt() } + ?: 0) + + (if (sourceId.asKnown().isPresent) 1 else 0) class CustomField private constructor( @@ -2637,17 +2636,17 @@ private constructor( return true } - return /* spotless:off */ other is UnionMember0 && id == other.id && classCode == other.classCode && customFields == other.customFields && department == other.department && employment == other.employment && employmentStatus == other.employmentStatus && endDate == other.endDate && firstName == other.firstName && isActive == other.isActive && lastName == other.lastName && latestRehireDate == other.latestRehireDate && location == other.location && manager == other.manager && middleName == other.middleName && sourceId == other.sourceId && startDate == other.startDate && title == other.title && workId == other.workId && income == other.income && incomeHistory == other.incomeHistory && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is UnionMember0 && id == other.id && classCode == other.classCode && customFields == other.customFields && department == other.department && employment == other.employment && employmentStatus == other.employmentStatus && endDate == other.endDate && firstName == other.firstName && isActive == other.isActive && lastName == other.lastName && latestRehireDate == other.latestRehireDate && location == other.location && manager == other.manager && middleName == other.middleName && startDate == other.startDate && title == other.title && workId == other.workId && income == other.income && incomeHistory == other.incomeHistory && sourceId == other.sourceId && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(id, classCode, customFields, department, employment, employmentStatus, endDate, firstName, isActive, lastName, latestRehireDate, location, manager, middleName, sourceId, startDate, title, workId, income, incomeHistory, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(id, classCode, customFields, department, employment, employmentStatus, endDate, firstName, isActive, lastName, latestRehireDate, location, manager, middleName, startDate, title, workId, income, incomeHistory, sourceId, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "UnionMember0{id=$id, classCode=$classCode, customFields=$customFields, department=$department, employment=$employment, employmentStatus=$employmentStatus, endDate=$endDate, firstName=$firstName, isActive=$isActive, lastName=$lastName, latestRehireDate=$latestRehireDate, location=$location, manager=$manager, middleName=$middleName, sourceId=$sourceId, startDate=$startDate, title=$title, workId=$workId, income=$income, incomeHistory=$incomeHistory, additionalProperties=$additionalProperties}" + "UnionMember0{id=$id, classCode=$classCode, customFields=$customFields, department=$department, employment=$employment, employmentStatus=$employmentStatus, endDate=$endDate, firstName=$firstName, isActive=$isActive, lastName=$lastName, latestRehireDate=$latestRehireDate, location=$location, manager=$manager, middleName=$middleName, startDate=$startDate, title=$title, workId=$workId, income=$income, incomeHistory=$incomeHistory, sourceId=$sourceId, additionalProperties=$additionalProperties}" } class BatchError diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataResponseTest.kt index c113d875..20f9ee8d 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataResponseTest.kt @@ -56,7 +56,6 @@ internal class EmploymentDataResponseTest { .build() ) .middleName("middle_name") - .sourceId("source_id") .startDate("start_date") .title("title") .workId("work_id") @@ -76,6 +75,7 @@ internal class EmploymentDataResponseTest { .unit(Income.Unit.YEARLY) .build() ) + .sourceId("source_id") .build() ) .code(0L) @@ -127,7 +127,6 @@ internal class EmploymentDataResponseTest { .build() ) .middleName("middle_name") - .sourceId("source_id") .startDate("start_date") .title("title") .workId("work_id") @@ -147,6 +146,7 @@ internal class EmploymentDataResponseTest { .unit(Income.Unit.YEARLY) .build() ) + .sourceId("source_id") .build() ) ) @@ -203,7 +203,6 @@ internal class EmploymentDataResponseTest { .build() ) .middleName("middle_name") - .sourceId("source_id") .startDate("start_date") .title("title") .workId("work_id") @@ -223,6 +222,7 @@ internal class EmploymentDataResponseTest { .unit(Income.Unit.YEARLY) .build() ) + .sourceId("source_id") .build() ) .code(0L) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataTest.kt index 740c8a9d..17190be2 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataTest.kt @@ -57,7 +57,6 @@ internal class EmploymentDataTest { .build() ) .middleName("middle_name") - .sourceId("source_id") .startDate("start_date") .title("title") .workId("work_id") @@ -77,6 +76,7 @@ internal class EmploymentDataTest { .unit(Income.Unit.YEARLY) .build() ) + .sourceId("source_id") .build() val employmentData = EmploymentData.ofUnionMember0(unionMember0) @@ -132,7 +132,6 @@ internal class EmploymentDataTest { .build() ) .middleName("middle_name") - .sourceId("source_id") .startDate("start_date") .title("title") .workId("work_id") @@ -152,6 +151,7 @@ internal class EmploymentDataTest { .unit(Income.Unit.YEARLY) .build() ) + .sourceId("source_id") .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageResponseTest.kt index 28f9e30b..1f2186bb 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageResponseTest.kt @@ -64,7 +64,6 @@ internal class HrisEmploymentRetrieveManyPageResponseTest { .build() ) .middleName("middle_name") - .sourceId("source_id") .startDate("start_date") .title("title") .workId("work_id") @@ -84,6 +83,7 @@ internal class HrisEmploymentRetrieveManyPageResponseTest { .unit(Income.Unit.YEARLY) .build() ) + .sourceId("source_id") .build() ) .code(0L) @@ -142,7 +142,6 @@ internal class HrisEmploymentRetrieveManyPageResponseTest { .build() ) .middleName("middle_name") - .sourceId("source_id") .startDate("start_date") .title("title") .workId("work_id") @@ -162,6 +161,7 @@ internal class HrisEmploymentRetrieveManyPageResponseTest { .unit(Income.Unit.YEARLY) .build() ) + .sourceId("source_id") .build() ) .code(0L) @@ -226,7 +226,6 @@ internal class HrisEmploymentRetrieveManyPageResponseTest { .build() ) .middleName("middle_name") - .sourceId("source_id") .startDate("start_date") .title("title") .workId("work_id") @@ -246,6 +245,7 @@ internal class HrisEmploymentRetrieveManyPageResponseTest { .unit(Income.Unit.YEARLY) .build() ) + .sourceId("source_id") .build() ) .code(0L)