Ë
    <@‹gEZ  ã                   ó–   — 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 d dlmZmZmZ d d	lmZmZmZ  G d
„ de«      Zy)é    )Ú
CreditNote)ÚCreditNoteLineItemService)ÚCreditNotePreviewLinesService)Ú
ListObject)ÚRequestOptions)ÚStripeService)Úsanitize_id)ÚDictÚListÚcast)ÚLiteralÚNotRequiredÚ	TypedDictc            	       ó�  ‡ — e Zd Zˆ fd„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i i fdddedee   fd „Zi i fdddedee   fd!„Zi fdd"dedefd#„Zi fdd"dedefd$„Zi i fd%edd&dedefd'„Zi i fd%edd&dedefd(„Zi i fd%edd)dedefd*„Zi i fd%edd)dedefd+„Zi fdd,dedefd-„Zi fdd,dedefd.„Zi i fd%edd/dedefd0„Z i i fd%edd/dedefd1„Z!ˆ xZ"S )2ÚCreditNoteServicec                 óŒ   •— t         ‰| �  |«       t        | j                  «      | _        t        | j                  «      | _        y )N)ÚsuperÚ__init__r   Ú
_requestorÚ
line_itemsr   Úpreview_lines)ÚselfÚ	requestorÚ	__class__s     €úZ/var/www/html/AdoubleTech/venv/lib/python3.12/site-packages/stripe/_credit_note_service.pyr   zCreditNoteService.__init__   s1   ø€ Ü‰Ñ˜Ô#Ü3°D·O±OÓDˆŒÜ:¸4¿?¹?ÓKˆÕó    c                   ó$  — e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 eed      ed<   	 eee      ed<   	 eed<   	 eed      ed	<   	 ee   ed
<   	 ee	eef      ed<   	 ee   ed<   	 eed      ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   y)úCreditNoteService.CreateParamsÚamountÚcredit_amountÚeffective_at©Úcredit_noteÚnoneÚ
email_typeÚexpandÚinvoiceú"CreditNoteService.CreateParamsLineÚlinesÚmemoÚmetadataÚout_of_band_amount©Ú	duplicateÚ
fraudulentÚorder_changeÚproduct_unsatisfactoryÚreasonÚrefundÚrefund_amountú*CreditNoteService.CreateParamsShippingCostÚshipping_costN©
Ú__name__Ú
__module__Ú__qualname__r   ÚintÚ__annotations__r   r   Ústrr
   © r   r   ÚCreateParamsr      s"  … Ø˜CÑ Ó ð	ð # 3Ñ'Ó'ð	ð " #Ñ&Ó&ð	ð   Ð(=Ñ >Ñ?Ó?ð	ð ˜D ™IÑ&Ó&ð	ð ‹ð	ð ˜4Ð DÑEÑFÓFð	ð ˜#ÑÓð	ð ˜d 3¨ 8™nÑ-Ó-ð	ð (¨Ñ,Ó,ð	ð Øð*ññ
