§
    _õ‚jJ7  ã            	       ó$  — 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mZ er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d         ed         ed         ed         ¦  «        Z$dS )é    )ÚCreateableAPIResource)ÚDeletableAPIResource)Ú
ListObject)ÚListableAPIResource)ÚStripeObject)ÚUpdateableAPIResource)Úclass_method_variantÚsanitize_id)ÚClassVarÚDictÚListÚOptionalÚcastÚoverload)ÚLiteralÚUnpackÚTYPE_CHECKING)ÚCouponCreateParams)ÚCouponDeleteParams)ÚCouponListParams)ÚCouponModifyParams)ÚCouponRetrieveParamsc                   óV  — e Zd ZU dZdZeed                  ed<    G d„ de¦  «        Z	 G d„ de¦  «        Z
ee         ed<   	 ee	         ed	<   eed
<   	 ee         ed<   	 eeee
f                  ed<   	 eed                  ed<   	 ed         ed<   	 ee         ed<   	 eed<   	 eed<   	 ee         ed<   	 eeeef                  ed<   	 ee         ed<   	 ed         ed<   	 ee         ed<   	 ee         ed<   	 eed<   	 eed<   	 eded         dd fd„¦   «         Zeded         dd fd „¦   «         Zed!eded"         dd fd#„¦   «         Zeed!eded"         dd fd$„¦   «         ¦   «         Zeded"         dd fd%„¦   «         Z ed&¦  «        ded"         dd fd'„¦   «         Zed!eded"         dd fd(„¦   «         Zeed!eded"         dd fd)„¦   «         ¦   «         Zeded"         dd fd*„¦   «         Z ed+¦  «        ded"         dd fd,„¦   «         Zeded-         ded          fd.„¦   «         Zeded-         ded          fd/„¦   «         Zededed0         dd fd1„¦   «         Zededed0         dd fd2„¦   «         Z ededed3         dd fd4„¦   «         Z!ededed3         dd fd5„¦   «         Z"e	e
d6œZ#d7S )8ÚCoupona  
    A coupon contains information about a percent-off or amount-off discount you
    might want to apply to a customer. Coupons may be applied to [subscriptions](https://api.stripe.com#subscriptions), [invoices](https://api.stripe.com#invoices),
    [checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://api.stripe.com#quotes), and more. Coupons do not work with conventional one-off [charges](https://api.stripe.com#create_charge) or [payment intents](https://docs.stripe.com/api/payment_intents).
    ÚcouponÚOBJECT_NAMEc                   ó&   — e Zd ZU ee         ed<   dS )úCoupon.AppliesToÚproductsN)Ú__name__Ú
__module__Ú__qualname__r   ÚstrÚ__annotations__© ó    úR/var/www/app.qaans.com/backend/venv/lib/python3.11/site-packages/stripe/_coupon.pyÚ	AppliesTor   #   s&   € € € € € € Øs”)ÐÐÑð	ð 	r&   r(   c                   ó   — e Zd ZU eed<   dS )úCoupon.CurrencyOptionsÚ
amount_offN)r    r!   r"   Úintr$   r%   r&   r'   ÚCurrencyOptionsr*   )   s   € € € € € € Øˆˆ‰ð	ð 	r&   r-   r+   Ú
applies_toÚcreatedÚcurrencyÚcurrency_optionsTÚdeleted)ÚforeverÚonceÚ	repeatingÚdurationÚduration_in_monthsÚidÚlivemodeÚmax_redemptionsÚmetadataÚnameÚobjectÚpercent_offÚ	redeem_byÚtimes_redeemedÚvalidÚparamsr   Úreturnc                 ór   — t          d|                      d|                      ¦   «         |¬¦  «        ¦  «        S )áˆ  
        You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

        A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
        r   Úpost©rB   )r   Ú_static_requestÚ	class_url©ÚclsrB   s     r'   ÚcreatezCoupon.createu   sB   € õ ØØ×ÒØØ—’‘”Øð  ñ ô ñ
ô 
ð 	
r&   c              ‹   ó‚   K  — t          d|                      d|                      ¦   «         |¬¦  «        ƒ d{V —†¦  «        S )rE   r   rF   rG   N)r   Ú_static_request_asyncrI   rJ   s     r'   Úcreate_asynczCoupon.create_async…   sd   è è € õ ØØ×+Ò+ØØ—’‘”Øð ,ñ ô ð ð ð ð ð ð ñ
ô 
ð 	
r&   Úsidr   c                 óš   — |                       ¦   «         ›dt          |¦  «        ›}t          d|                      d||¬¦  «        ¦  «        S )áD  
        You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API.
        ú/r   ÚdeleterG   ©rI   r
   r   rH   ©rK   rP   rB   Úurls       r'   Ú_cls_deletezCoupon._cls_delete—   s[   € ð Ÿš™œ˜˜­+°cÑ*:Ô*:Ð*:Ð;ˆÝØØ×ÒØØØð  ñ ô ñ
