
    k)iI-                        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	 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 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      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      Z! G d+ d,e      Z" G d- d.e      Z# G d/ d0e      Z$ G d1 d2e	      Z% G d3 d4e      Z& G d5 d6e      Z' G d7 d8e	      Z( G d9 d:e(      Z) G d; d<e(      Z*y=)>    )datetime)Optional)	BaseModelField)AddressCreateRequestSchemaAddressSchema
BaseSchema)r	   )PaymentMethodScopesPaymentMethodTypes)SplitPaymentTypes)CustomerSchemac                      e Zd ZU  ed      Zee   ed<    ed      Zee	   ed<    ed      Z
ee   ed<    ed      Zee   ed	<    ed
      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<   y)PaymentMethodCardBaseThird party reference iddescriptionreference_idz'Is this card default for this customer?
is_defaultzlast 4 digits of card numbercard_numberz$Brand of card, Visa / Mastercard etcbrandzCard CVVcvvzType of card - Credit/DebitfundingCard expiry monthexpire_monthCard expiry yearexpire_year#Method of the payment e.g. card/achmethodz8Payment Method Split Type for the card percentage/amountpay_split_typez'Payment Method Split value for the Typepay_split_value'Created date and time as unix timestamp
created_at)Last used date and time as unix timestamplast_used_atN)__name__
__module____qualname__r   r   r   str__annotations__r   boolr   r   r   r   r   r   r   r   r    floatr"   r   r$        n/var/www/html/hwPaymentPortal-be-dev/hw-payment-portal-api/src/apps/payment_requests/schemas/payment_method.pyr   r      s#   "'4N"OL(3-O!&="J  "'3Q!RK#R -STE8C=T:6C#6"/LMGXc]M"'4G"HL(3-H!&3E!FK#F!.STFHSMT$)N%NHSM  (-=(OXe_  &+=&J"  (-?(L(8$ r-   r   c                   0    e Zd ZU  ed      Zee   ed<   y)PaymentMethodCardSchemaz&Id of PaymentMethodCardSchema resourcer   idNr%   r&   r'   r   r1   r   intr)   r,   r-   r.   r0   r0   &   s    *RSBSr-   r0   c                       e Zd Zy)PaymentMethodCardCreateNr%   r&   r'   r,   r-   r.   r5   r5   *       r-   r5   c                       e Zd Zy)PaymentMethodCardUpdateNr6   r,   r-   r.   r9   r9   .   r7   r-   r9   c                   b   e Zd ZU  ed      Zee   ed<    ed      Zee	   ed<    ed      Z
ee   ed<    ed      Zee   ed	<    ed
      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<   y)PaymentMethodACHBaser   r   r   z-Is this ach method default for this customer?r   zAccount number of customeraccount_numberzRouting number of customerrouting_numberzAccount holder nameaccount_namez	Bank name	bank_namezType of account owner
