
    ii4                     R   d dl m Z  d dlmZmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d dlmZmZ d d	lmZmZmZmZmZ d d
lmZ d dlmZ d dlmZ d dlmZ d dl m!Z!m"Z" d dl#m$Z$ d dl%m&Z&  G d de$      Z' G d de$      Z( G d de$      Z) G d de)      Z* G d de)      Z+y)    )datetime)ListOptionalDict)CustomerContactSchema)CustomerListSchema)FileResponseSchema)MerchantSchema)PaymentMethodSchema)InvoiceStatusTypesPaymentMethodTypes)PaymentAuthorizationTypesPaymentFrequenciesPaymentRequestStatusTypesPaymentCurrenciesSurchargeTypes)PaymentRequestAdjustmentsSchema)RecurringPaymentRequestSchema)SplitPaymentRequestSchema)PaymentRequestCustomersSchema)Field
ConfigDict)
BaseSchema)InvoiceAdjustmentsSchemac                   N   e Zd ZU  ed      Z ed      Zeed<    edd      Z	e
e   ed	<    edd
      Ze
e   ed<    ed      Zeed<    edd      Zeed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<   y)#InvoicePaymentRequestLineItemSchemaTfrom_attributeszId of Line item resourcedescriptionidNzName or title of line itemdefaultr    titlezDescription of line itemr    zPrice of line item
unit_price   zQuantity of line itemquantityzTax amount of the producttaxzProduct id of the line items
product_idz
Cost valuecostzUpcharge valueupcharge)__name__
__module____qualname__r   model_configr   r!   int__annotations__r$   r   strr    r%   floatr'   r(   r)   r*   r+        f/var/www/html/hwPaymentPortal-be-dev/hw-payment-portal-api/src/apps/invoices/schemas/invoice_common.pyr   r   &   s    d3L :;B; ;WXE8C=X!&tA[!\K#\*>?J?!1HIHcI ;VWC%W %d@^ _J_!$LID(5/I %d@P QHhuoQr5   r   c                      e Zd ZU  ed      Z ed      Zeed<    edd      Z	e
e   ed	<    edd
      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