ó 	
ð	ð ˜CÑ Ó ð	ð # 3Ñ'Ó'ð	ð #Ø8ñ
ó 	
ð	r   r?   c                   ó®   — e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   	 ed   ed<   	 ed	   ed
<   	 ee   ed<   	 ee   ed<   y)r(   r   ÚdescriptionÚinvoice_line_itemÚquantityz=Literal['']|List[CreditNoteService.CreateParamsLineTaxAmount]Útax_amountsúLiteral['']|List[str]Ú	tax_rates©Úcustom_line_itemrB   ÚtypeÚunit_amountÚunit_amount_decimalN©r8   r9   r:   r   r;   r<   r=   r   r>   r   r   ÚCreateParamsLinez"CreditNoteService.CreateParamsLineY   s©   … Ø˜CÑ Ó ð	ð ! Ñ%Ó%ð	ð ' sÑ+Ó+ð	ð ˜cÑ"Ó"ð	ð !ØKñ
ó 	
ð	ð Ð6Ñ7Ó7ð	ð Ð=Ñ>Ó>ð	ð ! Ñ%Ó%ð	ð )¨Ñ-Ó-ð	r   rM   c                   ó0   — e Zd ZU eed<   	 eed<   	 eed<   y)ú+CreditNoteService.CreateParamsLineTaxAmountr   Útax_rateÚtaxable_amountN©r8   r9   r:   r;   r<   r=   r>   r   r   ÚCreateParamsLineTaxAmountrO   �   ó%   … Ø‹ð	ð ‹ð	ð Óð	r   rS   c                   ó   — e Zd ZU ee   ed<   y)r5   Úshipping_rateN©r8   r9   r:   r   r=   r<   r>   r   r   ÚCreateParamsShippingCostz*CreditNoteService.CreateParamsShippingCost�   ó   … Ø" 3Ñ'Ó'ð	r   rX   c                   ó�   — e Zd ZU ed   ed<   	 ee   ed<   	 ee   ed<   	 eee      ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y	)
úCreditNoteService.ListParamsz'CreditNoteService.ListParamsCreated|intÚcreatedÚcustomerÚending_beforer&   r'   ÚlimitÚstarting_afterN)r8   r9   r:   r   r<   r=   r   r;   r>   r   r   Ú
ListParamsr[   •   sƒ   … ØÐFÑGÓGð	ð ˜cÑ"Ó"ð	ð # 3Ñ'Ó'ð	ð ˜D ™IÑ&Ó&ð	ð ˜SÑ!Ó!ð	ð ˜3ÑÓð	ð $ CÑ(Ó(ð	r   ra   c                   óT   — e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)ú#CreditNoteService.ListParamsCreatedÚgtÚgteÚltÚlteN)r8   r9   r:   r   r;   r<   r>   r   r   ÚListParamsCreatedrc   ³   sH   … Ø˜ÑÓð	ð ˜ÑÓð	ð ˜ÑÓð	ð ˜ÑÓð	r   rh   c                   ó$  — e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 eed      ed<   	 eee      ed<   	 eed<   	 eed      ed	<   	 ee   ed
<   	 ee	eef      ed<   	 ee   ed<   	 eed      ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   y)úCreditNoteService.PreviewParamsr   r    r!   r"   r%   r&   r'   ú#CreditNoteService.PreviewParamsLiner)   r*   r+   r,   r-   r2   r3   r4   ú+CreditNoteService.PreviewParamsShippingCostr6   Nr7   r>   r   r   ÚPreviewParamsrj   Å   s"  … Ø˜CÑ Ó ð	ð # 3Ñ'Ó'ð	ð " #Ñ&Ó&ð	ð   Ð(=Ñ >Ñ?Ó?ð	ð ˜D ™IÑ&Ó&ð	ð ‹ð	ð ˜4Ð EÑFÑGÓGð	ð ˜#ÑÓð	ð ˜d 3¨ 8™nÑ-Ó-ð	ð (¨Ñ,Ó,ð	ð Øð*ññ
ó 	
ð	ð ˜CÑ Ó ð	ð # 3Ñ'Ó'ð	ð #Ø9ñ
ó 	
ð	r   rm   c                   ó®   — e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   	 ed   ed<   	 ed	   ed
<   	 ee   ed<   	 ee   ed<   y)rk   r   rA   rB   rC   z>Literal['']|List[CreditNoteService.PreviewParamsLineTaxAmount]rD   rE   rF   rG   rI   rJ   rK   NrL   r>   r   r   ÚPreviewParamsLinez#CreditNoteService.PreviewParamsLine  s©   … Ø˜CÑ Ó ð	ð ! Ñ%Ó%ð	ð ' sÑ+Ó+ð	ð ˜cÑ"Ó"ð	ð !ØLñ
ó 	
ð	ð Ð6Ñ7Ó7ð	ð Ð=Ñ>Ó>ð	ð ! Ñ%Ó%ð	ð )¨Ñ-Ó-ð	r   ro   c                   ó0   — e Zd ZU eed<   	 eed<   	 eed<   y)ú,CreditNoteService.PreviewParamsLineTaxAmountr   rP   rQ   NrR   r>   r   r   ÚPreviewParamsLineTaxAmountrq   0  rT   r   rr   c                   ó   — e Zd ZU ee   ed<   y)rl   rV   NrW   r>   r   r   ÚPreviewParamsShippingCostz+CreditNoteService.PreviewParamsShippingCost>  rY   r   rt   c                   ó$   — e Zd ZU eee      ed<   y)ú CreditNoteService.RetrieveParamsr&   N©r8   r9   r:   r   r   r=   r<   r>   r   r   ÚRetrieveParamsrv   D  ó   … Ø˜D ™IÑ&Ó&ð	r   rx   c                   óR   — e Zd ZU eee      ed<   	 ee   ed<   	 eeeef      ed<   y)úCreditNoteService.UpdateParamsr&   r*   r+   N)r8   r9   r:   r   r   r=   r<   r
   r>   r   r   ÚUpdateParamsr{   J  sB   … Ø˜D ™IÑ&Ó&ð	ð ˜#ÑÓð	ð ˜d 3¨ 8™nÑ-Ó-ð	r   r|   c                   ó$   — e Zd ZU eee      ed<   y)ú&CreditNoteService.VoidCreditNoteParamsr&   Nrw   r>   r   r   ÚVoidCreditNoteParamsr~   X  ry   r   r   Úparamsr[   ÚoptionsÚreturnc           
      óX   — t        t        t           | j                  ddd||¬«      «      S )ú1
        Returns a list of credit notes.
        Úgetú/v1/credit_notesÚapi©Úbase_addressr€   r�   )r   r   r   Ú_request©r   r€   r�   s      r   ÚlistzCreditNoteService.list^  s9   € ô Ü”zÑ"Ø�M‰MØØ"Ø"ØØð ó ó	
