Skip to content

style: minor reordering of types and properties #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/finch/types/ats/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class RejectedReason(BaseModel):


class Application(BaseModel):
candidate_id: str

id: str

candidate_id: str

job_id: str

offer_id: Optional[str]
Expand Down
4 changes: 2 additions & 2 deletions src/finch/types/ats/candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class PhoneNumber(BaseModel):


class Candidate(BaseModel):
id: str

application_ids: List[str]
"""Array of Finch uuids corresponding to `application`s for this individual"""

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

full_name: Optional[str]

id: str

last_activity_at: datetime

last_name: Optional[str]
Expand Down
4 changes: 2 additions & 2 deletions src/finch/types/ats/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class HiringTeam(BaseModel):


class Job(BaseModel):
id: str

closed_at: Optional[datetime]

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

hiring_team: HiringTeam

id: str

name: Optional[str]

status: Optional[Literal["open", "closed", "on_hold", "draft", "archived"]]
4 changes: 2 additions & 2 deletions src/finch/types/ats/offer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@


class Offer(BaseModel):
id: str

application_id: str

candidate_id: str

created_at: datetime

id: str

job_id: str

status: Literal[
Expand Down
50 changes: 25 additions & 25 deletions src/finch/types/hris/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,7 @@
from ...types import location
from ..._models import BaseModel

__all__ = ["Company", "Entity", "Department", "DepartmentParent", "Account"]


class Entity(BaseModel):
subtype: Optional[Literal["s_corporation", "c_corporation", "b_corporation"]]
"""The tax payer subtype of the company."""

type: Optional[Literal["llc", "corporation", "sole_proprietor", "non_profit", "partnership", "cooperative"]]
"""The tax payer type of the company."""


class DepartmentParent(BaseModel):
name: Optional[str]
"""The parent department's name."""


class Department(BaseModel):
name: Optional[str]
"""The department name."""

parent: Optional[DepartmentParent]
"""The parent department, if present."""
__all__ = ["Company", "Account", "Department", "DepartmentParent", "Entity"]


class Account(BaseModel):
Expand All @@ -50,7 +29,31 @@ class Account(BaseModel):
"""


class DepartmentParent(BaseModel):
name: Optional[str]
"""The parent department's name."""


class Department(BaseModel):
name: Optional[str]
"""The department name."""

parent: Optional[DepartmentParent]
"""The parent department, if present."""


class Entity(BaseModel):
subtype: Optional[Literal["s_corporation", "c_corporation", "b_corporation"]]
"""The tax payer subtype of the company."""

type: Optional[Literal["llc", "corporation", "sole_proprietor", "non_profit", "partnership", "cooperative"]]
"""The tax payer type of the company."""


class Company(BaseModel):
id: str
"""A stable Finch `id` (UUID v4) for the company."""

accounts: Optional[List[Account]]
"""An array of bank account objects associated with the payroll/HRIS system."""

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

id: str
"""A stable Finch `id` (UUID v4) for the company."""

legal_name: Optional[str]
"""The legal name of the company."""

Expand Down
6 changes: 3 additions & 3 deletions src/finch/types/hris/individual.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class PhoneNumber(BaseModel):


class Individual(BaseModel):
id: Optional[str]
"""A stable Finch `id` (UUID v4) for an individual in the company."""

dob: Optional[str]

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

id: Optional[str]
"""A stable Finch `id` (UUID v4) for an individual in the company."""

last_name: Optional[str]
"""The legal last name of the individual."""

Expand Down
18 changes: 9 additions & 9 deletions src/finch/types/hris/individual_in_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@

from ..._models import BaseModel

__all__ = ["IndividualInDirectory", "Manager", "Department"]


class Manager(BaseModel):
id: Optional[str]
"""A stable Finch `id` (UUID v4) for an individual in the company."""
__all__ = ["IndividualInDirectory", "Department", "Manager"]


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


class Manager(BaseModel):
id: Optional[str]
"""A stable Finch `id` (UUID v4) for an individual in the company."""


class IndividualInDirectory(BaseModel):
id: Optional[str]
"""A stable Finch id (UUID v4) for an individual in the company."""

department: Optional[Department]
"""The department object."""

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

id: Optional[str]
"""A stable Finch id (UUID v4) for an individual in the company."""

is_active: Optional[bool]
"""`true` if the individual is an active employee or contractor at the company."""

Expand Down
18 changes: 9 additions & 9 deletions src/finch/types/hris/individuals/employment_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
from ....types import income, location
from ...._models import BaseModel

__all__ = ["EmploymentData", "Manager", "Department", "Employment"]


class Manager(BaseModel):
id: Optional[str]
"""A stable Finch `id` (UUID v4) for an individual in the company."""
__all__ = ["EmploymentData", "Department", "Employment", "Manager"]


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


class Manager(BaseModel):
id: Optional[str]
"""A stable Finch `id` (UUID v4) for an individual in the company."""


class EmploymentData(BaseModel):
id: Optional[str]
"""string A stable Finch `id` (UUID v4) for an individual in the company."""

class_code: Optional[str]
"""Worker's compensation classification code for this employee"""

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

id: Optional[str]
"""string A stable Finch `id` (UUID v4) for an individual in the company."""

income_history: Optional[List[Optional[income.Income]]]
"""The array of income history."""

Expand Down
36 changes: 18 additions & 18 deletions src/finch/types/hris/pay_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ..._models import BaseModel
from ...types.hris import benefit_type

__all__ = ["PayStatement", "Earning", "Tax", "EmployeeDeduction", "EmployerContribution"]
__all__ = ["PayStatement", "Earning", "EmployeeDeduction", "EmployerContribution", "Tax"]


class Earning(BaseModel):
Expand Down Expand Up @@ -47,23 +47,6 @@ class Earning(BaseModel):
"""The type of earning."""


class Tax(BaseModel):
amount: Optional[int]
"""The tax amount in cents."""

currency: Optional[str]
"""The currency code."""

employer: Optional[bool]
"""`true` if the amount is paid by the employers."""

name: Optional[str]
"""The exact name of tax from the pay statement."""

type: Optional[Literal["state", "federal", "local", "fica"]]
"""The type of taxes."""


class EmployeeDeduction(BaseModel):
amount: Optional[int]
"""The deduction amount in cents."""
Expand Down Expand Up @@ -95,6 +78,23 @@ class EmployerContribution(BaseModel):
"""Type of benefit."""


class Tax(BaseModel):
amount: Optional[int]
"""The tax amount in cents."""

currency: Optional[str]
"""The currency code."""

employer: Optional[bool]
"""`true` if the amount is paid by the employers."""

name: Optional[str]
"""The exact name of tax from the pay statement."""

type: Optional[Literal["state", "federal", "local", "fica"]]
"""The type of taxes."""


class PayStatement(BaseModel):
earnings: Optional[List[Optional[Earning]]]
"""The array of earnings objects associated with this pay statement"""
Expand Down
6 changes: 3 additions & 3 deletions src/finch/types/hris/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class PayPeriod(BaseModel):


class Payment(BaseModel):
id: Optional[str]
"""The unique id for the payment."""

company_debit: Optional[money.Money]

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

gross_pay: Optional[money.Money]

id: Optional[str]
"""The unique id for the payment."""

individual_ids: Optional[List[str]]
"""Array of every individual on this payment."""

Expand Down
6 changes: 3 additions & 3 deletions src/finch/types/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@


class Provider(BaseModel):
id: Optional[str]
"""The id of the payroll provider used in Connect."""

display_name: Optional[str]
"""The display name of the payroll provider."""

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

id: Optional[str]
"""The id of the payroll provider used in Connect."""

logo: Optional[str]
"""The url to the official logo of the payroll provider."""

Expand Down