"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from enum import Enum
from gusto_embedded.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ContractorPaymentPaymentMethod(str, Enum):
    r"""The payment method."""

    DIRECT_DEPOSIT = "Direct Deposit"
    CHECK = "Check"
    HISTORICAL_PAYMENT = "Historical Payment"
    CORRECTION_PAYMENT = "Correction Payment"


class ContractorPaymentStatus(str, Enum):
    r"""Contractor payment status"""

    FUNDED = "Funded"
    UNFUNDED = "Unfunded"


class ContractorPaymentWageType(str, Enum):
    r"""The wage type for the payment."""

    HOURLY = "Hourly"
    FIXED = "Fixed"


class ContractorPaymentTypedDict(TypedDict):
    r"""The representation of a single contractor payment."""

    uuid: str
    r"""The unique identifier of the contractor payment in Gusto."""
    contractor_uuid: NotRequired[str]
    r"""The UUID of the contractor."""
    bonus: NotRequired[str]
    r"""The bonus amount in the payment."""
    date_: NotRequired[str]
    r"""The payment date."""
    hours: NotRequired[str]
    r"""The number of hours worked for the payment."""
    payment_method: NotRequired[ContractorPaymentPaymentMethod]
    r"""The payment method."""
    reimbursement: NotRequired[str]
    r"""The reimbursement amount in the payment."""
    status: NotRequired[ContractorPaymentStatus]
    r"""Contractor payment status"""
    hourly_rate: NotRequired[str]
    r"""The rate per hour worked for the payment."""
    may_cancel: NotRequired[bool]
    r"""Determine if the contractor payment can be cancelled."""
    wage: NotRequired[str]
    r"""The fixed wage of the payment, regardless of hours worked."""
    wage_type: NotRequired[ContractorPaymentWageType]
    r"""The wage type for the payment."""
    wage_total: NotRequired[str]
    r"""(hours * hourly_rate) + wage + bonus"""


class ContractorPayment(BaseModel):
    r"""The representation of a single contractor payment."""

    uuid: str
    r"""The unique identifier of the contractor payment in Gusto."""

    contractor_uuid: Optional[str] = None
    r"""The UUID of the contractor."""

    bonus: Optional[str] = None
    r"""The bonus amount in the payment."""

    date_: Annotated[Optional[str], pydantic.Field(alias="date")] = None
    r"""The payment date."""

    hours: Optional[str] = None
    r"""The number of hours worked for the payment."""

    payment_method: Optional[ContractorPaymentPaymentMethod] = None
    r"""The payment method."""

    reimbursement: Optional[str] = None
    r"""The reimbursement amount in the payment."""

    status: Optional[ContractorPaymentStatus] = None
    r"""Contractor payment status"""

    hourly_rate: Optional[str] = None
    r"""The rate per hour worked for the payment."""

    may_cancel: Optional[bool] = None
    r"""Determine if the contractor payment can be cancelled."""

    wage: Optional[str] = None
    r"""The fixed wage of the payment, regardless of hours worked."""

    wage_type: Optional[ContractorPaymentWageType] = None
    r"""The wage type for the payment."""

    wage_total: Optional[str] = None
    r"""(hours * hourly_rate) + wage + bonus"""
