sdk/oapiSdk/lark_oapi/api/payroll/v1/model/payment_detail.py

44 lines
1.4 KiB
Python

# Code generated by Lark OpenAPI.
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .payment_accounting_item import PaymentAccountingItem
class PaymentDetail(object):
_types = {
"employee_id": str,
"activity_id": int,
"payment_accounting_items": List[PaymentAccountingItem],
}
def __init__(self, d=None):
self.employee_id: Optional[str] = None
self.activity_id: Optional[int] = None
self.payment_accounting_items: Optional[List[PaymentAccountingItem]] = None
init(self, d, self._types)
@staticmethod
def builder() -> "PaymentDetailBuilder":
return PaymentDetailBuilder()
class PaymentDetailBuilder(object):
def __init__(self) -> None:
self._payment_detail = PaymentDetail()
def employee_id(self, employee_id: str) -> "PaymentDetailBuilder":
self._payment_detail.employee_id = employee_id
return self
def activity_id(self, activity_id: int) -> "PaymentDetailBuilder":
self._payment_detail.activity_id = activity_id
return self
def payment_accounting_items(self, payment_accounting_items: List[PaymentAccountingItem]) -> "PaymentDetailBuilder":
self._payment_detail.payment_accounting_items = payment_accounting_items
return self
def build(self) -> "PaymentDetail":
return self._payment_detail