# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .invoice_adjustment_status_enum import InvoiceAdjustmentStatusEnum


@JsonMap({"id_": "id"})
class OffCyclePaymentReportedBy(BaseModel):
    """OffCyclePaymentReportedBy

    :param id_: Unique identifier of this resource.
    :type id_: str
    :param full_name: Full name of the creator.
    :type full_name: str
    """

    def __init__(self, id_: str, full_name: str):
        self.id_ = id_
        self.full_name = full_name


@JsonMap({"id_": "id"})
class OffCyclePayment(BaseModel):
    """OffCyclePayment

    :param id_: Unique identifier of this resource.
    :type id_: str
    :param status: status of invoice adjustment
    :type status: InvoiceAdjustmentStatusEnum
    :param description: Description of the off-cycle payment entry.
    :type description: str
    :param date_submitted: Long date-time format following ISO-8601
    :type date_submitted: str
    :param currency_code: currency_code
    :type currency_code: str
    :param amount: Amount of off-cycle payment.
    :type amount: str
    :param created_at: Long date-time format following ISO-8601
    :type created_at: str
    :param reported_by: reported_by
    :type reported_by: OffCyclePaymentReportedBy
    """

    def __init__(
        self,
        id_: str,
        status: InvoiceAdjustmentStatusEnum,
        description: str,
        date_submitted: str,
        currency_code: str,
        amount: str,
        created_at: str,
        reported_by: OffCyclePaymentReportedBy,
    ):
        self.id_ = id_
        self.status = self._enum_matching(
            status, InvoiceAdjustmentStatusEnum.list(), "status"
        )
        self.description = description
        self.date_submitted = date_submitted
        self.currency_code = self._pattern_matching(
            currency_code, "^[A-Z]{3}$", "currency_code"
        )
        self.amount = amount
        self.created_at = created_at
        self.reported_by = self._define_object(reported_by, OffCyclePaymentReportedBy)