ô 
ð 	
r&   c                 ó   — dS ©rR   Nr%   ©rP   rB   s     r'   rT   zCoupon.delete¨   s	   € ð 	ˆr&   c                 ó   — dS rZ   r%   ©ÚselfrB   s     r'   rT   zCoupon.delete°   s	   € ð
 	ˆr&   rX   c                 óV   — |                       d|                      ¦   «         |¬¦  «        S )rR   rT   rG   )Ú_request_and_refreshÚinstance_urlr]   s     r'   rT   zCoupon.delete·   s6   € ð ×(Ò(ØØ×ÒÑÔØð )ñ 
ô 
ð 	
r&   c              ‹   óª   K  — |                       ¦   «         ›dt          |¦  «        ›}t          d|                      d||¬¦  «        ƒ d{V —†¦  «        S )rR   rS   r   rT   rG   N©rI   r
   r   rN   rV   s       r'   Ú_cls_delete_asynczCoupon._cls_delete_asyncÄ   s}   è è € ð Ÿš™œ˜˜­+°cÑ*:Ô*:Ð*:Ð;ˆÝØØ×+Ò+ØØØð ,ñ ô ð ð ð ð ð ð ñ
ô 
ð 	
r&   c              ‹   ó
   K  — dS rZ   r%   r[   s     r'   Údelete_asynczCoupon.delete_asyncÕ   s   è è € ð 	ˆr&   c              ‹   ó
   K  — dS rZ   r%   r]   s     r'   rf   zCoupon.delete_asyncß   s   è è € ð 	ˆr&   rd   c              ‹   óf   K  — |                       d|                      ¦   «         |¬¦  «        ƒ d{V —†S )rR   rT   rG   N)Ú_request_and_refresh_asyncra   r]   s     r'   rf   zCoupon.delete_asyncè   sX   è è € ð ×4Ò4ØØ×ÒÑÔØð 5ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ð 	
r&   r   c                 óÌ   — |                       d|                      ¦   «         |¬¦  «        }t          |t          ¦  «        s$t	          dt          |¦  «        j        z  ¦  «        ‚|S )ú1
        Returns a list of your coupons.
        ÚgetrG   ú%Expected list object from API, got %s)rH   rI   Ú
isinstancer   Ú	TypeErrorÚtyper    ©rK   rB   Úresults      r'   ÚlistzCoupon.listõ   sp   € ð ×$Ò$ØØMŠM‰OŒOØð %ñ 
ô 
ˆõ
 ˜&¥*Ñ-Ô-ð 	ÝØ7Ý˜‘<”<Ô(ñ*ñô ð ð
 ˆr&   c              ‹   óÜ   K  — |                       d|                      ¦   «         |¬¦  «        ƒ d{V —†}t          |t          ¦  «        s$t	          dt          |¦  «        j        z  ¦  «        ‚|S )rk   rl   rG   Nrm   )rN   rI   rn   r   ro   rp   r    rq   s      r'   Ú
list_asynczCoupon.list_async	  s’   è è € ð ×0Ò0ØØMŠM‰OŒOØð 1ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ˆõ
 ˜&¥*Ñ-Ô-ð 	ÝØ7Ý˜‘<”<Ô(ñ*ñô ð ð
 ˆr&   r   c                 óš   — |                       ¦   «         ›dt          |¦  «        ›}t          d|                      d||¬¦  «        ¦  «        S )ú‡
        Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
        rS   r   rF   rG   rU   ©rK   r8   rB   rW   s       r'   ÚmodifyzCoupon.modify  sX   € ð Ÿš™œ˜˜­+°b©/¬/¨/Ð:ˆÝØØ×ÒØØØð  ñ ô ñ
