Skip to content

Commit 0af1c84

Browse files
feat(api): api update
1 parent ac6a9d8 commit 0af1c84

14 files changed

+154
-158
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f09e5f2c555d7ee764478b7bc73e92cd21f403d6ec189be14574c8367bc131ce.yml
3-
openapi_spec_hash: bd0a8e001f14132c105992d40149909a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-331df2398447990a86899b05ac569534b6a7e4ff1d73a319d57f67b34a201fb7.yml
3+
openapi_spec_hash: 6e57516524c0519e90213c0554b26ab4
44
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6

src/finch/types/hris/benefit_type.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77

88
BenefitType: TypeAlias = Optional[
99
Literal[
10+
"457",
1011
"401k",
1112
"401k_roth",
1213
"401k_loan",
1314
"403b",
1415
"403b_roth",
15-
"457",
1616
"457_roth",
17-
"s125_medical",
18-
"s125_dental",
19-
"s125_vision",
20-
"hsa_pre",
21-
"hsa_post",
22-
"fsa_medical",
23-
"fsa_dependent_care",
24-
"simple_ira",
25-
"simple",
2617
"commuter",
2718
"custom_post_tax",
2819
"custom_pre_tax",
20+
"fsa_dependent_care",
21+
"fsa_medical",
22+
"hsa_post",
23+
"hsa_pre",
24+
"s125_dental",
25+
"s125_medical",
26+
"s125_vision",
27+
"simple",
28+
"simple_ira",
2929
]
3030
]

src/finch/types/hris/company/pay_statement_item_list_response.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99

1010

1111
class Attributes(BaseModel):
12-
employer: Optional[bool] = None
13-
"""`true` if the amount is paid by the employers.
14-
15-
This field is only available for taxes.
16-
"""
17-
1812
metadata: Optional[Dict[str, Optional[object]]] = None
1913
"""The metadata of the pay statement item derived by the rules engine if available.
2014
2115
Each attribute will be a key-value pair defined by a rule.
2216
"""
2317

18+
employer: Optional[bool] = None
19+
"""`true` if the amount is paid by the employers.
20+
21+
This field is only available for taxes.
22+
"""
23+
2424
pre_tax: Optional[bool] = None
2525
"""`true` if the pay statement item is pre-tax.
2626
@@ -32,11 +32,11 @@ class Attributes(BaseModel):
3232

3333

3434
class PayStatementItemListResponse(BaseModel):
35-
attributes: Optional[Attributes] = None
35+
attributes: Attributes
3636
"""The attributes of the pay statement item."""
3737

38-
category: Optional[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]] = None
38+
category: Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]
3939
"""The category of the pay statement item."""
4040

41-
name: Optional[str] = None
41+
name: str
4242
"""The name of the pay statement item."""

src/finch/types/hris/pay_statement.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
class EarningAttributesMetadata(BaseModel):
28-
metadata: Optional[Dict[str, Optional[object]]] = None
28+
metadata: Dict[str, Optional[object]]
2929
"""The metadata to be attached to the entity by existing rules.
3030
3131
It is a key-value pairs where the values can be of any type (string, number,
@@ -34,15 +34,13 @@ class EarningAttributesMetadata(BaseModel):
3434

3535

3636
class EarningAttributes(BaseModel):
37-
metadata: Optional[EarningAttributesMetadata] = None
37+
metadata: EarningAttributesMetadata
3838

3939

4040
class Earning(BaseModel):
4141
amount: Optional[int] = None
4242
"""The earnings amount in cents."""
4343

44-
attributes: Optional[EarningAttributes] = None
45-
4644
currency: Optional[str] = None
4745
"""The earnings currency code."""
4846

@@ -75,9 +73,11 @@ class Earning(BaseModel):
7573
] = None
7674
"""The type of earning."""
7775

76+
attributes: Optional[EarningAttributes] = None
77+
7878

