Ë
    ¸Ai^7  ã            	       ó  — 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$y)é    )Ú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                   óø  — 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#y7)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://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
    [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
    ÚcouponÚOBJECT_NAMEc                   ó   — e Zd ZU ee   ed<   y)úCoupon.AppliesToÚproductsN)Ú__name__Ú
__module__Ú__qualname__r   ÚstrÚ__annotations__© ó    úA/var/www/html/immo/lib/python3.12/site-packages/stripe/_coupon.pyÚ	AppliesTor   #   s   … Øs‘)Óð	r&   r(   c                   ó   — e Zd ZU eed<   y)ú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                 óZ   — t        d| j                  d| j                  «       |¬«      «      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   s6   € ô ØØ×ÑØØ—‘“Øð  ó ó
ð 	
r&   c              ‹   óv   K  — t        d| j                  d| j                  «       |¬«      ƒ d{  –—† «      S 7 Œ­w)rE   r   rF   rG   N)r   Ú_static_request_asyncrI   rJ   s     r'   Úcreate_asynczCoupon.create_async…   sD   è ø€ ô ØØ×+Ñ+ØØ—‘“Øð ,ó ÷ ó
ð 	
ðús   ‚,9®7
¯	9Úsidr   c                 óz   — | j                  «       ›dt        |«      ›}t        d| j                  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—   sE   € ð Ÿ™¬+°cÔ*:Ð;ˆÜØØ×ÑØØØð  ó ó
ð 	
r&   c                  ó   — y©rR   Nr%   ©rP   rB   s     r'   rT   zCoupon.delete¨   s   € ð 	r&   c                  ó   — yrZ   r%   ©ÚselfrB   s     r'   rT   zCoupon.delete°   s   € ð
 	r&   rX   c                 óF   — | j                  d| j                  «       |¬«      S )rR   rT   rG   )Ú_request_and_refreshÚinstance_urlr]   s     r'   rT   zCoupon.delete·   s.   € ð ×(Ñ(ØØ×ÑÓØð )ó 
ð 	
r&   c              ‹   ó–   K  — | j                  «       ›dt        |«      ›}t        d| j                  d||¬«      ƒ d{  –—† «      S 7 Œ­w)rR   rS   r   rT   rG   N©rI   r
   r   rN   rV   s       r'   Ú_cls_delete_asynczCoupon._cls_delete_asyncÄ   sS   è ø€ ð Ÿ™¬+°cÔ*:Ð;ˆÜØØ×+Ñ+ØØØð ,ó ÷ ó
ð 	
ðúó   ‚<A	¾A
¿	A	c              ‹   ó   K  — y­wrZ   r%   r[   s     r'   Údelete_asynczCoupon.delete_asyncÕ   s   è ø€ ð 	ùó   ‚c              ‹   ó   K  — y­wrZ   r%   r]   s     r'   rg   zCoupon.delete_asyncß   s   è ø€ ð 	ùrh   rd   c              ‹   ób   K  — | j                  d| j                  «       |¬«      ƒ d{  –—† S 7 Œ­w)rR   rT   rG   N)Ú_request_and_refresh_asyncra   r]   s     r'   rg   zCoupon.delete_asyncè   s<   è ø€ ð ×4Ñ4ØØ×ÑÓØð 5ó 
÷ 
ð 	
ð 
ús   ‚&/¨-©/r   c                 ó¬   — | j                  d| j                  «       |¬«      }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õ   s]   € ð ×$Ñ$ØØM‰M‹OØð %ó 
ˆô
 ˜&¤*Ô-ÜØ7Ü˜“<×(Ñ(ñ*óð ð
 ˆr&   c              ‹   óÈ   K  — | j                  d| j                  «       |¬«      ƒ d{  –—† }t        |t        «      s!t	        dt        |«      j                  z  «      ‚|S 7 Œ7­w)rm   rn   rG   Nro   )rN   rI   rp   r   rq   rr   r    rs   s      r'   Ú
list_asynczCoupon.list_async	  sk   è ø€ ð ×0Ñ0ØØM‰M‹OØð 1ó 
÷ 
ˆô
 ˜&¤*Ô-ÜØ7Ü˜“<×(Ñ(ñ*óð ð
 ˆð
ús   ‚&A"¨A ©8A"r   c                 óz   — | j                  «       ›dt        |«      ›}t        d| j                  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  sD   € ð Ÿ™¬+°b¬/Ð:ˆÜØØ×ÑØØØð  ó ó
ð 	
r&   c              ‹   ó–   K  — | j                  «       ›dt        |«      ›}t        d| j                  d||¬«      ƒ d{  –—† «      S 7 Œ­w)ry   rS   r   rF   rG   Nrc   rz   s       r'   Úmodify_asynczCoupon.modify_async.  sR   è ø€ ð Ÿ™¬+°b¬/Ð:ˆÜØØ×+Ñ+ØØØð ,ó ÷ ó
ð 	
ðúre   r   c                 ó8   —  | |fi |¤Ž}|j                  «        |S )ú9
        Retrieves the coupon with the given ID.
        )Úrefresh©rK   r8   rB   Úinstances       r'   ÚretrievezCoupon.retrieve?  s$   € ñ rÑ$˜VÑ$ˆØ×ÑÔØˆr&   c              ‹   óT   K  —  | |fi |¤Ž}|j                  «       ƒ d{  –—†  |S 7 Œ­w)r   N)Úrefresh_asyncr   s       r'   Úretrieve_asynczCoupon.retrieve_asyncJ  s3   è ø€ ñ rÑ$˜VÑ$ˆØ×$Ñ$Ó&×&Ð&Øˆð 	'ús   ‚(Ÿ& ()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   rg   r   ru   rw   r{   r}   rƒ   r†   Ú_inner_class_typesr%   r&   r'   r   r      ss  … ñð 08€K˜' (Ñ+Ñ,Ó7ôLô ô˜,ô ð ˜‘Óðð ˜Ñ#Ó#ØƒLðð s‰mÓðð ˜t C¨Ð$8Ñ9Ñ:Ó:ðð g˜d‘mÑ$Ó$ðð Ð4Ñ5Ó5ðð ! ™Ó%ðð 	ƒGðð ƒNðð ˜c‘]Ó"ðð t˜C ˜H‘~Ñ&Ó&ðð 3‰-Óðð HÑÓðð ˜%‘Ó ðð ˜‰}Óðð Óðð ƒKðð ð
˜fÐ%9Ñ:ð 
¸xò 
ó ð
ð ð
ØÐ2Ñ3ð
à	ò
ó ð
ð" ð
Øð
Ø!'Ð(<Ñ!=ð
à	ò
ó ð
ð  ØðCð  6Ð*>Ñ#?ð ÀHò ó ó ðð ð˜vÐ&:Ñ;ð Àò ó ðñ ˜-Ó(ð

ØÐ3Ñ4ð

à	ò

ó )ð

ð ð
Øð
Ø!'Ð(<Ñ!=ð
à	ò
ó ð
ð  ØðØðØ"Ð#7Ñ8ðà	òó ó ðð ðØÐ3Ñ4ðà	òó ðñ Ð-Ó.ð

ØÐ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›      sg   ðõ BÝ ?Ý *Ý =Ý .Ý Aß :ß A× Aß <Ñ <áÝFÝFÝBÝFÝJôCØ˜(Ñ#Ø˜Ñ"Ø˜Ñ!Ø˜(Ñ#õ	Cr&   