Skip to content

Commit abc60a2

Browse files
feat(api): api update
1 parent fd20b60 commit abc60a2

14 files changed

+158
-154
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-2450f9bcc309174bb09e7cc75c3d873240626676782a6d0aa7578395adfa80a8.yml
3-
openapi_spec_hash: ce0eebc26042d65a7831455ca7e9c5a8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-5b00a0bc705b1d5bfcb5ea79c7af544766d51ec12ccc4721825664ab397789d8.yml
3+
openapi_spec_hash: 34891659cff31395ba7683a8153b1db5
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",
1110
"401k",
1211
"401k_roth",
1312
"401k_loan",
1413
"403b",
1514
"403b_roth",
15+
"457",
1616
"457_roth",
17-
"commuter",
18-
"custom_post_tax",
19-
"custom_pre_tax",
20-
"fsa_dependent_care",
21-
"fsa_medical",
22-
"hsa_post",
23-
"hsa_pre",
24-
"s125_dental",
2517
"s125_medical",
18+
"s125_dental",
2619
"s125_vision",
27-
"simple",
20+
"hsa_pre",
21+
"hsa_post",
22+
"fsa_medical",
23+
"fsa_dependent_care",
2824
"simple_ira",
25+
"simple",
26+
"commuter",
27+
"custom_post_tax",
28+
"custom_pre_tax",
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-
metadata: Optional[Dict[str, Optional[object]]] = None
13-
"""The metadata of the pay statement item derived by the rules engine if available.
14-
15-
Each attribute will be a key-value pair defined by a rule.
16-
"""
17-
1812
employer: Optional[bool] = None
1913
"""`true` if the amount is paid by the employers.
2014
2115
This field is only available for taxes.
2216
"""
2317

18+
metadata: Optional[Dict[str, Optional[object]]] = None
19+
"""The metadata of the pay statement item derived by the rules engine if available.
20+
21+
Each attribute will be a key-value pair defined by a rule.
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: Attributes
35+
attributes: Optional[Attributes] = None
3636
"""The attributes of the pay statement item."""
3737

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

41-
name: str
41+
name: Optional[str] = None
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: Dict[str, Optional[object]]
28+
metadata: Optional[Dict[str, Optional[object]]] = None
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,13 +34,15 @@ class EarningAttributesMetadata(BaseModel):
3434

3535

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

3939

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

44+
attributes: Optional[EarningAttributes] = None
45+
4446
currency: Optional[str] = None
4547
"""The earnings currency code."""
4648

@@ -73,11 +75,9 @@ class Earning(BaseModel):
7375
] = None
7476
"""The type of earning."""
7577

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

7979
class EmployeeDeductionAttributesMetadata(BaseModel):
80-
metadata: Dict[str, Optional[object]]
80+
metadata: Optional[Dict[str, Optional[object]]] = None
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,13 +86,15 @@ class EmployeeDeductionAttributesMetadata(BaseModel):
8686

8787

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

9191

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

96+
attributes: Optional[EmployeeDeductionAttributes] = None
97+
9698
currency: Optional[str] = None
9799
"""The deduction currency."""
98100

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

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

111111
class EmployerContributionAttributesMetadata(BaseModel):
112-
metadata: Dict[str, Optional[object]]
112+
metadata: Optional[Dict[str, Optional[object]]] = None
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,13 +118,15 @@ class EmployerContributionAttributesMetadata(BaseModel):
118118

119119

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

123123

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

128+
attributes: Optional[EmployerContributionAttributes] = None
129+
128130
currency: Optional[str] = None
129131
"""The contribution currency."""
130132

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

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

140140
class TaxAttributesMetadata(BaseModel):
141-
metadata: Dict[str, Optional[object]]
141+
metadata: Optional[Dict[str, Optional[object]]] = None
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,13 +147,15 @@ class TaxAttributesMetadata(BaseModel):
147147

148148

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

152152

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

157+
attributes: Optional[TaxAttributes] = None
158+
157159
currency: Optional[str] = None
158160
"""The currency code."""
159161

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

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

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

3+
from typing import Optional
4+
35
from ..._models import BaseModel
46
from .pay_statement_response_body import PayStatementResponseBody
57

68
__all__ = ["PayStatementResponse"]
79

810

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

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

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

src/finch/types/hris/pay_statement_response_body.py

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

55
from ..._models import BaseModel
66
from .pay_statement import PayStatement
7+
from ..shared.paging import Paging
78

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)"""
9+
__all__ = ["PayStatementResponseBody"]
1710

1811

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

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

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: str
19+
id: Optional[str] = None
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-
"bi_weekly",
44-
"daily",
45-
"monthly",
46-
"other",
47-
"quarterly",
4843
"semi_annually",
44+
"quarterly",
45+
"monthly",
4946
"semi_monthly",
47+
"bi_weekly",
5048
"weekly",
49+
"daily",
50+
"other",
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: str
14+
currency: Optional[str] = None

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 Required, TypedDict
6+
from typing_extensions import TypedDict
77

88
__all__ = ["MoneyParam"]
99

1010

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

15-
currency: Required[str]
15+
currency: str
Lines changed: 17 additions & 7 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
3+
from typing import List, Optional
44
from typing_extensions import Literal
55

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

1010

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

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

18-
pay_frequencies: List[
19-
Literal[
20-
"annually", "bi_weekly", "daily", "monthly", "other", "quarterly", "semi_annually", "semi_monthly", "weekly"
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+
]
2131
]
22-
]
32+
] = None
2333
"""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", "bi_weekly", "daily", "monthly", "other", "quarterly", "semi_annually", "semi_monthly", "weekly"
22+
"annually", "semi_annually", "quarterly", "monthly", "semi_monthly", "bi_weekly", "weekly", "daily", "other"
2323
]
2424
]
2525
"""List of pay frequencies associated with this pay group"""

0 commit comments

Comments
 (0)