7979
class EmployeeDeductionAttributesMetadata(BaseModel):
80-
metadata: Optional[Dict[str, Optional[object]]] = None
80+
metadata: Dict[str, Optional[object]]
8181
"""The metadata to be attached to the entity by existing rules.
8282
8383
It is a key-value pairs where the values can be of any type (string, number,
@@ -86,15 +86,13 @@ class EmployeeDeductionAttributesMetadata(BaseModel):
8686

8787

8888
class EmployeeDeductionAttributes(BaseModel):
89-
metadata: Optional[EmployeeDeductionAttributesMetadata] = None
89+
metadata: EmployeeDeductionAttributesMetadata
9090

9191

9292
class EmployeeDeduction(BaseModel):
9393
amount: Optional[int] = None
9494
"""The deduction amount in cents."""
9595

96-
attributes: Optional[EmployeeDeductionAttributes] = None
97-
9896
currency: Optional[str] = None
9997
"""The deduction currency."""
10098

@@ -107,9 +105,11 @@ class EmployeeDeduction(BaseModel):
107105
type: Optional[BenefitType] = None
108106
"""Type of benefit."""
109107

108+
attributes: Optional[EmployeeDeductionAttributes] = None
109+
110110

111111
class EmployerContributionAttributesMetadata(BaseModel):
112-
metadata: Optional[Dict[str, Optional[object]]] = None
112+
metadata: Dict[str, Optional[object]]
113113
"""The metadata to be attached to the entity by existing rules.
114114
115115
It is a key-value pairs where the values can be of any type (string, number,
@@ -118,15 +118,13 @@ class EmployerContributionAttributesMetadata(BaseModel):
118118

119119

120120
class EmployerContributionAttributes(BaseModel):
121-
metadata: Optional[EmployerContributionAttributesMetadata] = None
121+
metadata: EmployerContributionAttributesMetadata
122122

123123

124124
class EmployerContribution(BaseModel):
125125
amount: Optional[int] = None
126126
"""The contribution amount in cents."""
127127

128-
attributes: Optional[EmployerContributionAttributes] = None
129-
130128
currency: Optional[str] = None
131129
"""The contribution currency."""
132130

@@ -136,9 +134,11 @@ class EmployerContribution(BaseModel):
136134
type: Optional[BenefitType] = None
137135
"""Type of benefit."""
138136

137+
attributes: Optional[EmployerContributionAttributes] = None
138+
139139

140140
class TaxAttributesMetadata(BaseModel):
141-
metadata: Optional[Dict[str, Optional[object]]] = None
141+
metadata: Dict[str, Optional[object]]
142142
"""The metadata to be attached to the entity by existing rules.
143143
144144
It is a key-value pairs where the values can be of any type (string, number,
@@ -147,15 +147,13 @@ class TaxAttributesMetadata(BaseModel):
147147

148148

149149
class TaxAttributes(BaseModel):
150-
metadata: Optional[TaxAttributesMetadata] = None
150+
metadata: TaxAttributesMetadata
151151

152152

153153
class Tax(BaseModel):
154154
amount: Optional[int] = None
155155
"""The tax amount in cents."""
156156

157-
attributes: Optional[TaxAttributes] = None
158-
159157
currency: Optional[str] = None
160158
"""The currency code."""
161159

@@ -168,6 +166,8 @@ class Tax(BaseModel):
168166
type: Optional[Literal["state", "federal", "local", "fica"]] = None
169167
"""The type of taxes."""
170168

169+
attributes: Optional[TaxAttributes] = None
170+
171171

172172
class PayStatement(BaseModel):
173173
earnings: Optional[List[Optional[Earning]]] = None
@@ -180,7 +180,7 @@ class PayStatement(BaseModel):
180180

181181
gross_pay: Optional[Money] = None
182182

183-
individual_id: Optional[str] = None
183+
individual_id: str
184184
"""A stable Finch `id` (UUID v4) for an individual in the company"""
185185

186186
net_pay: Optional[Money] = None
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
4-
53
from ..._models import BaseModel
64
from .pay_statement_response_body import PayStatementResponseBody
75

86
__all__ = ["PayStatementResponse"]
97

108

119
class PayStatementResponse(BaseModel):
12-
body: Optional[PayStatementResponseBody] = None
10+
body: PayStatementResponseBody
1311

14-
code: Optional[int] = None
12+
code: int
1513

16-
payment_id: Optional[str] = None
14+
payment_id: str

src/finch/types/hris/pay_statement_response_body.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44

55
from ..._models import BaseModel
66
from .pay_statement import PayStatement
7-
from ..shared.paging import Paging
87

9-
__all__ = ["PayStatementResponseBody"]
8+
__all__ = ["PayStatementResponseBody", "Paging"]
9+
10+
11+
class Paging(BaseModel):
12+
offset: int
13+
"""The current start index of the returned list of elements"""
14+
15+
count: Optional[int] = None
16+
"""The total number of elements for the entire query (not just the given page)"""
1017

1118

1219
class PayStatementResponseBody(BaseModel):
13-
paging: Optional[Paging] = None
20+
paging: Paging
1421

15-
pay_statements: Optional[List[PayStatement]] = None
16-
"""The array of pay statements for the current payment."""
22+
pay_statements: List[PayStatement]

src/finch/types/hris/payment.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class PayPeriod(BaseModel):
1616

1717

1818
class Payment(BaseModel):
19-
id: Optional[str] = None
19+
id: str
2020
"""The unique id for the payment."""
2121

2222
company_debit: Optional[Money] = None
@@ -40,14 +40,14 @@ class Payment(BaseModel):
4040
List[
4141
Literal[
4242
"annually",
43-
"semi_annually",
44-
"quarterly",
45-
"monthly",
46-
"semi_monthly",
4743
"bi_weekly",
48-
"weekly",
4944
"daily",
45+
"monthly",
5046
"other",
47+
"quarterly",
48+
"semi_annually",
49+
"semi_monthly",
50+
"weekly",
5151
]
5252
]
5353
] = None

src/finch/types/money.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ class Money(BaseModel):
1111
amount: Optional[int] = None
1212
"""Amount for money object (in cents)"""
1313

14-
currency: Optional[str] = None
14+
currency: str

src/finch/types/money_param.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from __future__ import annotations
44

55
from typing import Optional
6-
from typing_extensions import TypedDict
6+
from typing_extensions import Required, TypedDict
77

88
__all__ = ["MoneyParam"]
99

1010

1111
class MoneyParam(TypedDict, total=False):
12-
amount: Optional[int]
12+
amount: Required[Optional[int]]
1313
"""Amount for money object (in cents)"""
1414

15-
currency: str
15+
currency: Required[str]
Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Optional
3+
from typing import List
44
from typing_extensions import Literal
55

66
from ..._models import BaseModel
@@ -9,25 +9,15 @@
99

1010

1111
class PayGroupListResponse(BaseModel):
12-
id: Optional[str] = None
12+
id: str
1313
"""Finch id (uuidv4) for the pay group"""
1414

15-
name: Optional[str] = None
15+
name: str
1616
"""Name of the pay group"""
1717

18-
pay_frequencies: Optional[
19-
List[
20-
Literal[
21-
"annually",
22-
"semi_annually",
23-
"quarterly",
24-
"monthly",
25-
"semi_monthly",
26-
"bi_weekly",
27-
"weekly",
28-
"daily",
29-
"other",
30-
]
18+
pay_frequencies: List[
19+
Literal[
20+
"annually", "bi_weekly", "daily", "monthly", "other", "quarterly", "semi_annually", "semi_monthly", "weekly"
3121
]
32-
] = None
22+
]
3323
"""List of pay frequencies associated with this pay group"""

src/finch/types/payroll/pay_group_retrieve_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PayGroupRetrieveResponse(BaseModel):
1919

2020
pay_frequencies: List[
2121
Literal[
22-
"annually", "semi_annually", "quarterly", "monthly", "semi_monthly", "bi_weekly", "weekly", "daily", "other"
22+
"annually", "bi_weekly", "daily", "monthly", "other", "quarterly", "semi_annually", "semi_monthly", "weekly"
2323
]
2424
]
2525
"""List of pay frequencies associated with this pay group"""

0 commit comments

Comments
 (0)