owner_typez(Type of account, Savings / Current / etcaccount_typer!   r"   r#   r$   N)r%   r&   r'   r   r   r   r(   r)   r   r*   r<   r=   r>   r?   r@   rA   r"   r   r$   r,   r-   r.   r;   r;   2   s    "'4N"OL(3-O!&C"J  %*6R$SNHSMS$)6R$SNHSMS"'4I"JL(3-J$=Ix}= %2I JJJ"'>#L(3-  &+=&J"  (-?(L(8$ r-   r;   c                   0    e Zd ZU  ed      Zee   ed<   y)PaymentMethodACHSchemaz%Id of PaymentMethodACHSchema resourcer   r1   Nr2   r,   r-   r.   rC   rC   G   s    *QRBRr-   rC   c                       e Zd Zy)PaymentMethodACHCreateNr6   r,   r-   r.   rE   rE   K   r7   r-   rE   c                       e Zd Zy)PaymentMethodACHUpdateNr6   r,   r-   r.   rG   rG   O   r7   r-   rG   c                   R    e Zd ZU  ed      Zee   ed<    ed      Zee	   ed<   y)PaymentMethodChequeBasezCheque number of customerr   cheque_numberr!   r"   N)
r%   r&   r'   r   rJ   r   r(   r)   r"   r   r,   r-   r.   rI   rI   S   s/    #(5P#QM8C=Q%*=&J" r-   rI   c                   0    e Zd ZU  ed      Zee   ed<   y)PaymentMethodChequeSchemaz(ID of PaymentMethodChequeSchema resourcer   r1   Nr2   r,   r-   r.   rL   rL   Z   s    *TUBUr-   rL   c                       e Zd Zy)PaymentMethodChequeCreateNr6   r,   r-   r.   rN   rN   ^   r7   r-   rN   c                       e Zd Zy)PaymentMethodChequeUpdateNr6   r,   r-   r.   rP   rP   b   r7   r-   rP   c                   0    e Zd ZU  ed      Zee   ed<   y)PaymentMethodBasezType of payment method usedr   r   N)r%   r&   r'   r   r   r   r   r)   r,   r-   r.   rR   rR   g   s    +01,FH'( r-   rR   c                   ~    e Zd ZU  ed      Zeed<    ed      Zeed<    ed      Z	eed<    ed      Z
eed	<   y
)PaymentSplitTenderSchemazSplit Tender Valuer   r    zSplit Tender Typer   zSplit Payment Tokenpayment_method_tokenz,Calculated value of the payment split tenderpayment_split_calculated_valueN)r%   r&   r'   r   r    r+   r)   r   r(   rU   rV   r,   r-   r.   rT   rT   m   sH    "/CDOUD,?@NC@ %2G H#H,1B-"E r-   rT   c                   ~    e Zd ZU  ed      Zeed<    ed      Zeed<    ed      Ze	ed<    ed      Z
eed	<   y
)PartialPaymentRequestConfigBasePartial Payment Defined byr   
defined_by&Partial Payment Type percentage/amountpartial_payment_typePartial Payment Valuepartial_payment_valueDue date of the paymentdue_dateN)r%   r&   r'   r   rZ   r(   r)   r\   r^   r+   r`   r   r,   r-   r.   rX   rX   v   sJ    (DEJE %<!#  $)5L#M5M+DEHhEr-   rX   c                   0    e Zd ZU  ed      Zee   ed<   y)'PartialPaymentRequestConfigCreateSchemaCalculated Value of the paymentr   calculated_valueN)r%   r&   r'   r   rd   r   r+   r)   r,   r-   r.   rb   rb      s    (-5)huo r-   rb   c                       e Zd ZU  ed      Zeed<    ed      Zee   ed<    ed      Z	ee
   ed<    ed      Zee
   ed	<    ed
      Zee
   ed<   y)!PartialPaymentRequestConfigSchemazId of the configr   r1   zPayment Request Idpayment_request_idr!   r"   'Updated date and time as unix timestamp
