Skip to content

Commit 2b9ba2e

Browse files
stainless-botrattrayalex
authored andcommitted
chore(api): remove deprecated & unused ATS API (#68)
1 parent 1444022 commit 2b9ba2e

File tree

76 files changed

+49
-7097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+49
-7097
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 27
1+
configured_endpoints: 18

README.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -79,31 +79,32 @@ Read the documentation for more configuration options.
7979

8080
### Example: creating a resource
8181

82-
To create a new ats candidate, first use the `AtsCandidateRetrieveParams` builder to specify attributes,
83-
then pass that to the `retrieve` method of the `candidates` service.
82+
To create a new hris directory, first use the `HrisDirectoryListIndividualsParams` builder to specify attributes,
83+
then pass that to the `listIndividuals` method of the `directory` service.
8484

8585
```java
86-
import com.tryfinch.api.models.AtsCandidateRetrieveParams;
87-
import com.tryfinch.api.models.Candidate;
86+
import com.tryfinch.api.models.HrisDirectoryListIndividualsPage;
87+
import com.tryfinch.api.models.HrisDirectoryListIndividualsParams;
88+
import com.tryfinch.api.models.Page;
8889

89-
AtsCandidateRetrieveParams params = AtsCandidateRetrieveParams.builder()
90+
HrisDirectoryListIndividualsParams params = HrisDirectoryListIndividualsParams.builder()
9091
.candidateId("<candidate id>")
9192
.build();
92-
Candidate atsCandidate = client.candidates().retrieve(params);
93+
HrisDirectoryListIndividualsPage hrisDirectory = client.directory().listIndividuals(params);
9394
```
9495

9596
### Example: listing resources
9697

97-
The Finch API provides a `list` method to get a paginated list of jobs.
98+
The Finch API provides a `listIndividuals` method to get a paginated list of directory.
9899
You can retrieve the first page by:
99100

100101
```java
101-
import com.tryfinch.api.models.Job;
102+
import com.tryfinch.api.models.IndividualInDirectory;
102103
import com.tryfinch.api.models.Page;
103104

104-
AtsJobListPage page = client.jobs().list();
105-
for (Job job : page.jobs()) {
106-
System.out.println(job);
105+
HrisDirectoryListIndividualsPage page = client.directory().listIndividuals();
106+
for (IndividualInDirectory directory : page.individuals()) {
107+
System.out.println(directory);
107108
}
108109
```
109110

@@ -117,14 +118,14 @@ See [Pagination](#pagination) below for more information on transparently workin
117118

118119
To make a request to the Finch API, you generally build an instance of the appropriate `Params` class.
119120

120-
In [Example: creating a resource](#example-creating-a-resource) above, we used the `AtsCandidateRetrieveParams.builder()` to pass to
121-
the `retrieve` method of the `candidates` service.
121+
In [Example: creating a resource](#example-creating-a-resource) above, we used the `HrisDirectoryListIndividualsParams.builder()` to pass to
122+
the `listIndividuals` method of the `directory` service.
122123

123124
Sometimes, the API may support other properties that are not yet supported in the Java SDK types. In that case,
124125
you can attach them using the `putAdditionalProperty` method.
125126

126127
```java
127-
AtsCandidateRetrieveParams params = AtsCandidateRetrieveParams.builder()
128+
HrisDirectoryListIndividualsParams params = HrisDirectoryListIndividualsParams.builder()
128129
// ... normal properties
129130
.putAdditionalProperty("secret_param", "4242")
130131
.build();
@@ -137,7 +138,7 @@ AtsCandidateRetrieveParams params = AtsCandidateRetrieveParams.builder()
137138
When receiving a response, the Finch Java SDK will deserialize it into instances of the typed model classes. In rare cases, the API may return a response property that doesn't match the expected Java type. If you directly access the mistaken property, the SDK will throw an unchecked `FinchInvalidDataException` at runtime. If you would prefer to check in advance that that response is completely well-typed, call `.validate()` on the returned model.
138139

139140
```java
140-
Candidate atsCandidate = client.candidates().retrieve().validate();
141+
HrisDirectoryListIndividualsPage hrisDirectory = client.directory().listIndividuals().validate();
141142
```
142143

143144
### Response properties as JSON
@@ -167,7 +168,7 @@ if (field.isMissing()) {
167168
Sometimes, the server response may include additional properties that are not yet available in this library's types. You can access them using the model's `_additionalProperties` method:
168169

169170
```java
170-
JsonValue secret = atsCandidate._additionalProperties().get("secret_field");
171+
JsonValue secret = hrisDirectory._additionalProperties().get("secret_field");
171172
```
172173

173174
---
@@ -186,23 +187,23 @@ which automatically handles fetching more pages for you:
186187

187188
```java
188189
// As an Iterable:
189-
AtsJobListPage page = client.jobs().list(params);
190-
for (Job job : page.autoPager()) {
191-
System.out.println(job);
190+
HrisDirectoryListIndividualsPage page = client.directory().listIndividuals(params);
191+
for (IndividualInDirectory directory : page.autoPager()) {
192+
System.out.println(directory);
192193
};
193194

194195
// As a Stream:
195-
client.jobs().list(params).autoPager().stream()
196+
client.directory().listIndividuals(params).autoPager().stream()
196197
.limit(50)
197-
.forEach(job -> System.out.println(job));
198+
.forEach(directory -> System.out.println(directory));
198199
```
199200

200201
### Asynchronous
201202

202203
```java
203204
// Using forEach, which returns CompletableFuture<Void>:
204-
asyncClient.jobs().list(params).autoPager()
205-
.forEach(job -> System.out.println(job), executor);
205+
asyncClient.directory().listIndividuals(params).autoPager()
206+
.forEach(directory -> System.out.println(directory), executor);
206207
```
207208

208209
### Manual pagination
@@ -213,10 +214,10 @@ A page of results has a `data()` method to fetch the list of objects, as well as
213214
`hasNextPage`, `getNextPage`, and `getNextPageParams` methods to help with pagination.
214215

215216
```java
216-
AtsJobListPage page = client.jobs().list(params);
217+
HrisDirectoryListIndividualsPage page = client.directory().listIndividuals(params);
217218
while (page != null) {
218-
for (Job job : page.jobs()) {
219-
System.out.println(job);
219+
for (IndividualInDirectory directory : page.individuals()) {
220+
System.out.println(directory);
220221
}
221222

222223
page = page.getNextPage().orElse(null);

buildSrc/src/main/kotlin/finch.publish.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ configure<PublishingExtension> {
1515
from(components["java"])
1616

1717
pom {
18-
name.set("ATS API Reference")
19-
description.set("The Finch ATS (Applicant Tracking System) API provides a unified way to connect\nto a multitude of ATS providers. The API requires an access token issued by\nFinch.\n\nTo enable access to the ATS API, please reach out to your Finch representative.\n\nATS products are specified by the product parameter, a space-separated list of\nproducts that your application requests from an employer authenticating through\nFinch Connect. Valid product names are—\n\n- `candidates`: Read candidate data\n- `applications`: Read detailed application data for candidates\n- `jobs`: Read job posting data, as well as existing stages of the job pipeline\n- `offers`: Read details about offers managed through the ATS")
18+
name.set("API Reference")
19+
description.set("Finch's Employer API requires an access token issued by Finch.\n\nPlease see\n[here](https://developer.tryfinch.com/docs/reference/branches/open-api/docs/%20Finch%20API/1%20-%20Getting%20Started.md)\nfor an overview of the API\n\nEmployer products are specified by the product parameter, a space-separated list\nof products that your application requests from an employer authenticating\nthrough Finch Connect. Valid product names are—\n\n- `company`: Read basic company data\n\n- `directory`: Read company directory and organization structure\n\n- `individual`: Read individual data, excluding income and employment data\n\n- `employment`: Read individual employment and income data\n\n- `payment`: Read payroll and contractor related payments by the company\n\n- `pay_statement`: Read detailed pay statements for each individual\n\n- `benefits`: Create and manage benefits and benefit enrollment within a company\n\n- `deduction` (deprecated): Previously used to manage deductions within a\n company. Please use `benefits`.\n\n[![Open in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4?action=collection%2Ffork&collection-url=entityId%3D21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4%26entityType%3Dcollection%26workspaceId%3D1edf19bc-e0a8-41e9-ac55-481a4b50790b)")
2020
url.set("https://developer.tryfinch.com/")
2121

2222
licenses {

finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClient.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ interface FinchClient {
1212

1313
fun hris(): HrisService
1414

15-
fun ats(): AtsService
16-
1715
fun providers(): ProviderService
1816

1917
fun account(): AccountService

finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsync.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ interface FinchClientAsync {
1313

1414
fun hris(): HrisServiceAsync
1515

16-
fun ats(): AtsServiceAsync
17-
1816
fun providers(): ProviderServiceAsync
1917

2018
fun account(): AccountServiceAsync

finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientAsyncImpl.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ constructor(
2727

2828
private val hris: HrisServiceAsync by lazy { HrisServiceAsyncImpl(clientOptions) }
2929

30-
private val ats: AtsServiceAsync by lazy { AtsServiceAsyncImpl(clientOptions) }
31-
3230
private val providers: ProviderServiceAsync by lazy { ProviderServiceAsyncImpl(clientOptions) }
3331

3432
private val account: AccountServiceAsync by lazy { AccountServiceAsyncImpl(clientOptions) }
@@ -42,8 +40,6 @@ constructor(
4240

4341
override fun hris(): HrisServiceAsync = hris
4442

45-
override fun ats(): AtsServiceAsync = ats
46-
4743
override fun providers(): ProviderServiceAsync = providers
4844

4945
override fun account(): AccountServiceAsync = account

finch-java-core/src/main/kotlin/com/tryfinch/api/client/FinchClientImpl.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ constructor(
2626

2727
private val hris: HrisService by lazy { HrisServiceImpl(clientOptions) }
2828

29-
private val ats: AtsService by lazy { AtsServiceImpl(clientOptions) }
30-
3129
private val providers: ProviderService by lazy { ProviderServiceImpl(clientOptions) }
3230

3331
private val account: AccountService by lazy { AccountServiceImpl(clientOptions) }
@@ -41,8 +39,6 @@ constructor(
4139

4240
override fun hris(): HrisService = hris
4341

44-
override fun ats(): AtsService = ats
45-
4642
override fun providers(): ProviderService = providers
4743

4844
override fun account(): AccountService = account

0 commit comments

Comments
 (0)