ð 		
r   c           
   ƒ   ót   K  — t        t        t           | j                  ddd||¬«      ƒ d{  –—† «      S 7 Œ­w)r„   r…   r†   r‡   rˆ   N)r   r   r   Ú_request_asyncr‹   s      r   Ú
list_asynczCreditNoteService.list_asyncq  sI   è ø€ ô Ü”zÑ"Ø×%Ñ%ØØ"Ø"ØØð &ó ÷ ó	
ð 		
ðús   ‚+8­6
®	8r   c           
      óJ   — t        t        | j                  ddd||¬«      «      S )á+  
        Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
        its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
        in any combination of the following:


        Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
        Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized.
        Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).


        For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

        You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount
        or post_payment_credit_notes_amount depending on its status at the time of credit note creation.
        Úpostr†   r‡   rˆ   ©r   r   rŠ   r‹   s      r   ÚcreatezCreditNoteService.create„  s4   € ô* ÜØ�M‰MØØ"Ø"ØØð ó ó	
ð 		
r   c           
   ƒ   óf   K  — t        t        | j                  ddd||¬«      ƒ d{  –—† «      S 7 Œ­w)r‘   r’   r†   r‡   rˆ   N©r   r   rŽ   r‹   s      r   Úcreate_asynczCreditNoteService.create_async¤  sD   è ø€ ô* ÜØ×%Ñ%ØØ"Ø"ØØð &ó ÷ ó	
ð 		
ðúó   ‚$1¦/
§	1Úidrv   c                 ó|   — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      «      S )úM
        Retrieves the credit note object with the given identifier.
        r…   ú/v1/credit_notes/{id}©r™   r‡   rˆ   ©r   r   rŠ   Úformatr	   ©r   r™   r€   r�   s       r   ÚretrievezCreditNoteService.retrieveÄ  sF   € ô ÜØ�M‰MØØ'×.Ñ.´+¸b³/Ð.ÓBØ"ØØð ó ó	
ð 		
r   c              ƒ   ó˜   K  — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      ƒ d{  –—† «      S 7 Œ­w)r›   r…   rœ   r�   r‡   rˆ   N©r   r   rŽ   rŸ   r	   r    s       r   Úretrieve_asyncz CreditNoteService.retrieve_asyncØ  sV   è ø€ ô ÜØ×%Ñ%ØØ'×.Ñ.´+¸b³/Ð.ÓBØ"ØØð &ó ÷ ó	
ð 		
ðúó   ‚=A
¿A
Á 	A
r{   c                 ó|   — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      «      S )ú2
        Updates an existing credit note.
        r’   rœ   r�   r‡   rˆ   rž   r    s       r   ÚupdatezCreditNoteService.updateì  sF   € ô ÜØ�M‰MØØ'×.Ñ.´+¸b³/Ð.ÓBØ"ØØð ó ó	