ô 
ð 	
r&   c              ‹   óª   K  — |                       ¦   «         ›dt          |¦  «        ›}t          d|                      d||¬¦  «        ƒ d{V —†¦  «        S )rw   rS   r   rF   rG   Nrc   rx   s       r'   Úmodify_asynczCoupon.modify_async.  sz   è è € ð Ÿš™œ˜˜­+°b©/¬/¨/Ð:ˆÝØØ×+Ò+ØØØð ,ñ ô ð ð ð ð ð ð ñ
ô 
ð 	
r&   r   c                 ó@   —  | |fi |¤Ž}|                      ¦   «          |S )ú9
        Retrieves the coupon with the given ID.
        )Úrefresh©rK   r8   rB   Úinstances       r'   ÚretrievezCoupon.retrieve?  s2   € ð 3rÐ$Ð$˜VÐ$Ð$ˆØ×ÒÑÔÐØˆr&   c              ‹   óP   K  —  | |fi |¤Ž}|                      ¦   «         ƒ d{V —† |S )r}   N)Úrefresh_asyncr   s       r'   Úretrieve_asynczCoupon.retrieve_asyncJ  sH   è è € ð 3rÐ$Ð$˜VÐ$Ð$ˆØ×$Ò$Ñ&Ô&Ð&Ð&Ð&Ð&Ð&Ð&Ð&Øˆr&   )r.   r1   N)$r    r!   r"   Ú__doc__r   r   r   r$   r   r(   r-   r   r,   r#   r   ÚboolÚfloatÚclassmethodr   rL   rO   rX   r   ÚstaticmethodrT   r	   rd   rf   r   rs   ru   ry   r{   r   r„   Ú_inner_class_typesr%   r&   r'   r   r      s  € € € € € € ðð ð 08€K˜' (Ô+Ô,Ð7Ð7Ñ7ðð ð ð ð Lñ ô ð ðð ð ð ð ˜,ñ ô ð ð ˜”ÐÐÑðð ˜Ô#Ð#Ð#Ñ#Ø€L€LLðð sŒmÐÐÑðð ˜t C¨Ð$8Ô9Ô:Ð:Ð:Ñ:ðð g˜d”mÔ$Ð$Ð$Ñ$ðð Ð4Ô5Ð5Ð5Ñ5ðð ! œÐ%Ð%Ñ%ðð 	€G€GGðð €N€NNðð ˜c”]Ð"Ð"Ñ"ðð t˜C ˜H”~Ô&Ð&Ð&Ñ&ðð 3Œ-ÐÐÑðð HÔÐÐÑðð ˜%”Ð Ð Ñ ðð ˜Œ}ÐÐÑðð ÐÐÑðð €K€KKðð ð
˜fÐ%9Ô:ð 
¸xð 
ð 
ð 
ñ „[ð
ð ð
ØÐ2Ô3ð
à	ð
ð 
ð 
ñ „[ð
ð" ð
Øð
Ø!'Ð(<Ô!=ð
à	ð
ð 
ð 
ñ „[ð
ð  ØðCð  6Ð*>Ô#?ð ÀHð ð ð ñ „\ñ „Xðð ð˜vÐ&:Ô;ð Àð ð ð ñ „Xðð Ð˜-Ñ(Ô(ð

ØÐ3Ô4ð

à	ð

ð 

ð 

ñ )Ô(ð

ð ð
Øð
Ø!'Ð(<Ô!=ð
à	ð
ð 
ð 
ñ „[ð
ð  ØðØðØ"Ð#7Ô8ðà	ðð ð ñ „\ñ „Xðð ðØÐ3Ô4ðà	ðð ð ñ „Xðð ÐÐ-Ñ.Ô.ð

ØÐ3Ô4ð

à	ð

ð 

ð 

ñ /Ô.ð

ð ðØÐ0Ô1ðà	HÔ	ðð ð ñ „[ðð& ðØÐ0Ô1ðà	HÔ	ðð ð ñ „[ðð& ð
Øð
Ø &Ð';Ô <ð
à	ð
ð 
ð 
ñ „[ð
ð  ð
Øð
Ø &Ð';Ô <ð
à	ð
ð 
ð 
ñ „[ð
ð  ðØðØ &Ð'=Ô >ðà	ðð ð ñ „[ðð ðØðØ &Ð'=Ô >ðà	ðð ð ñ „[ðð  Ø+ðð ÐÐÐr&   r   N)%Ústripe._createable_api_resourcer   Ústripe._deletable_api_resourcer   Ústripe._list_objectr   Ústripe._listable_api_resourcer   Ústripe._stripe_objectr   Ústripe._updateable_api_resourcer   Ústripe._utilr	   r
   Útypingr   r   r   r   r   r   Útyping_extensionsr   r   r   Ú#stripe.params._coupon_create_paramsr   Ú#stripe.params._coupon_delete_paramsr   Ú!stripe.params._coupon_list_paramsr   Ú#stripe.params._coupon_modify_paramsr   Ú%stripe.params._coupon_retrieve_paramsr   r   r%   r&   r'   ú<module>r™      s™  ðð BÐ AÐ AÐ AÐ AÐ AØ ?Ð ?Ð ?Ð ?Ð ?Ð ?Ø *Ð *Ð *Ð *Ð *Ð *Ø =Ð =Ð =Ð =Ð =Ð =Ø .Ð .Ð .Ð .Ð .Ð .Ø AÐ AÐ AÐ AÐ AÐ AØ :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ø AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AØ <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ð <àð KØFÐFÐFÐFÐFÐFØFÐFÐFÐFÐFÐFØBÐBÐBÐBÐBÐBØFÐFÐFÐFÐFÐFØJÐJÐJÐJÐJÐJðCð Cð Cð Cð CØ˜(Ô#Ø˜Ô"Ø˜Ô!Ø˜(Ô#ñ	Cô Cð Cð Cð Cr&   