
    k)i/                        d dl m Z  d dlmZmZmZ d dl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 d d
lmZmZ d dlmZmZmZmZmZmZ d dl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*  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/ G d de/      Z0 G d d e      Z1y!)"    )datetime)ListOptionalDict)Field
ConfigDict)PaymentRequestProductSchema)PaymentRequestCustomersSchema)FileResponseSchema)TransactionSchema)UserResponseSchema)MerchantSchema)PaymentMethodTypesPaymentTypes)PaymentAuthorizationTypesPaymentCurrenciesPaymentFrequenciesPaymentRequestStatusTypesDiscountTypesSurchargeTypes)
BaseSchemaAddressSchema   )PaymentMethodSchema)RecurringPaymentRequestSchema)SplitPaymentRequestSchema)InvoiceSchema)PaymentRequestAdjustmentsSchemac                      e Zd ZU  ed      Z 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<    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) PaymentRequestLineItemBaseTfrom_attributesNzName or title of line itemdefaultdescriptiontitlezDescription of line itemr%   zPrice of line itemr%   
unit_pricer   zQuantity of line itemquantityzTax amount of the producttaxzDisplay order of this line itemdisplay_orderzProduct id of the line items
product_id        zTax amount of the line items
tax_amountz)Discount amount/percentage for line itemsdiscountzDiscount type of the line itemsdiscount_typezCost amount for line itemscostzUpcharge amount for line itemsupcharge)__name__
__module____qualname__r   model_configr   r&   r   str__annotations__r%   r(   floatr)   intr*   r+   r,   r.   r/   r0   r   r1   r2        v/var/www/html/hwPaymentPortal-be-dev/hw-payment-portal-api/src/apps/payment_requests/schemas/payment_request_common.pyr    r    $   s    d3L ;WXE8C=X!&tA[!\K#\*>?J?!1HIHcI ;VWC%W#(Cd#eM8C=e %d@^ _J_"'2#J  !&?!Hhuo  .35.M8M*  "$<XYD(5/Y %d@` aHhuoar<   r    c                   <    e Zd ZU  ed      Z ed      Zeed<   y)PaymentRequestLineItemSchemaTr!   zId of Line Item resourcer'   idN)	r3   r4   r5   r   r6   r   r@   r:   r8   r;   r<   r=   r?   r?   >   s    d3L :;B;r<   r?   c                   D    e Zd ZU  ed      Z edd      Zee   e	d<   y)PaymentRequestLineItemCreateTr!   NTax it of the line itemsr#   tax_id)
r3   r4   r5   r   r6   r   rD   r   r7   r8   r;   r<   r=   rB   rB   D   s"    d3L!$<VWFHSMWr<   rB   c                   h    e Zd ZU  ed      Z edd      Zee   e	d<    edd      Z
ee   e	d<   y)	PaymentRequestLineItemUpdateTr!   NrC   r#   rD   zID of the line item	object_id)r3   r4   r5   r   r6   r   rD   r   r7   r8   rG   r:   r;   r<   r=   rF   rF   J   s8    d3L!$<VWFHSMW$T?TUIx}Ur<   rF   c                   `   e Zd ZU  ed      Z 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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	d0<    edd1      Z!ee   e	d2<    edd3      Z"ee   e	d4<    edd5      Z#ee   e	d6<   y)7PaymentRequestBaseTr!   r   z/Amount of PaymentRequest, accepts decimal inputr#   amountNz4Frequency of payment, (Split / Recurring / One-time)payment_frequencyzKPaymentRequest authorisation type, (Pre-Authorized / Request-Authorization)authorization_typezPayment Split Frequencypayment_split_frequencyzInvoice reference	referencei z%Shipping fees for the billable items.)r$   geler%   shipping_feezEnables tipping	allow_tipz Is payer authorization obtained?is_certifiedz7Denotes if the payment request can be configured or notconfigure_adjustmentzAdditional message or commentsmessagez Brief description of the paymentr%   r-   zTax percentage, if applicabletax_percentz#Required billing address in paymentrequire_billing_addressz%Required SMS Authorization in paymentrequire_sms_authorizationzRequired cvv in paymentrequire_cvvz$Required shipping address in paymentrequire_shipping_addressz+Required Signature Authorization in paymentrequire_signature_authorizationPIf true, the customer would receive email notifications for this payment requestenable_emailNIf true, the customer would receive sms notifications for this payment request
enable_smsz[If true, the customer would receive email notifications on success for this payment requestenable_email_receiptzYIf true, the customer would receive sms notifications on success for this payment requestenable_sms_receiptzTax typetax_typez,Invoice Term as a whole HTML string for Pdfsinvoice_terms)$r3   r4   r5   r   r6   r   rJ   r   r9   r8   rK   r   rL   r   rM   r7   rN   rQ   rR   boolrS   rT   rU   r%   rV   rW   rX   rY   rZ   r[   r]   r_   r`   ra   rb   rc   r;   r<   r=   rI   rI   R   s   d3L#EFHUO  7<J7x 23  ?Da?!:;  .3-.Xc]   %T?RSIx}S$);	%L(5/  !&d@Q RIx~R#(Ce#fL(4.f+0M,(4.  #4=]^GXc]^!&tAc!dK#d#(3$K%  /49/Xd^  16;1x~  #(B["\K$\/4:0htn  7<A7#Xd^  $)f$L(4.  "'d"J  ,1q,(4.  */o*  $DjIHhsmI#(Cq#rM8C=rr<   rI   c                   t   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      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      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$      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,      ed-<    edd.      Z-e
e   ed/<    edd0      Z.e
ee/      ed1<    edd2      Z0e
ee1      ed3<    edd4      Z2e
e   ed5<    edd6      Z3e
e4   ed7<    edd8      Z5e
e4   ed9<    edd:      Z6e
e   ed;<    edd<      Z7e
e4   ed=<    edd>      Z8e
e4   ed?<    edd@      Z9e
e4   edA<    eddB      Z:e
e   edC<    eddD      Z;e
e   edE<    eddF      Z<e
e=   edG<    eddH      Z>e
e   edI<    eddJ      Z?e
e4   edK<    eddL      Z@e
eA   edM<    eddN      ZBe
eC   edO<   y)PPaymentRequestSchemaTr!   zId of PaymentRequest resourcer'   r@   NzStatus of payment requestr#   statusz:Human readable text for the payment request status integerstatus_textz2Human readable text for the invoice status integertax_type_textz-Three-letter ISO currency code, in lowercase.currencyz>Unique id of payment request, typically has the form 'pr_xxx' payment_request_idz#Due date and time as unix timestampdue_datez'Billing date and time as unix timestampbilling_datez'Created date and time as unix timestamp
created_atz'Shipping Address of the payment requestshipping_addressz'Configuration for split payment requestsplit_configzpayment request Adjustmentpayment_request_adjustmentz+Configuration for recurring payment requestrecurring_configz7Any transactional items included in the payment request
line_itemsz,Any products included in the payment requestproductsz)Customers included in the payment requestpayment_request_customersz+Attachments included in the payment requestattachmentsz Merchant of this Payment RequestmerchantzCreator of this Payment Request
created_byz4List of payment methods used in this payment requestpayment_methodszRedirection url of the paymentpayment_redirect_urlzKTransaction details of this payment request when the payment has been made.transactionsz)Payment Schedules for the payment requestpayment_schedulezThird party reference idreference_idz3Is this payment request authorized by the customer?is_authorizedz0Is 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_literalr\   is_email_enabledr^   is_sms_enabledzOIf true, the payment request has remaining payments to be fetched from customerhas_remaining_paymentsz'Updated date and time as unix timestamp
updated_atz'Deleted date and time as unix timestamp
deleted_atz'Invoioce details of the payment requestinvoicez"Payment url of the payment requestpayment_urlz%Surcharge enabled for cost adjustmentis_surcharge_enabledz"Surcharge type inclusive/exclusivesurcharge_typez+Surcharge type receive_payment/send_paymentpayment_type)Dr3   r4   r5   r   r6   r   r@   r:   r8   rg   r   r   rh   r7   ri   rj   r   rk   rl   r   rm   rn   ro   r   rp   r   r   rq   r   rr   r   rs   r?   rt   r	   ru   r
   rv   r   rw   r   rx   r   ry   r   rz   r{   r   r|   r   r}   r~   rd   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r;   r<   r=   rf   rf      s   d3L ?@B@27/3FH./  "'P"K#  $)H$M8C=  #(C#H  ).T)  $)9$Hhx   (-=(L(8$  &+=&J"  16=1h}-  ?D=?L(4 9:;  MR0M)H I  AFAAh<=  @EM@J:;<  =BB=Hht789  PU?Px-J(KL  7<A7K$123  */6*Hh~&  0550J+,  <AJ<OXd#678  +04+(3-  7<a7L(4 123  .3?.htDz*  #(B\"]L(3-]$)I%M8D>   %F Hhtn  .3 B.Xc]  (-f(htn  &+d&NHTN  .3e.HTN  &+=&J"  &+=&J"  (-=(GXm$  "'tAe!fK#f+0;,(4.  0580NH^,  ,1A,L(<( r<   rf   c                   X    e Zd ZU  ed      Z ed      Zeed<    ed      Z	e
ed<   y)	PaymentScheduleSchemaTr!   zDue date for the paymentr'   rl   zDue amount for the payment
due_amountN)r3   r4   r5   r   r6   r   rl   r   r8   r   r9   r;   r<   r=   r   r   ,  s,    d3L+EFHhF*FGJGr<   r   N)2r   typingr   r   r   pydanticr   r   9src.apps.payment_requests.schemas.payment_request_productr	   :src.apps.payment_requests.schemas.payment_request_customerr
   "src.apps.files.schemas.file_commonr   0src.apps.transactions.schemas.transaction_commonr   "src.apps.users.schemas.user_commonr   *src.apps.merchants.schemas.merchant_commonr   src.core.utils.enumsr   r   src.apps.payment_requests.enumsr   r   r   r   r   r   src.apps.base.schemas.commonr   r   payment_methodr   recurring_payment_requestr   split_payment_requestr   (src.apps.invoices.schemas.invoice_commonr   <src.apps.payment_requests.schemas.payment_request_adjustmentr   r    r?   rB   rF   rI   rf   r   r;   r<   r=   <module>r      s     ' ' & B N A E  C / D < B
b b4<#= <X#= XV#= VHs HsVL- L^HJ Hr<   