ee      ed<    edd       Z e
ee!      ed!<    edd"      Z"e
e   ed#<    edd$      Z#e
e   ed%<    edd&      Z$e
e   ed'<    edd(      Z%e
e   ed)<    edd*      Z&e
e   ed+<    edd,      Z'e
e   ed-<    edd.      Z(e
e   ed/<    edd0      Z)e
e   ed1<    edd2      Z*e
e   ed3<    edd4      Z+e
e   ed5<    edd6      Z,e
ee-      ed7<    edd6      Z.e
e/   ed8<    ed9      Z0e1ed:<    edd;      Z2e
ee3      ed<<   y)=InvoicePaymentRequestSchemaTr   zId of PaymentRequest resourcer   r!   Nz/Amount of PaymentRequest, accepts decimal inputr"   amountz4Frequency of payment, (Split / Recurring / One-time)payment_frequencyzKPaymentRequest authorisation type, (Pre-Authorized / Request-Authorization)authorization_typez)Preferred payment method, (Cards/ACH/etc)payment_method2Human readable text for the invoice status integertax_type_textz0Status of payment request, (Pending/Cleared/etc)statusz8Indicates if the chosen payment method needs to be savedsave_payment_methodzEnables tipping	allow_tipz7Denotes if the payment request can be configured or notconfigure_adjustmentzpayment request Adjustmentpayment_request_adjustmentzAdditional message or commentsmessagez+Attachments included in the payment requestattachmentsz4List of payment methods used in this payment requestpayment_methodszThird party reference idreference_id0Is this payment request editable by the merchantcan_editzkPayment Request Literal, just a simple 9 digit code to identify the payment request in a human readable waypayment_request_literalz>Unique id of payment request, typically has the form 'pr_xxx' payment_request_idz%Shipping fees for the billable items.shipping_feez#Required billing address in paymentrequire_billing_addressz%Required SMS Authorization in paymentrequire_sms_authorizationz$Required shipping address in paymentrequire_shipping_addressz+Required Signature Authorization in paymentrequire_signature_authorizationzRequired cvv in paymentrequire_cvvz#Split config of the payment requestsplit_configrecurring_configz-Three-letter ISO currency code, in lowercase.currencyz)Customers included in the payment requestpayment_request_customers)4r,   r-   r.   r   r/   r   r!   r0   r1   r9   r   r3   r:   r   r;   r   r<   r   r>   r2   r?   r   r@   boolrA   rB   rC   r   rD   rE   r   r	   rF   r   rG   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   r   rS   r   rT   r   rU   r   r4   r5   r6   r8   r8   4   sJ   d3L ?@B@#EFHUO  7<J7x 23  ?Da?!:;  49?4NH/0  $)H$M8C=  38F3FH./  +0N+$  !&d@Q RIx~R+0M,(4.  MR0M)H I  #4=]^GXc]^6;A7K$123  <AJ<OXd#678  #(B\"]L(3-]$F Hhtn  .3 B.Xc]  ).T)  %*;%L(5/  /49/Xd^  16;1x~  05:0htn  7<A7#Xd^  #(B["\K$\>C9?L(4 9:;  AF9Ah<=  #(C#H  PU?Px-J(KL r5   r8   c                   z   e Zd ZU  ed      Z edd      Zeed<    edd	      Z	e
e   ed
<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd	      Ze
e   ed<    edd 	      Ze
e   ed!<    edd"	      Ze
e   ed#<    edd$	      Ze
e   ed%<    edd&	      Ze
e   ed'<    edd(	      Z e
e!   ed)<    edd*	      Z"e
e   ed+<    edd,	      Z#e
e   ed-<    edd.	      Z$e
e   ed/<    edd0	      Z%e
e&   ed1<    edd2	      Z'e
e(   ed3<    edd4	      Z)e
e&   ed5<   y)6InvoiceBaseTr   zInvoice due amount valuer   )r    r#   r9   NzInvoice paid amount valuer"   paid_amountz$Paid date and time as unix timestamp	paid_datez#Due date and time as unix timestampdue_datez'Billing date and time as unix timestampbilling_datezPNext due date and time as unix timestamp, only applicable for recurring paymentsnext_due_dateg        zTax fees, if applicabletax_feezShipping fees, if applicablerL   zAdditional fees, if applicableadditional_feetipchargezInvoice statusr?   zInvoice commentscommentszInvoice reference	referencezRInvoice unique ID. Do not use this for create or update. This an autgenrated field
invoice_idzMerchant of this InvoicemerchantCustomer of this InvoicecustomerzPayment Request of this Invoicepayment_requestz'Created date and time as unix timestamp
created_atz'Updated date and time as unix timestamp
updated_atz'Deleted date and time as unix timestamp
deleted_at%Surcharge enabled for cost adjustmentis_surcharge_enabled"Surcharge type inclusive/exclusivesurcharge_typezIs following invoice	following)*r,   r-   r.   r   r/   r   r9   r3   r1   rY   r   rZ   r   r[   r\   r]   r^   r0   rL   r_   r`   ra   r?   r   rb   r2   rc   rd   re   r
   rg   r   rh   r8   ri   rj   rk   rm   rV   ro   r   rp   r4   r5   r6   rX   rX      s   d3L&@!LFEL#(C^#_K%_$):%Ix!  $)9$Hhx   (-=(L(8$  ).f)M8H%  #3<UVGXc]V"'!?#L(3-  %*!A%NHSM  s8QRC#R!#;TUFHSMU+0K[+\FH'(\#D>PQHhsmQ$T?RSIx}S %h!J  */tIc)dHh~&d-2..Hh)*  >C5>OX9:  &+=&J"  &+=&J"  &+=&J"  ,1;,(4.  0580NH^,  !&d@V WIx~Wr5   rX   c                      e Zd ZU  ed      Z ed      Zeed<    edd      Z	e
