Skip to content

Commit d1dc8a4

Browse files
fix(client): manual fix
1 parent edcea6c commit d1dc8a4

File tree

7 files changed

+23
-62
lines changed

7 files changed

+23
-62
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: 46
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1a82d3230c420c8562600b0ad45133d79ab68ffd21d524ab26eef11e163dba09.yml
33
openapi_spec_hash: 7bd02ce73505e51c5fd78608fed55c62
4-
config_hash: bb896000dc7e790e5c9ddda2549fb7ac
4+
config_hash: 5146b12344dae76238940989dac1e8a0

api.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ from finch.types.hris import (
175175
SupportPerBenefitType,
176176
SupportedBenefit,
177177
UpdateCompanyBenefitResponse,
178-
BenefitListSupportedBenefitsResponse,
179178
BenfitContribution,
180179
)
181180
```
@@ -186,7 +185,7 @@ Methods:
186185
- <code title="get /employer/benefits/{benefit_id}">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">retrieve</a>(benefit_id) -> <a href="./src/finch/types/hris/company_benefit.py">CompanyBenefit</a></code>
187186
- <code title="post /employer/benefits/{benefit_id}">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">update</a>(benefit_id, \*\*<a href="src/finch/types/hris/benefit_update_params.py">params</a>) -> <a href="./src/finch/types/hris/update_company_benefit_response.py">UpdateCompanyBenefitResponse</a></code>
188187
- <code title="get /employer/benefits">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">list</a>() -> <a href="./src/finch/types/hris/company_benefit.py">SyncSinglePage[CompanyBenefit]</a></code>
189-
- <code title="get /employer/benefits/meta">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">list_supported_benefits</a>() -> <a href="./src/finch/types/hris/benefit_list_supported_benefits_response.py">SyncSinglePage[BenefitListSupportedBenefitsResponse]</a></code>
188+
- <code title="get /employer/benefits/meta">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">list_supported_benefits</a>() -> <a href="./src/finch/types/hris/supported_benefit.py">SyncSinglePage[SupportedBenefit]</a></code>
190189

191190
### Individuals
192191

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
from ....types.hris.benefit_type import BenefitType
2727
from ....types.hris.company_benefit import CompanyBenefit
2828
from ....types.hris.benefit_frequency import BenefitFrequency
29+
from ....types.hris.supported_benefit import SupportedBenefit
2930
from ....types.hris.update_company_benefit_response import UpdateCompanyBenefitResponse
3031
from ....types.hris.create_company_benefits_response import CreateCompanyBenefitsResponse
31-
from ....types.hris.benefit_list_supported_benefits_response import BenefitListSupportedBenefitsResponse
3232

3333
__all__ = ["Benefits", "AsyncBenefits"]
3434

@@ -211,15 +211,15 @@ def list_supported_benefits(
211211
extra_query: Query | None = None,
212212
extra_body: Body | None = None,
213213
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
214-
) -> SyncSinglePage[BenefitListSupportedBenefitsResponse]:
214+
) -> SyncSinglePage[SupportedBenefit]:
215215
"""Get deductions metadata"""
216216
return self._get_api_list(
217217
"/employer/benefits/meta",
218-
page=SyncSinglePage[BenefitListSupportedBenefitsResponse],
218+
page=SyncSinglePage[SupportedBenefit],
219219
options=make_request_options(
220220
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
221221
),
222-
model=BenefitListSupportedBenefitsResponse,
222+
model=SupportedBenefit,
223223
)
224224

225225

@@ -401,15 +401,15 @@ def list_supported_benefits(
401401
extra_query: Query | None = None,
402402
extra_body: Body | None = None,
403403
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
404-
) -> AsyncPaginator[BenefitListSupportedBenefitsResponse, AsyncSinglePage[BenefitListSupportedBenefitsResponse]]:
404+
) -> AsyncPaginator[SupportedBenefit, AsyncSinglePage[SupportedBenefit]]:
405405
"""Get deductions metadata"""
406406
return self._get_api_list(
407407
"/employer/benefits/meta",
408-
page=AsyncSinglePage[BenefitListSupportedBenefitsResponse],
408+
page=AsyncSinglePage[SupportedBenefit],
409409
options=make_request_options(
410410
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
411411
),
412-
model=BenefitListSupportedBenefitsResponse,
412+
model=SupportedBenefit,
413413
)
414414

415415

src/finch/types/hris/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from .benefits_support import BenefitsSupport as BenefitsSupport
1515
from .benefit_frequency import BenefitFrequency as BenefitFrequency
1616
from .document_response import DocumentResponse as DocumentResponse
17+
from .supported_benefit import SupportedBenefit as SupportedBenefit
1718
from .benfit_contribution import BenfitContribution as BenfitContribution
1819
from .individual_response import IndividualResponse as IndividualResponse
1920
from .pay_statement_param import PayStatementParam as PayStatementParam
@@ -38,6 +39,3 @@
3839
from .directory_list_individuals_params import DirectoryListIndividualsParams as DirectoryListIndividualsParams
3940
from .pay_statement_retrieve_many_params import PayStatementRetrieveManyParams as PayStatementRetrieveManyParams
4041
from .pay_statement_data_sync_in_progress import PayStatementDataSyncInProgress as PayStatementDataSyncInProgress
41-
from .benefit_list_supported_benefits_response import (
42-
BenefitListSupportedBenefitsResponse as BenefitListSupportedBenefitsResponse,
43-
)
Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,15 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Optional
4-
from typing_extensions import Literal
3+
from typing import Optional
54

65
from ..._models import BaseModel
7-
from .benefit_frequency import BenefitFrequency
6+
from .supported_benefit import SupportedBenefit
87
from .support_per_benefit_type import SupportPerBenefitType
98

10-
__all__ = ["BenefitFeaturesAndOperations", "SupportedFeatures"]
11-
12-
13-
class SupportedFeatures(BaseModel):
14-
annual_maximum: Optional[bool] = None
15-
"""Whether the provider supports an annual maximum for this benefit."""
16-
17-
catch_up: Optional[bool] = None
18-
"""Whether the provider supports catch up for this benefit.
19-
20-
This field will only be true for retirement benefits.
21-
"""
22-
23-
company_contribution: Optional[List[Optional[Literal["fixed", "percent"]]]] = None
24-
"""Supported contribution types.
25-
26-
An empty array indicates contributions are not supported.
27-
"""
28-
29-
description: Optional[str] = None
30-
31-
employee_deduction: Optional[List[Optional[Literal["fixed", "percent"]]]] = None
32-
"""Supported deduction types.
33-
34-
An empty array indicates deductions are not supported.
35-
"""
36-
37-
frequencies: Optional[List[Optional[BenefitFrequency]]] = None
38-
"""The list of frequencies supported by the provider for this benefit"""
39-
40-
hsa_contribution_limit: Optional[List[Optional[Literal["individual", "family"]]]] = None
41-
"""Whether the provider supports HSA contribution limits.
42-
43-
Empty if this feature is not supported for the benefit. This array only has
44-
values for HSA benefits.
45-
"""
9+
__all__ = ["BenefitFeaturesAndOperations"]
4610

4711

4812
class BenefitFeaturesAndOperations(BaseModel):
49-
supported_features: Optional[SupportedFeatures] = None
13+
supported_features: Optional[SupportedBenefit] = None
5014

5115
supported_operations: Optional[SupportPerBenefitType] = None

src/finch/types/hris/benefit_list_supported_benefits_response.py renamed to src/finch/types/hris/supported_benefit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
from ..._models import BaseModel
77
from .benefit_frequency import BenefitFrequency
88

9-
__all__ = ["BenefitListSupportedBenefitsResponse"]
9+
__all__ = ["SupportedBenefit"]
1010

1111

12-
class BenefitListSupportedBenefitsResponse(BaseModel):
12+
class SupportedBenefit(BaseModel):
1313
annual_maximum: Optional[bool] = None
1414
"""Whether the provider supports an annual maximum for this benefit."""
1515

tests/api_resources/hris/test_benefits.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
from finch.pagination import SyncSinglePage, AsyncSinglePage
1313
from finch.types.hris import (
1414
CompanyBenefit,
15+
SupportedBenefit,
1516
UpdateCompanyBenefitResponse,
1617
CreateCompanyBenefitsResponse,
17-
BenefitListSupportedBenefitsResponse,
1818
)
1919

2020
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -178,7 +178,7 @@ def test_streaming_response_list(self, client: Finch) -> None:
178178
@parametrize
179179
def test_method_list_supported_benefits(self, client: Finch) -> None:
180180
benefit = client.hris.benefits.list_supported_benefits()
181-
assert_matches_type(SyncSinglePage[BenefitListSupportedBenefitsResponse], benefit, path=["response"])
181+
assert_matches_type(SyncSinglePage[SupportedBenefit], benefit, path=["response"])
182182

183183
@parametrize
184184
def test_raw_response_list_supported_benefits(self, client: Finch) -> None:
@@ -187,7 +187,7 @@ def test_raw_response_list_supported_benefits(self, client: Finch) -> None:
187187
assert response.is_closed is True
188188
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
189189
benefit = response.parse()
190-
assert_matches_type(SyncSinglePage[BenefitListSupportedBenefitsResponse], benefit, path=["response"])
190+
assert_matches_type(SyncSinglePage[SupportedBenefit], benefit, path=["response"])
191191

192192
@parametrize
193193
def test_streaming_response_list_supported_benefits(self, client: Finch) -> None:
@@ -196,7 +196,7 @@ def test_streaming_response_list_supported_benefits(self, client: Finch) -> None
196196
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
197197

198198
benefit = response.parse()
199-
assert_matches_type(SyncSinglePage[BenefitListSupportedBenefitsResponse], benefit, path=["response"])
199+
assert_matches_type(SyncSinglePage[SupportedBenefit], benefit, path=["response"])
200200

201201
assert cast(Any, response.is_closed) is True
202202

@@ -359,7 +359,7 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
359359
@parametrize
360360
async def test_method_list_supported_benefits(self, async_client: AsyncFinch) -> None:
361361
benefit = await async_client.hris.benefits.list_supported_benefits()
362-
assert_matches_type(AsyncSinglePage[BenefitListSupportedBenefitsResponse], benefit, path=["response"])
362+
assert_matches_type(AsyncSinglePage[SupportedBenefit], benefit, path=["response"])
363363

364364
@parametrize
365365
async def test_raw_response_list_supported_benefits(self, async_client: AsyncFinch) -> None:
@@ -368,7 +368,7 @@ async def test_raw_response_list_supported_benefits(self, async_client: AsyncFin
368368
assert response.is_closed is True
369369
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
370370
benefit = response.parse()
371-
assert_matches_type(AsyncSinglePage[BenefitListSupportedBenefitsResponse], benefit, path=["response"])
371+
assert_matches_type(AsyncSinglePage[SupportedBenefit], benefit, path=["response"])
372372

373373
@parametrize
374374
async def test_streaming_response_list_supported_benefits(self, async_client: AsyncFinch) -> None:
@@ -377,6 +377,6 @@ async def test_streaming_response_list_supported_benefits(self, async_client: As
377377
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
378378

379379
benefit = await response.parse()
380-
assert_matches_type(AsyncSinglePage[BenefitListSupportedBenefitsResponse], benefit, path=["response"])
380+
assert_matches_type(AsyncSinglePage[SupportedBenefit], benefit, path=["response"])
381381

382382
assert cast(Any, response.is_closed) is True

0 commit comments

Comments
 (0)