updated_at'Deleted date and time as unix timestamp
deleted_atN)r%   r&   r'   r   r1   r3   r)   rg   r   r"   r   ri   rk   r,   r-   r.   rf   rf      sv     23B3(-:N(OO%*=&J"  &+=&J"  &+=&J" r-   rf   c                       e Zd ZU  ed      Zee   ed<    ed      Zee   ed<    ed      Z	ee
   ed<    ed      Zee   ed	<    ed
      Zee   ed<   y)'PartialPaymentRequestConfigUpdateSchemarY   r   rZ   r[   r\   r_   r`   r]   r^   rc   rd   N)r%   r&   r'   r   rZ   r   r(   r)   r\   r`   r   r^   r+   rd   r,   r-   r.   rm   rm      st     %2N OJO*/<+(3-  $)5N#OHhx O-2?V-W8E?W(-5)huo r-   rm   c                      e Zd ZU  ed      Zeed<    ed      Zee	   ed<    ed      Z
ee   ed<    ed      Zee   ed	<    ed
      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee	   ed<    ed      Zee	   ed<    ed      Zee	   ed<    ed       Zee   ed!<    ed"      Z ee   ed#<    ed$      Z!ee"   ed%<    ed&      Z#ee   ed'<   y())PaymentMethodSchemaId of PaymentMethod resourcer   r1   -Is this payment method connected to customer?is_connectedz>Unique id of the payment method, typically has the form pm_xxxpayment_method_idz$Scope of this payment method's usagescope)Card details used for this payment methodcard_details(ACH details used for this payment methodach_detailsz+Cheque Details used for this payment Methodcheque_detailsr!   r"   rh   ri   rj   rk   zCustomer of this PaymentMethodcustomerr   r   z2Is this payment method default method of customer?r   z!Is this payment method deletable?is_deletable4Is this payment method is use for a payment request?in_usez3Billing address associated with this payment methodbilling_addressz0Split Tender payment Type e.g. percentage/amountr   zSplit Tender Payment Valuer    r#   r$   N)$r%   r&   r'   r   r1   r3   r)   rr   r   r*   rs   r(   rt   r
   rv   r0   rx   rC   ry   rL   r"   r   ri   rk   rz   r   r   r   r{   r}   r~   r   r   r    r+   r$   r,   r-   r.   ro   ro      s    >?B?#(C$L(4.  (-T(x}  ,1:,E8'(  7<?7L(23  5:>5K01  ;@A;NH67  &+=&J"  &+=&J"  &+=&J"  */4*Hh~&  #(4N"OL(3-O!&H"J  $)7$L(4.  #JFHTN  05I0OXm,  %*F%NHSM  (-9U'VOXe_V',?(L(8$ r-   ro   c                       e Zd ZU  ed      Zee   ed<    ed      Zee	   ed<    ed      Z
ee   ed<    ed      Zee   ed<   y	)
 PaymentMethodCreateRequestSchemar|   r   r}   ru   rv   rw   rx   ry   N)r%   r&   r'   r   r}   r   r*   r)   rv   r0   rx   rC   ry   rL   r,   r-   r.   r   r      so    "JFHTN  7<?7L(23  5:>5K01  ;@>;NH67 r-   r   c                       e Zd ZU  ed      Zeed<    ed      Zee	   ed<    ed      Z
ee   ed<    ed      Zee   ed	<    ed
      Zee   ed<    ed      Zee	   ed<   y)PaymentRequestMethodSchemaz0Preferred payment method, (Card/ACH/Cash/Cheque)r   payment_methodz Payment method token of the cardrU   z.Payment method split type, (percentage/amount)pay_method_typezAPayment method split value according tp payment method split typepay_method_valuez,Calcualted split value of the current methodrd   zPayment method token typetokenization_providerN)r%   r&   r'   r   r   r   r)   rU   r   r(   r   r   r   r+   rd   r   r,   r-   r.   r   r      s    ).F*N&  +06+(3-  49D4OX/0  ).W)huo  ).B)huo  ,1/,8C= r-   r   c                   R    e Zd ZU  ed      Zee   ed<    ed      Zee   ed<   y) PaymentMethodUpdateRequestSchemar|   r   r}   rq   rr   N)	r%   r&   r'   r   r}   r   r*   r)   rr   r,   r-   r.   r   r      s4    "JFHTN  $)C$L(4. r-   r   c                   t    e Zd ZU  ed      Zee   ed<    ed      Zee	   ed<    ed      Z
ee	   ed<   y)	(CustomerPaymentMethodUpdateRequestSchemaz1Is this payment method default for this customer?r   r   r   r   r   r   N)r%   r&   r'   r   r   r   r*   r)   r   r(   r   r,   r-   r.   r   r     sD    !&G"J  #(4G"HL(3-H!&3E!FK#Fr-   r   c                      e Zd ZU  ed      Zee   ed<    ed      Zee	   ed<    ed      Z
ee   ed<    ed      Zee   ed	<    ed
      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<    ed      Zee   ed<   y)MerchantPaymentMethodSchemarp   r   r1   r   r   rq   rr   r|   r}   zUnique id of the card detailscard_details_idzUnique id of the ACH detailsach_details_idz Unique id of the billing addressbilling_address_idzUnique id of the Merchantmerchant_idr!   r"   rh   ri   rj   rk   N)r%   r&   r'   r   r1   r   r3   r)   r   r(   rr   r*   r}   r   r   r   r   r"   r   ri   rk   r,   r-   r.   r   r   
  s   *HIBI!.STFHSMT#(C$L(4.  #JFHTN  &+3&OXc]  %*2%NHSM  ).6)  "'/"K#  &+=&J"  &+=&J"  &+=&J" r-   r   c                       e Zd Zy)!MerchantPaymentMethodCreateSchemaNr6   r,   r-   r.   r   r   *  r7   r-   r   c                       e Zd Zy)!MerchantPaymentMethodUpdateSchemaNr6   r,   r-   r.   r   r   .  r7   r-   r   N)+r   typingr   pydanticr   r   src.apps.base.schemas.commonr   r   r	   src.core.utils.enumsr
   r   src.apps.payment_requests.enumsr   *src.apps.customers.schemas.customer_commonr   r   r0   r5   r9   r;   rC   rE   rG   rI   rL   rN   rP   rR   rT   rX   rb   rf   rm   ro   r   r   r   r   r   r   r   r,   r-   r.   <module>r      sv     % ^ ^ 3 H = EJ 6T3 T	3 		5 	: *S1 S	1 		3 	j V 7 V	 7 		 9 	

 0 Fj F.M (G 
.M 
3+ 3l'8  *'8 Gy G* @	(C 		(C 	r-   