e   ed	<    edd
      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
ee      ed<    edd      Ze
ee      ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd       Ze
e   ed!<    edd"      Z e
e   ed#<    edd$      Z!e
e   ed%<    edd&      Z"e
e   ed'<    edd(      Z#e
e$   ed)<   y)*InvoiceSchemaTr   Id of Invoice resourcer   r!   N[Invoice Literal, just a simple 9 digit code to identify the invoice in a human readable wayr"   invoice_literalDownload url of the invoicedownload_urlPayment url of the invoicepayment_urlr=   status_textrH   rI   Payment Adjustmentpayment_adjustmentzInvoice Adjustment
adjustmentLine items of this invoice
line_itemsAConnected product details list used for printing the packing slipproduct_detailsPayer of this invoicepayerApprover of this invoiceapproverTotal discount of the invoicetotal_discount surcharge details of the invoicesurcharge_final_amountDay until due invoicedays_until_dueTotal due amount
due_amountrl   rm   rn   ro   )%r,   r-   r.   r   r/   r   r!   r0   r1   ru   r   r2   rw   ry   rz   rI   rV   r|   r   r}   r   r   r   r   r   r   r   r   r   r   r3   r   r   r   rm   ro   r   r4   r5   r6   rr   rr      s   d3L 89B9%*q&OXc]  #(B_"`L(3-`!&tA]!^K#^!&H"K#   %F Hhtn  EJ(E!@A  6;(6J12  GL0GJABC  -2W-OXd4j)  .34Md-eE8)*e05.1Hh,-  ',DFe&fNHUOf.36/HUO  %*$D[$\NHSM\ %d@R SJS+0;,(4.  0580NH^, r5   rr   c                   d   e Zd ZU  ed      Z ed      Zeed<    edd      Z	e
e   ed	<    edd
      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
ee      ed<    edd      Ze
ee      ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd      Ze
e   ed<    edd       Ze
e   ed!<    edd"      Z e
e   ed#<    edd$      Z!e
e   ed%<   y)&InvoiceListSchemaTr   rs   r   r!   Nrt   r"   ru   rv   rw   rx   ry   r=   rz   rH   rI   r{   r|   rf   rg   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )"r,   r-   r.   r   r/   r   r!   r0   r1   ru   r   r2   rw   ry   rz   rI   rV   r|   r   rg   r   r   r   r   r   r   r   r   r   r   r3   r   r   r   r4   r5   r6   r   r     s   d3L 89B9%*q&OXc]  #(B_"`L(3-`!&tA]!^K#^!&H"K#   %F Hhtn  EJ(E!@A  .3..Hh)*  GL0GJABC  -2W-OXd4j)  .34Md-eE8)*e05.1Hh,-  ',DFe&fNHUOf.36/HUO  %*$D[$\NHSM\ %d@R SJSr5   r   N),r   typingr   r   r   +src.apps.customers.schemas.customer_contactr   *src.apps.customers.schemas.customer_commonr   "src.apps.files.schemas.file_commonr	   *src.apps.merchants.schemas.merchant_commonr
   0src.apps.payment_requests.schemas.payment_methodr   src.core.utils.enumsr   r   src.apps.payment_requests.enumsr   r   r   r   r   <src.apps.payment_requests.schemas.payment_request_adjustmentr   ;src.apps.payment_requests.schemas.recurring_payment_requestr   7src.apps.payment_requests.schemas.split_payment_requestr   :src.apps.payment_requests.schemas.payment_request_customerr   pydanticr   r   src.apps.base.schemas.commonr   ,src.apps.invoices.schemas.invoice_adjustmentr   r   r8   rX   rr   r   r4   r5   r6   <module>r      s     ' ' J A E P  ' 3 QR* Rb* bLBX* BXJ5K 5p-T -Tr5   