|
| 1 | +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | + |
| 3 | +from typing import Dict, List, Optional |
| 4 | +from typing_extensions import Literal |
| 5 | + |
| 6 | +from ..money import Money |
| 7 | +from ..._models import BaseModel |
| 8 | +from .benefit_type import BenefitType |
| 9 | + |
| 10 | +__all__ = [ |
| 11 | + "PayStatement", |
| 12 | + "Earning", |
| 13 | + "EarningAttributes", |
| 14 | + "EarningAttributesMetadata", |
| 15 | + "EmployeeDeduction", |
| 16 | + "EmployeeDeductionAttributes", |
| 17 | + "EmployeeDeductionAttributesMetadata", |
| 18 | + "EmployerContribution", |
| 19 | + "EmployerContributionAttributes", |
| 20 | + "EmployerContributionAttributesMetadata", |
| 21 | + "Tax", |
| 22 | + "TaxAttributes", |
| 23 | + "TaxAttributesMetadata", |
| 24 | +] |
| 25 | + |
| 26 | + |
| 27 | +class EarningAttributesMetadata(BaseModel): |
| 28 | + metadata: Dict[str, Optional[object]] |
| 29 | + """The metadata to be attached to the entity by existing rules. |
| 30 | +
|
| 31 | + It is a key-value pairs where the values can be of any type (string, number, |
| 32 | + boolean, object, array, etc.). |
| 33 | + """ |
| 34 | + |
| 35 | + |
| 36 | +class EarningAttributes(BaseModel): |
| 37 | + metadata: EarningAttributesMetadata |
| 38 | + |
| 39 | + |
| 40 | +class Earning(BaseModel): |
| 41 | + amount: Optional[int] = None |
| 42 | + """The earnings amount in cents.""" |
| 43 | + |
| 44 | + currency: Optional[str] = None |
| 45 | + """The earnings currency code.""" |
| 46 | + |
| 47 | + hours: Optional[float] = None |
| 48 | + """The number of hours associated with this earning. |
| 49 | +
|
| 50 | + (For salaried employees, this could be hours per pay period, `0` or `null`, |
| 51 | + depending on the provider). |
| 52 | + """ |
| 53 | + |
| 54 | + name: Optional[str] = None |
| 55 | + """The exact name of the deduction from the pay statement.""" |
| 56 | + |
| 57 | + type: Optional[ |
| 58 | + Literal[ |
| 59 | + "salary", |
| 60 | + "wage", |
| 61 | + "reimbursement", |
| 62 | + "overtime", |
| 63 | + "severance", |
| 64 | + "double_overtime", |
| 65 | + "pto", |
| 66 | + "sick", |
| 67 | + "bonus", |
| 68 | + "commission", |
| 69 | + "tips", |
| 70 | + "1099", |
| 71 | + "other", |
| 72 | + ] |
| 73 | + ] = None |
| 74 | + """The type of earning.""" |
| 75 | + |
| 76 | + attributes: Optional[EarningAttributes] = None |
| 77 | + |
| 78 | + |
| 79 | +class EmployeeDeductionAttributesMetadata(BaseModel): |
| 80 | + metadata: Dict[str, Optional[object]] |
| 81 | + """The metadata to be attached to the entity by existing rules. |
| 82 | +
|
| 83 | + It is a key-value pairs where the values can be of any type (string, number, |
| 84 | + boolean, object, array, etc.). |
| 85 | + """ |
| 86 | + |
| 87 | + |
| 88 | +class EmployeeDeductionAttributes(BaseModel): |
| 89 | + metadata: EmployeeDeductionAttributesMetadata |
| 90 | + |
| 91 | + |
| 92 | +class EmployeeDeduction(BaseModel): |
| 93 | + amount: Optional[int] = None |
| 94 | + """The deduction amount in cents.""" |
| 95 | + |
| 96 | + currency: Optional[str] = None |
| 97 | + """The deduction currency.""" |
| 98 | + |
| 99 | + name: Optional[str] = None |
| 100 | + """The deduction name from the pay statement.""" |
| 101 | + |
| 102 | + pre_tax: Optional[bool] = None |
| 103 | + """Boolean indicating if the deduction is pre-tax.""" |
| 104 | + |
| 105 | + type: Optional[BenefitType] = None |
| 106 | + """Type of benefit.""" |
| 107 | + |
| 108 | + attributes: Optional[EmployeeDeductionAttributes] = None |
| 109 | + |
| 110 | + |
| 111 | +class EmployerContributionAttributesMetadata(BaseModel): |
| 112 | + metadata: Dict[str, Optional[object]] |
| 113 | + """The metadata to be attached to the entity by existing rules. |
| 114 | +
|
| 115 | + It is a key-value pairs where the values can be of any type (string, number, |
| 116 | + boolean, object, array, etc.). |
| 117 | + """ |
| 118 | + |
| 119 | + |
| 120 | +class EmployerContributionAttributes(BaseModel): |
| 121 | + metadata: EmployerContributionAttributesMetadata |
| 122 | + |
| 123 | + |
| 124 | +class EmployerContribution(BaseModel): |
| 125 | + currency: Optional[str] = None |
| 126 | + """The contribution currency.""" |
| 127 | + |
| 128 | + name: Optional[str] = None |
| 129 | + """The contribution name from the pay statement.""" |
| 130 | + |
| 131 | + type: Optional[BenefitType] = None |
| 132 | + """Type of benefit.""" |
| 133 | + |
| 134 | + amount: Optional[int] = None |
| 135 | + """The contribution amount in cents.""" |
| 136 | + |
| 137 | + attributes: Optional[EmployerContributionAttributes] = None |
| 138 | + |
| 139 | + |
| 140 | +class TaxAttributesMetadata(BaseModel): |
| 141 | + metadata: Dict[str, Optional[object]] |
| 142 | + """The metadata to be attached to the entity by existing rules. |
| 143 | +
|
| 144 | + It is a key-value pairs where the values can be of any type (string, number, |
| 145 | + boolean, object, array, etc.). |
| 146 | + """ |
| 147 | + |
| 148 | + |
| 149 | +class TaxAttributes(BaseModel): |
| 150 | + metadata: TaxAttributesMetadata |
| 151 | + |
| 152 | + |
| 153 | +class Tax(BaseModel): |
| 154 | + currency: Optional[str] = None |
| 155 | + """The currency code.""" |
| 156 | + |
| 157 | + employer: Optional[bool] = None |
| 158 | + """`true` if the amount is paid by the employers.""" |
| 159 | + |
| 160 | + name: Optional[str] = None |
| 161 | + """The exact name of tax from the pay statement.""" |
| 162 | + |
| 163 | + type: Optional[Literal["state", "federal", "local", "fica"]] = None |
| 164 | + """The type of taxes.""" |
| 165 | + |
| 166 | + amount: Optional[int] = None |
| 167 | + """The tax amount in cents.""" |
| 168 | + |
| 169 | + attributes: Optional[TaxAttributes] = None |
| 170 | + |
| 171 | + |
| 172 | +class PayStatement(BaseModel): |
| 173 | + earnings: Optional[List[Optional[Earning]]] = None |
| 174 | + """The array of earnings objects associated with this pay statement""" |
| 175 | + |
| 176 | + employee_deductions: Optional[List[Optional[EmployeeDeduction]]] = None |
| 177 | + """The array of deductions objects associated with this pay statement.""" |
| 178 | + |
| 179 | + employer_contributions: Optional[List[Optional[EmployerContribution]]] = None |
| 180 | + |
| 181 | + gross_pay: Optional[Money] = None |
| 182 | + |
| 183 | + individual_id: str |
| 184 | + """A stable Finch `id` (UUID v4) for an individual in the company""" |
| 185 | + |
| 186 | + net_pay: Optional[Money] = None |
| 187 | + |
| 188 | + payment_method: Optional[Literal["check", "direct_deposit", "other"]] = None |
| 189 | + """The payment method.""" |
| 190 | + |
| 191 | + taxes: Optional[List[Optional[Tax]]] = None |
| 192 | + """The array of taxes objects associated with this pay statement.""" |
| 193 | + |
| 194 | + total_hours: Optional[float] = None |
| 195 | + """The number of hours worked for this pay period""" |
| 196 | + |
| 197 | + type: Optional[Literal["off_cycle_payroll", "one_time_payment", "regular_payroll"]] = None |
| 198 | + """The type of the payment associated with the pay statement.""" |
0 commit comments