1
1
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
3
- from typing import List , Optional
4
- from typing_extensions import Literal
3
+ from typing import List , Union , Optional
4
+ from typing_extensions import Literal , TypeAlias
5
5
6
6
from ..income import Income
7
7
from ..._models import BaseModel
8
8
from ..location import Location
9
9
10
- __all__ = ["EmploymentData" , "CustomField" , "Department" , "Employment" , "Manager" ]
10
+ __all__ = [
11
+ "EmploymentData" ,
12
+ "UnionMember0" ,
13
+ "UnionMember0CustomField" ,
14
+ "UnionMember0Department" ,
15
+ "UnionMember0Employment" ,
16
+ "UnionMember0Manager" ,
17
+ "BatchError" ,
18
+ ]
11
19
12
20
13
- class CustomField (BaseModel ):
21
+ class UnionMember0CustomField (BaseModel ):
14
22
name : Optional [str ] = None
15
23
16
- value : Optional [ object ] = None
24
+ value : Union [ str , List [ object ], float , bool , object , None ] = None
17
25
18
26
19
- class Department (BaseModel ):
27
+ class UnionMember0Department (BaseModel ):
20
28
name : Optional [str ] = None
21
29
"""The name of the department associated with the individual."""
22
30
23
31
24
- class Employment (BaseModel ):
32
+ class UnionMember0Employment (BaseModel ):
25
33
subtype : Optional [Literal ["full_time" , "intern" , "part_time" , "temp" , "seasonal" , "individual_contractor" ]] = None
26
34
"""The secondary employment type of the individual.
27
35
@@ -33,28 +41,28 @@ class Employment(BaseModel):
33
41
"""The main employment type of the individual."""
34
42
35
43
36
- class Manager (BaseModel ):
37
- id : Optional [ str ] = None
44
+ class UnionMember0Manager (BaseModel ):
45
+ id : str
38
46
"""A stable Finch `id` (UUID v4) for an individual in the company."""
39
47
40
48
41
- class EmploymentData (BaseModel ):
42
- id : Optional [ str ] = None
49
+ class UnionMember0 (BaseModel ):
50
+ id : str
43
51
"""A stable Finch `id` (UUID v4) for an individual in the company."""
44
52
45
53
class_code : Optional [str ] = None
46
54
"""Worker's compensation classification code for this employee"""
47
55
48
- custom_fields : Optional [List [CustomField ]] = None
56
+ custom_fields : Optional [List [UnionMember0CustomField ]] = None
49
57
"""Custom fields for the individual.
50
58
51
59
These are fields which are defined by the employer in the system.
52
60
"""
53
61
54
- department : Optional [Department ] = None
62
+ department : Optional [UnionMember0Department ] = None
55
63
"""The department object."""
56
64
57
- employment : Optional [Employment ] = None
65
+ employment : Optional [UnionMember0Employment ] = None
58
66
"""The employment object."""
59
67
60
68
employment_status : Optional [
@@ -71,16 +79,6 @@ class EmploymentData(BaseModel):
71
79
first_name : Optional [str ] = None
72
80
"""The legal first name of the individual."""
73
81
74
- income_history : Optional [List [Optional [Income ]]] = None
75
- """The array of income history."""
76
-
77
- income : Optional [Income ] = None
78
- """The employee's income as reported by the provider.
79
-
80
- This may not always be annualized income, but may be in units of bi-weekly,
81
- semi-monthly, daily, etc, depending on what information the provider returns.
82
- """
83
-
84
82
is_active : Optional [bool ] = None
85
83
"""`true` if the individual an an active employee or contractor at the company."""
86
84
@@ -91,7 +89,7 @@ class EmploymentData(BaseModel):
91
89
92
90
location : Optional [Location ] = None
93
91
94
- manager : Optional [Manager ] = None
92
+ manager : Optional [UnionMember0Manager ] = None
95
93
"""The manager object representing the manager of the individual within the org."""
96
94
97
95
middle_name : Optional [str ] = None
@@ -107,3 +105,26 @@ class EmploymentData(BaseModel):
107
105
108
106
work_id : Optional [str ] = None
109
107
"""This field is deprecated in favour of `source_id`"""
108
+
109
+ income_history : Optional [List [Optional [Income ]]] = None
110
+ """The array of income history."""
111
+
112
+ income : Optional [Income ] = None
113
+ """The employee's income as reported by the provider.
114
+
115
+ This may not always be annualized income, but may be in units of bi-weekly,
116
+ semi-monthly, daily, etc, depending on what information the provider returns.
117
+ """
118
+
119
+
120
+ class BatchError (BaseModel ):
121
+ code : float
122
+
123
+ message : str
124
+
125
+ name : str
126
+
127
+ finch_code : Optional [str ] = None
128
+
129
+
130
+ EmploymentData : TypeAlias = Union [UnionMember0 , BatchError ]
0 commit comments