Skip to content

Commit ee4e136

Browse files
stainless-botRobertCraigie
authored andcommitted
style: minor reordering of types and properties (#29)
1 parent 0f3fb71 commit ee4e136

11 files changed

+78
-78
lines changed

src/finch/types/ats/application.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ class RejectedReason(BaseModel):
1414

1515

1616
class Application(BaseModel):
17-
candidate_id: str
18-
1917
id: str
2018

19+
candidate_id: str
20+
2121
job_id: str
2222

2323
offer_id: Optional[str]

src/finch/types/ats/candidate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class PhoneNumber(BaseModel):
2121

2222

2323
class Candidate(BaseModel):
24+
id: str
25+
2426
application_ids: List[str]
2527
"""Array of Finch uuids corresponding to `application`s for this individual"""
2628

@@ -32,8 +34,6 @@ class Candidate(BaseModel):
3234

3335
full_name: Optional[str]
3436

35-
id: str
36-
3737
last_activity_at: datetime
3838

3939
last_name: Optional[str]

src/finch/types/ats/job.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class HiringTeam(BaseModel):
2828

2929

3030
class Job(BaseModel):
31+
id: str
32+
3133
closed_at: Optional[datetime]
3234

3335
created_at: Optional[datetime]
@@ -36,8 +38,6 @@ class Job(BaseModel):
3638

3739
hiring_team: HiringTeam
3840

39-
id: str
40-
4141
name: Optional[str]
4242

4343
status: Optional[Literal["open", "closed", "on_hold", "draft", "archived"]]

src/finch/types/ats/offer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010

1111
class Offer(BaseModel):
12+
id: str
13+
1214
application_id: str
1315

1416
candidate_id: str
1517

1618
created_at: datetime
1719

18-
id: str
19-
2020
job_id: str
2121

2222
status: Literal[

src/finch/types/hris/company.py

+25-25
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,7 @@
66
from ...types import location
77
from ..._models import BaseModel
88

9-
__all__ = ["Company", "Entity", "Department", "DepartmentParent", "Account"]
10-
11-
12-
class Entity(BaseModel):
13-
subtype: Optional[Literal["s_corporation", "c_corporation", "b_corporation"]]
14-
"""The tax payer subtype of the company."""
15-
16-
type: Optional[Literal["llc", "corporation", "sole_proprietor", "non_profit", "partnership", "cooperative"]]
17-
"""The tax payer type of the company."""
18-
19-
20-
class DepartmentParent(BaseModel):
21-
name: Optional[str]
22-
"""The parent department's name."""
23-
24-
25-
class Department(BaseModel):
26-
name: Optional[str]
27-
"""The department name."""
28-
29-
parent: Optional[DepartmentParent]
30-
"""The parent department, if present."""
9+
__all__ = ["Company", "Account", "Department", "DepartmentParent", "Entity"]
3110

3211

3312
class Account(BaseModel):
@@ -50,7 +29,31 @@ class Account(BaseModel):
5029
"""
5130

5231

32+
class DepartmentParent(BaseModel):
33+
name: Optional[str]
34+
"""The parent department's name."""
35+
36+
37+
class Department(BaseModel):
38+
name: Optional[str]
39+
"""The department name."""
40+
41+
parent: Optional[DepartmentParent]
42+
"""The parent department, if present."""
43+
44+
45+
class Entity(BaseModel):
46+
subtype: Optional[Literal["s_corporation", "c_corporation", "b_corporation"]]
47+
"""The tax payer subtype of the company."""
48+
49+
type: Optional[Literal["llc", "corporation", "sole_proprietor", "non_profit", "partnership", "cooperative"]]
50+
"""The tax payer type of the company."""
51+
52+
5353
class Company(BaseModel):
54+
id: str
55+
"""A stable Finch `id` (UUID v4) for the company."""
56+
5457
accounts: Optional[List[Account]]
5558
"""An array of bank account objects associated with the payroll/HRIS system."""
5659

@@ -63,9 +66,6 @@ class Company(BaseModel):
6366
entity: Optional[Entity]
6467
"""The entity type object."""
6568

66-
id: str
67-
"""A stable Finch `id` (UUID v4) for the company."""
68-
6969
legal_name: Optional[str]
7070
"""The legal name of the company."""
7171

src/finch/types/hris/individual.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class PhoneNumber(BaseModel):
2222

2323

2424
class Individual(BaseModel):
25+
id: Optional[str]
26+
"""A stable Finch `id` (UUID v4) for an individual in the company."""
27+
2528
dob: Optional[str]
2629

2730
emails: Optional[List[Email]]
@@ -32,9 +35,6 @@ class Individual(BaseModel):
3235
gender: Optional[Literal["female", "male", "other", "decline_to_specify"]]
3336
"""The gender of the individual."""
3437

35-
id: Optional[str]
36-
"""A stable Finch `id` (UUID v4) for an individual in the company."""
37-
3838
last_name: Optional[str]
3939
"""The legal last name of the individual."""
4040

src/finch/types/hris/individual_in_directory.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@
44

55
from ..._models import BaseModel
66

7-
__all__ = ["IndividualInDirectory", "Manager", "Department"]
8-
9-
10-
class Manager(BaseModel):
11-
id: Optional[str]
12-
"""A stable Finch `id` (UUID v4) for an individual in the company."""
7+
__all__ = ["IndividualInDirectory", "Department", "Manager"]
138

149

1510
class Department(BaseModel):
1611
name: Optional[str]
1712
"""The name of the department."""
1813

1914

15+
class Manager(BaseModel):
16+
id: Optional[str]
17+
"""A stable Finch `id` (UUID v4) for an individual in the company."""
18+
19+
2020
class IndividualInDirectory(BaseModel):
21+
id: Optional[str]
22+
"""A stable Finch id (UUID v4) for an individual in the company."""
23+
2124
department: Optional[Department]
2225
"""The department object."""
2326

2427
first_name: Optional[str]
2528
"""The legal first name of the individual."""
2629

27-
id: Optional[str]
28-
"""A stable Finch id (UUID v4) for an individual in the company."""
29-
3030
is_active: Optional[bool]
3131
"""`true` if the individual is an active employee or contractor at the company."""
3232

src/finch/types/hris/individuals/employment_data.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88
from ....types import income, location
99
from ...._models import BaseModel
1010

11-
__all__ = ["EmploymentData", "Manager", "Department", "Employment"]
12-
13-
14-
class Manager(BaseModel):
15-
id: Optional[str]
16-
"""A stable Finch `id` (UUID v4) for an individual in the company."""
11+
__all__ = ["EmploymentData", "Department", "Employment", "Manager"]
1712

1813

1914
class Department(BaseModel):
@@ -33,7 +28,15 @@ class Employment(BaseModel):
3328
"""The main employment type of the individual."""
3429

3530

31+
class Manager(BaseModel):
32+
id: Optional[str]
33+
"""A stable Finch `id` (UUID v4) for an individual in the company."""
34+
35+
3636
class EmploymentData(BaseModel):
37+
id: Optional[str]
38+
"""string A stable Finch `id` (UUID v4) for an individual in the company."""
39+
3740
class_code: Optional[str]
3841
"""Worker's compensation classification code for this employee"""
3942

@@ -48,9 +51,6 @@ class EmploymentData(BaseModel):
4851
first_name: Optional[str]
4952
"""The legal first name of the individual."""
5053

51-
id: Optional[str]
52-
"""string A stable Finch `id` (UUID v4) for an individual in the company."""
53-
5454
income_history: Optional[List[Optional[income.Income]]]
5555
"""The array of income history."""
5656

src/finch/types/hris/pay_statement.py

+18-18
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ..._models import BaseModel
88
from ...types.hris import benefit_type
99

10-
__all__ = ["PayStatement", "Earning", "Tax", "EmployeeDeduction", "EmployerContribution"]
10+
__all__ = ["PayStatement", "Earning", "EmployeeDeduction", "EmployerContribution", "Tax"]
1111

1212

1313
class Earning(BaseModel):
@@ -47,23 +47,6 @@ class Earning(BaseModel):
4747
"""The type of earning."""
4848

4949

50-
class Tax(BaseModel):
51-
amount: Optional[int]
52-
"""The tax amount in cents."""
53-
54-
currency: Optional[str]
55-
"""The currency code."""
56-
57-
employer: Optional[bool]
58-
"""`true` if the amount is paid by the employers."""
59-
60-
name: Optional[str]
61-
"""The exact name of tax from the pay statement."""
62-
63-
type: Optional[Literal["state", "federal", "local", "fica"]]
64-
"""The type of taxes."""
65-
66-
6750
class EmployeeDeduction(BaseModel):
6851
amount: Optional[int]
6952
"""The deduction amount in cents."""
@@ -95,6 +78,23 @@ class EmployerContribution(BaseModel):
9578
"""Type of benefit."""
9679

9780

81+
class Tax(BaseModel):
82+
amount: Optional[int]
83+
"""The tax amount in cents."""
84+
85+
currency: Optional[str]
86+
"""The currency code."""
87+
88+
employer: Optional[bool]
89+
"""`true` if the amount is paid by the employers."""
90+
91+
name: Optional[str]
92+
"""The exact name of tax from the pay statement."""
93+
94+
type: Optional[Literal["state", "federal", "local", "fica"]]
95+
"""The type of taxes."""
96+
97+
9898
class PayStatement(BaseModel):
9999
earnings: Optional[List[Optional[Earning]]]
100100
"""The array of earnings objects associated with this pay statement"""

src/finch/types/hris/payment.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ class PayPeriod(BaseModel):
1515

1616

1717
class Payment(BaseModel):
18+
id: Optional[str]
19+
"""The unique id for the payment."""
20+
1821
company_debit: Optional[money.Money]
1922

2023
debit_date: Optional[str]
@@ -25,9 +28,6 @@ class Payment(BaseModel):
2528

2629
gross_pay: Optional[money.Money]
2730

28-
id: Optional[str]
29-
"""The unique id for the payment."""
30-
3131
individual_ids: Optional[List[str]]
3232
"""Array of every individual on this payment."""
3333

src/finch/types/provider.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99

1010
class Provider(BaseModel):
11+
id: Optional[str]
12+
"""The id of the payroll provider used in Connect."""
13+
1114
display_name: Optional[str]
1215
"""The display name of the payroll provider."""
1316

1417
icon: Optional[str]
1518
"""The url to the official icon of the payroll provider."""
1619

17-
id: Optional[str]
18-
"""The id of the payroll provider used in Connect."""
19-
2020
logo: Optional[str]
2121
"""The url to the official logo of the payroll provider."""
2222

0 commit comments

Comments
 (0)