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

from __future__ import annotations
from enum import Enum
from gusto_app_integration.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


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

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


class ContractorPaymentForGroupStatus(str, Enum):
    r"""The status of the contractor payment.  Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`."""

    FUNDED = "Funded"
    UNFUNDED = "Unfunded"


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

    HOURLY = "Hourly"
    FIXED = "Fixed"


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

    uuid: NotRequired[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."""
    hours: NotRequired[str]
    r"""The number of hours worked for the payment."""
    payment_method: NotRequired[ContractorPaymentForGroupPaymentMethod]
    r"""The payment method."""
    reimbursement: NotRequired[str]
    r"""The reimbursement amount in the payment."""
    status: NotRequired[ContractorPaymentForGroupStatus]
    r"""The status of the contractor payment.  Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`."""
    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[ContractorPaymentForGroupWageType]
    r"""The wage type for the payment."""
    wage_total: NotRequired[str]
    r"""(hours * hourly_rate) + wage + bonus"""


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

    uuid: Optional[str] = None
    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."""

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

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

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

    status: Optional[ContractorPaymentForGroupStatus] = None
    r"""The status of the contractor payment.  Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`."""

    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[ContractorPaymentForGroupWageType] = None
    r"""The wage type for the payment."""

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