ð 		
r   c              ƒ   ó˜   K  — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      ƒ d{  –—† «      S 7 Œ­w)r§   r’   rœ   r�   r‡   rˆ   Nr£   r    s       r   Úupdate_asynczCreditNoteService.update_async   sV   è ø€ ô ÜØ×%Ñ%ØØ'×.Ñ.´+¸b³/Ð.ÓBØ"ØØð &ó ÷ ó	
ð 		
ðúr¥   rj   c           
      óJ   — t        t        | j                  ddd||¬«      «      S )úE
        Get a preview of a credit note without creating it.
        r…   ú/v1/credit_notes/previewr‡   rˆ   r“   r‹   s      r   ÚpreviewzCreditNoteService.preview  s4   € ô ÜØ�M‰MØØ*Ø"ØØð ó ó	
ð 		
r   c           
   ƒ   óf   K  — t        t        | j                  ddd||¬«      ƒ d{  –—† «      S 7 Œ­w)r¬   r…   r­   r‡   rˆ   Nr–   r‹   s      r   Úpreview_asynczCreditNoteService.preview_async'  sD   è ø€ ô ÜØ×%Ñ%ØØ*Ø"ØØð &ó ÷ ó	
ð 		
ðúr˜   r~   c                 ó|   — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      «      S )ú–
        Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
        r’   ú/v1/credit_notes/{id}/voidr�   r‡   rˆ   rž   r    s       r   Úvoid_credit_notez"CreditNoteService.void_credit_note:  sF   € ô ÜØ�M‰MØØ,×3Ñ3´{À2³Ð3ÓGØ"ØØð ó ó	
ð 		
r   c              ƒ   ó˜   K  — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      ƒ d{  –—† «      S 7 Œ­w)r²   r’   r³   r�   r‡   rˆ   Nr£   r    s       r   Úvoid_credit_note_asyncz(CreditNoteService.void_credit_note_asyncN  sV   è ø€ ô ÜØ×%Ñ%ØØ,×3Ñ3´{À2³Ð3ÓGØ"ØØð &ó ÷ ó	
ð 		
ðúr¥   )#r8   r9   r:   r   r   r?   rM   rS   rX   ra   rh   rm   ro   rr   rt   rx   r|   r   r   r   r   rŒ   r�   r”   r—   r=   r¡   r¤   r¨   rª   r®   r°   r´   r¶   Ú__classcell__)r   s   @r   r   r      sÕ  ø„ ôLô
A�yô AôF&˜9ô &ôP Iô ô 9ô ô�Yô ô<˜Iô ô$A˜	ô AôF&˜Iô &ôP Yô ô Iô ô˜ô ô�yô ô˜yô ð 24Ø"$ñ
à.ð
ð  ð
ð 
�JÑ	ó	
ð* 24Ø"$ñ
à.ð
ð  ð
ð 
�JÑ	ó	
ð, #%ñ
à0ð
ð  ð
ð 
ó	
ðF #%ñ
à0ð
ð  ð
ð 
ó	
ðF 68Ø"$ñ	
àð
ð 3ð
ð  ð	
ð
 
ó
ð. 68Ø"$ñ	
àð
ð 3ð
ð  ð	
ð
 
ó
ð. 46Ø"$ñ	
àð
ð 1ð
ð  ð	
ð
 
ó
ð. 46Ø"$ñ	
àð
ð 1ð
ð  ð	
ð
 
ó
ð. #%ñ
à1ð
ð  ð
ð 
ó	
ð, #%ñ
à1ð
ð  ð
ð 
ó	
ð, <>Ø"$ñ	
àð
ð 9ð
ð  ð	
ð
 
ó
ð. <>Ø"$ñ	
àð
ð 9ð
ð  ð	
ð
 
÷
r   r   N)Ústripe._credit_noter   Ú%stripe._credit_note_line_item_servicer   Ú)stripe._credit_note_preview_lines_servicer   Ústripe._list_objectr   Ústripe._request_optionsr   Ústripe._stripe_servicer   Ústripe._utilr	   Útypingr
   r   r   Útyping_extensionsr   r   r   r   r>   r   r   ú<module>rÁ      s:   ðõ +Ý Kõõ +Ý 2Ý 0Ý $ß #Ñ #ß =Ñ =ôP	
˜õ P	
r   