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 List , Union , Optional
4+ from typing_extensions import Literal , TypeAlias
55
66from ..income import Income
77from ..._models import BaseModel
88from ..location import Location
99
10- __all__ = ["EmploymentData" , "CustomField" , "Department" , "Employment" , "Manager" ]
10+ __all__ = [
11+ "EmploymentData" ,
12+ "UnionMember0" ,
13+ "UnionMember0CustomField" ,
14+ "UnionMember0Department" ,
15+ "UnionMember0Employment" ,
16+ "UnionMember0Manager" ,
17+ "BatchError" ,
18+ ]
1119
1220
13- class CustomField (BaseModel ):
21+ class UnionMember0CustomField (BaseModel ):
1422 name : Optional [str ] = None
1523
16- value : Optional [ object ] = None
24+ value : Union [ str , List [ object ], float , bool , object , None ] = None
1725
1826
19- class Department (BaseModel ):
27+ class UnionMember0Department (BaseModel ):
2028 name : Optional [str ] = None
2129 """The name of the department associated with the individual."""
2230
2331
24- class Employment (BaseModel ):
32+ class UnionMember0Employment (BaseModel ):
2533 subtype : Optional [Literal ["full_time" , "intern" , "part_time" , "temp" , "seasonal" , "individual_contractor" ]] = None
2634 """The secondary employment type of the individual.
2735
@@ -33,28 +41,28 @@ class Employment(BaseModel):
3341 """The main employment type of the individual."""
3442
3543
36- class Manager (BaseModel ):
37- id : Optional [ str ] = None
44+ class UnionMember0Manager (BaseModel ):
45+ id : str
3846 """A stable Finch `id` (UUID v4) for an individual in the company."""
3947
4048
41- class EmploymentData (BaseModel ):
42- id : Optional [ str ] = None
49+ class UnionMember0 (BaseModel ):
50+ id : str
4351 """A stable Finch `id` (UUID v4) for an individual in the company."""
4452
4553 class_code : Optional [str ] = None
4654 """Worker's compensation classification code for this employee"""
4755
48- custom_fields : Optional [List [CustomField ]] = None
56+ custom_fields : Optional [List [UnionMember0CustomField ]] = None
4957 """Custom fields for the individual.
5058
5159 These are fields which are defined by the employer in the system.
5260 """
5361
54- department : Optional [Department ] = None
62+ department : Optional [UnionMember0Department ] = None
5563 """The department object."""
5664
57- employment : Optional [Employment ] = None
65+ employment : Optional [UnionMember0Employment ] = None
5866 """The employment object."""
5967
6068 employment_status : Optional [
@@ -71,16 +79,6 @@ class EmploymentData(BaseModel):
7179 first_name : Optional [str ] = None
7280 """The legal first name of the individual."""
7381
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-
8482 is_active : Optional [bool ] = None
8583 """`true` if the individual an an active employee or contractor at the company."""
8684
@@ -91,7 +89,7 @@ class EmploymentData(BaseModel):
9189
9290 location : Optional [Location ] = None
9391
94- manager : Optional [Manager ] = None
92+ manager : Optional [UnionMember0Manager ] = None
9593 """The manager object representing the manager of the individual within the org."""
9694
9795 middle_name : Optional [str ] = None
@@ -107,3 +105,26 @@ class EmploymentData(BaseModel):
107105
108106 work_id : Optional [str ] = None
109107 """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