Skip to content

Commit 3b0c11a

Browse files
chore: update some doc strings (#307)
1 parent bcc81e5 commit 3b0c11a

File tree

5 files changed

+34
-100
lines changed

5 files changed

+34
-100
lines changed

src/finch/resources/account.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ def disconnect(
3636
extra_body: Body | None = None,
3737
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
3838
) -> DisconnectResponse:
39-
"""
40-
Disconnect an employer from your application and invalidate all `access_token`s
41-
associated with the employer. We require applications to implement the
42-
Disconnect endpoint for billing and security purposes.
43-
"""
39+
"""Disconnect one or more `access_token`s from your application."""
4440
return self._post(
4541
"/disconnect",
4642
options=make_request_options(
@@ -88,11 +84,7 @@ async def disconnect(
8884
extra_body: Body | None = None,
8985
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
9086
) -> DisconnectResponse:
91-
"""
92-
Disconnect an employer from your application and invalidate all `access_token`s
93-
associated with the employer. We require applications to implement the
94-
Disconnect endpoint for billing and security purposes.
95-
"""
87+
"""Disconnect one or more `access_token`s from your application."""
9688
return await self._post(
9789
"/disconnect",
9890
options=make_request_options(

src/finch/resources/hris/benefits/benefits.py

+14-42
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ def create(
6868
extra_body: Body | None = None,
6969
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
7070
) -> CreateCompanyBenefitsResponse:
71-
"""
72-
**Availability: Automated and Assisted Benefits providers**
71+
"""Creates a new company-wide deduction or contribution.
7372
74-
Creates a new company-wide benefit. Please use the `/meta` endpoint to view
75-
available types for each provider.
73+
Please use the
74+
`/providers` endpoint to view available types for each provider.
7675
7776
Args:
7877
type: Type of benefit.
@@ -113,9 +112,7 @@ def retrieve(
113112
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
114113
) -> CompanyBenefit:
115114
"""
116-
**Availability: Automated Benefits providers only**
117-
118-
Lists benefit information for a given benefit
115+
Lists deductions and contributions information for a given item
119116
120117
Args:
121118
extra_headers: Send extra headers
@@ -149,9 +146,7 @@ def update(
149146
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
150147
) -> UpdateCompanyBenefitResponse:
151148
"""
152-
**Availability: Automated and Assisted Benefits providers**
153-
154-
Updates an existing company-wide benefit
149+
Updates an existing company-wide deduction or contribution
155150
156151
Args:
157152
description: Updated name or description.
@@ -185,11 +180,7 @@ def list(
185180
extra_body: Body | None = None,
186181
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
187182
) -> SyncSinglePage[CompanyBenefit]:
188-
"""
189-
**Availability: Automated Benefits providers only**
190-
191-
List all company-wide benefits.
192-
"""
183+
"""List all company-wide deductions and contributions."""
193184
return self._get_api_list(
194185
"/employer/benefits",
195186
page=SyncSinglePage[CompanyBenefit],
@@ -209,12 +200,7 @@ def list_supported_benefits(
209200
extra_body: Body | None = None,
210201
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
211202
) -> SyncSinglePage[SupportedBenefit]:
212-
"""
213-
**Availability: Automated and Assisted Benefits providers**
214-
215-
Lists available types and configurations for the provider associated with the
216-
access token.
217-
"""
203+
"""Get deductions metadata"""
218204
return self._get_api_list(
219205
"/employer/benefits/meta",
220206
page=SyncSinglePage[SupportedBenefit],
@@ -251,11 +237,10 @@ async def create(
251237
extra_body: Body | None = None,
252238
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
253239
) -> CreateCompanyBenefitsResponse:
254-
"""
255-
**Availability: Automated and Assisted Benefits providers**
240+
"""Creates a new company-wide deduction or contribution.
256241
257-
Creates a new company-wide benefit. Please use the `/meta` endpoint to view
258-
available types for each provider.
242+
Please use the
243+
`/providers` endpoint to view available types for each provider.
259244
260245
Args:
261246
type: Type of benefit.
@@ -296,9 +281,7 @@ async def retrieve(
296281
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
297282
) -> CompanyBenefit:
298283
"""
299-
**Availability: Automated Benefits providers only**
300-
301-
Lists benefit information for a given benefit
284+
Lists deductions and contributions information for a given item
302285
303286
Args:
304287
extra_headers: Send extra headers
@@ -332,9 +315,7 @@ async def update(
332315
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
333316
) -> UpdateCompanyBenefitResponse:
334317
"""
335-
**Availability: Automated and Assisted Benefits providers**
336-
337-
Updates an existing company-wide benefit
318+
Updates an existing company-wide deduction or contribution
338319
339320
Args:
340321
description: Updated name or description.
@@ -368,11 +349,7 @@ def list(
368349
extra_body: Body | None = None,
369350
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
370351
) -> AsyncPaginator[CompanyBenefit, AsyncSinglePage[CompanyBenefit]]:
371-
"""
372-
**Availability: Automated Benefits providers only**
373-
374-
List all company-wide benefits.
375-
"""
352+
"""List all company-wide deductions and contributions."""
376353
return self._get_api_list(
377354
"/employer/benefits",
378355
page=AsyncSinglePage[CompanyBenefit],
@@ -392,12 +369,7 @@ def list_supported_benefits(
392369
extra_body: Body | None = None,
393370
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
394371
) -> AsyncPaginator[SupportedBenefit, AsyncSinglePage[SupportedBenefit]]:
395-
"""
396-
**Availability: Automated and Assisted Benefits providers**
397-
398-
Lists available types and configurations for the provider associated with the
399-
access token.
400-
"""
372+
"""Get deductions metadata"""
401373
return self._get_api_list(
402374
"/employer/benefits/meta",
403375
page=AsyncSinglePage[SupportedBenefit],

src/finch/resources/hris/benefits/individuals.py

+16-38
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,12 @@ def enroll_many(
5151
extra_body: Body | None = None,
5252
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
5353
) -> SyncSinglePage[EnrolledIndividual]:
54-
"""
55-
**Availability: Automated and Assisted Benefits providers**
56-
57-
Enroll an individual into a benefit. If the employee is already enrolled, the
58-
enrollment amounts will be adjusted.
59-
60-
<!-- theme: warning -->
54+
"""Enroll an individual into a deduction or contribution.
6155
62-
> Making changes to an individual's benefits may have tax consequences based on
63-
> IRS regulations. Please consult a tax expert to ensure all changes being made
64-
> to the system are compliant with local, state, and federal law.
56+
This is an overwrite
57+
operation. If the employee is already enrolled, the enrollment amounts will be
58+
adjusted. Making the same request multiple times will not create new
59+
enrollments, but will continue to set the state of the existing enrollment.
6560
6661
Args:
6762
individuals: Array of the individual_id to enroll and a configuration object.
@@ -99,9 +94,7 @@ def enrolled_ids(
9994
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
10095
) -> IndividualEnrolledIDsResponse:
10196
"""
102-
**Availability: Automated Benefits providers only**
103-
104-
Lists individuals currently enrolled in a given benefit.
97+
Lists individuals currently enrolled in a given deduction.
10598
10699
Args:
107100
extra_headers: Send extra headers
@@ -135,9 +128,7 @@ def retrieve_many_benefits(
135128
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
136129
) -> SyncSinglePage[IndividualBenefit]:
137130
"""
138-
**Availability: Automated Benefits providers only**
139-
140-
Get enrolled benefit information for the given individuals.
131+
Get enrollment information for the given individuals.
141132
142133
Args:
143134
individual_ids: comma-delimited list of stable Finch uuids for each individual. If empty,
@@ -182,9 +173,7 @@ def unenroll_many(
182173
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
183174
) -> SyncSinglePage[UnenrolledIndividual]:
184175
"""
185-
**Availability: Automated and Assisted Benefits providers**
186-
187-
Unenroll individuals from a benefit
176+
Unenroll individuals from a deduction or contribution
188177
189178
Args:
190179
individual_ids: Array of individual_ids to unenroll.
@@ -234,17 +223,12 @@ def enroll_many(
234223
extra_body: Body | None = None,
235224
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
236225
) -> AsyncPaginator[EnrolledIndividual, AsyncSinglePage[EnrolledIndividual]]:
237-
"""
238-
**Availability: Automated and Assisted Benefits providers**
239-
240-
Enroll an individual into a benefit. If the employee is already enrolled, the
241-
enrollment amounts will be adjusted.
242-
243-
<!-- theme: warning -->
226+
"""Enroll an individual into a deduction or contribution.
244227
245-
> Making changes to an individual's benefits may have tax consequences based on
246-
> IRS regulations. Please consult a tax expert to ensure all changes being made
247-
> to the system are compliant with local, state, and federal law.
228+
This is an overwrite
229+
operation. If the employee is already enrolled, the enrollment amounts will be
230+
adjusted. Making the same request multiple times will not create new
231+
enrollments, but will continue to set the state of the existing enrollment.
248232
249233
Args:
250234
individuals: Array of the individual_id to enroll and a configuration object.
@@ -282,9 +266,7 @@ async def enrolled_ids(
282266
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
283267
) -> IndividualEnrolledIDsResponse:
284268
"""
285-
**Availability: Automated Benefits providers only**
286-
287-
Lists individuals currently enrolled in a given benefit.
269+
Lists individuals currently enrolled in a given deduction.
288270
289271
Args:
290272
extra_headers: Send extra headers
@@ -318,9 +300,7 @@ def retrieve_many_benefits(
318300
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
319301
) -> AsyncPaginator[IndividualBenefit, AsyncSinglePage[IndividualBenefit]]:
320302
"""
321-
**Availability: Automated Benefits providers only**
322-
323-
Get enrolled benefit information for the given individuals.
303+
Get enrollment information for the given individuals.
324304
325305
Args:
326306
individual_ids: comma-delimited list of stable Finch uuids for each individual. If empty,
@@ -365,9 +345,7 @@ def unenroll_many(
365345
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
366346
) -> AsyncPaginator[UnenrolledIndividual, AsyncSinglePage[UnenrolledIndividual]]:
367347
"""
368-
**Availability: Automated and Assisted Benefits providers**
369-
370-
Unenroll individuals from a benefit
348+
Unenroll individuals from a deduction or contribution
371349
372350
Args:
373351
individual_ids: Array of individual_ids to unenroll.

src/finch/resources/hris/employments.py

-8
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ def retrieve_many(
4545
"""
4646
Read individual employment and income data
4747
48-
Note: Income information is returned as reported by the provider. This may not
49-
always be annualized income, but may be in units of bi-weekly, semi-monthly,
50-
daily, etc, depending on what information the provider returns.
51-
5248
Args:
5349
requests: The array of batch requests.
5450
@@ -95,10 +91,6 @@ def retrieve_many(
9591
"""
9692
Read individual employment and income data
9793
98-
Note: Income information is returned as reported by the provider. This may not
99-
always be annualized income, but may be in units of bi-weekly, semi-monthly,
100-
daily, etc, depending on what information the provider returns.
101-
10294
Args:
10395
requests: The array of batch requests.
10496

src/finch/resources/hris/pay_statements.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def retrieve_many(
4646
Read detailed pay statements for each individual.
4747
4848
Deduction and contribution types are supported by the payroll systems that
49-
support Benefits.
49+
supports Benefits.
5050
5151
Args:
5252
requests: The array of batch requests.
@@ -97,7 +97,7 @@ def retrieve_many(
9797
Read detailed pay statements for each individual.
9898
9999
Deduction and contribution types are supported by the payroll systems that
100-
support Benefits.
100+
supports Benefits.
101101
102102
Args:
103103
requests: The array of batch requests.

0 commit comments

Comments
 (0)