Ë
    <@‹gRQ  ã            	       óÔ   — 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 d d	lmZmZmZmZmZmZ d d
lmZmZmZmZ  G d„ ded   ed   ed   ed   «      Zy)é    )ÚCreateableAPIResource)ÚDeletableAPIResource)Ú
ListObject)ÚListableAPIResource)ÚRequestOptions)ÚStripeObject)ÚUpdateableAPIResource)Úclass_method_variantÚsanitize_id)ÚClassVarÚDictÚListÚOptionalÚcastÚoverload)ÚLiteralÚNotRequiredÚ	TypedDictÚUnpackc                   ó¾  — e Zd ZU dZdZeed      ed<    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ee   ed<   	 ee	   ed<   eed<   	 ee   ed<   	 eeee
f      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ed,      ed-<   	 ed.ed/   d0d fd1„«       Zed.ed/   d0d fd2„«       Zed3ed.ed4   d0d fd5„«       Z e!e"d3ed.ed4   d0d fd6„«       «       Z#e!d.ed4   d0d fd7„«       Z# e$d8«      d.ed4   d0d fd9„«       Z#ed3ed.ed4   d0d fd:„«       Z%e!e"d3ed.ed4   d0d fd;„«       «       Z&e!d.ed4   d0d fd<„«       Z& e$d=«      d.ed4   d0d fd>„«       Z&ed.ed?   d0e'd    fd@„«       Z(ed.ed?   d0e'd    fdA„«       Z)ed"ed.edB   d0d fdC„«       Z*ed"ed.edB   d0d fdD„«       Z+ed"ed.edE   d0d fdF„«       Z,ed"ed.edE   d0d fdG„«       Z-e	e
dHœZ.yI)JÚ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__© ó    úM/var/www/html/AdoubleTech/venv/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'   #   ó   … Ø‹ð	r#   r+   c                   ó  — e Zd ZU ee   ed<   	 ed   ed<   	 ee   ed<   	 eeedf      ed<   	 eed      ed<   	 ee   ed	<   	 ee	e      ed
<   	 ee   ed<   	 ee   ed<   	 ed   ed<   	 ee   ed<   	 ee
   ed<   	 ee   ed<   y)úCoupon.CreateParamsr(   úCoupon.CreateParamsAppliesToÚ
applies_toÚcurrencyú"Coupon.CreateParamsCurrencyOptionsÚcurrency_options©ÚforeverÚonceÚ	repeatingÚdurationÚduration_in_monthsÚexpandÚidÚmax_redemptionsúLiteral['']|Dict[str, str]ÚmetadataÚnameÚpercent_offÚ	redeem_byN)r   r   r   r   r*   r!   r    r   r   r   Úfloatr"   r#   r$   ÚCreateParamsr.   )   s  … Ø Ñ$Ó$ð	ð  Ð >Ñ?Ó?ð	ð ˜cÑ"Ó"ð	ð &Ø�Ð:Ð:Ñ;ñ
ó 	
ð	ð ˜gÐ&DÑEÑFÓFð	ð (¨Ñ,Ó,ð	ð ˜D ™IÑ&Ó&ð	ð ˜ÑÓð	ð % SÑ)Ó)ð	ð Ð:Ñ;Ó;ð	ð ˜#ÑÓð	ð ! Ñ'Ó'ð	ð ˜sÑ#Ó#ð	r#   rC   c                   ó$   — e Zd ZU eee      ed<   y)r/   r   N©r   r   r   r   r   r    r!   r"   r#   r$   ÚCreateParamsAppliesTozCoupon.CreateParamsAppliesToa   s   … Ø˜d 3™iÑ(Ó(ð	r#   rF   c                   ó   — e Zd ZU eed<   y)r2   r(   Nr)   r"   r#   r$   ÚCreateParamsCurrencyOptionsz"Coupon.CreateParamsCurrencyOptionsg   r,   r#   rH   c                   ó   — e Zd Zy)úCoupon.DeleteParamsN)r   r   r   r"   r#   r$   ÚDeleteParamsrJ   m   s   „ Ør#   rK   c                   ól   — e Zd ZU ed   ed<   	 ee   ed<   	 eee      ed<   	 ee   ed<   	 ee   ed<   y)úCoupon.ListParamszCoupon.ListParamsCreated|intÚcreatedÚending_beforer:   ÚlimitÚstarting_afterN)r   r   r   r   r!   r    r   r*   r"   r#   r$   Ú
ListParamsrM   p   s_   … ØÐ;Ñ<Ó<ð	ð # 3Ñ'Ó'ð	ð ˜D ™IÑ&Ó&ð	ð ˜3ÑÓð	ð $ CÑ(Ó(ð	r#   rR   c                   óT   — e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)úCoupon.ListParamsCreatedÚgtÚgteÚltÚlteN)r   r   r   r   r*   r!   r"   r#   r$   ÚListParamsCreatedrT   †   sH   … Ø˜ÑÓð	ð ˜ÑÓð	ð ˜ÑÓð	ð ˜ÑÓð	r#   rY   c                   ód   — e Zd ZU eeedf      ed<   	 eee      ed<   	 ed   ed<   	 ee   ed<   y)úCoupon.ModifyParamsú"Coupon.ModifyParamsCurrencyOptionsr3   r:   r=   r>   r?   N)r   r   r   r   r   r    r!   r   r"   r#   r$   ÚModifyParamsr[   ˜   s]   … Ø%Ø�Ð:Ð:Ñ;ñ
ó 	
ð	ð ˜D ™IÑ&Ó&ð	ð Ð:Ñ;Ó;ð	ð ˜#ÑÓð	r#   r]   c                   ó   — e Zd ZU eed<   y)r\   r(   Nr)   r"   r#   r$   ÚModifyParamsCurrencyOptionsz"Coupon.ModifyParamsCurrencyOptions¬   r,   r#   r_   c                   ó$   — e Zd ZU eee      ed<   y)úCoupon.RetrieveParamsr:   NrE   r"   r#   r$   ÚRetrieveParamsra   ²   s   … Ø˜D ™IÑ&Ó&ð	r#   rb   r(   r0   rN   r1   r3   r4   r8   r9   r;   Úlivemoder<   r>   r?   Úobjectr@   rA   Útimes_redeemedÚvalidTÚdeletedÚ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©rh   )r   Ú_static_requestÚ	class_url©Úclsrh   s     r$   ÚcreatezCoupon.createþ   s6   € ô ØØ×ÑØØ—‘“Øð  ó ó
ð 	
r#   c              ‹   óv   K  — t        d| j                  d| j                  «       |¬«      ƒ d{  –—† «      S 7 Œ­w)rk   r   rl   rm   N)r   Ú_static_request_asyncro   rp   s     r$   Úcreate_asynczCoupon.create_async  sD   è ø€ ô ØØ×+Ñ+ØØ—‘“Øð ,ó ÷ ó
ð 	
ðús   ‚,9®7
¯	9ÚsidrJ   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   Údeleterm   ©ro   r   r   rn   ©rq   rv   rh   Úurls       r$   Ú_cls_deletezCoupon._cls_delete   sE   € ð Ÿ™�¬+°cÔ*:Ð;ˆÜØØ×ÑØØØð  ó ó
ð 	
r#   c                  ó   — y©rx   Nr"   ©rv   rh   s     r$   rz   zCoupon.delete1  s   € ð 	r#   c                  ó   — yr€   r"   ©Úselfrh   s     r$   rz   zCoupon.delete9  s   € ð
 	r#   r~   c                 óF   — | j                  d| j                  «       |¬«      S )rx   rz   rm   )Ú_request_and_refreshÚinstance_urlrƒ   s     r$   rz   zCoupon.delete@  s.   € ð ×(Ñ(ØØ×ÑÓØð )ó 
ð 	
r#   c              ‹   ó–   K  — | j                  «       ›dt        |«      ›�}t        d| j                  d||¬«      ƒ d{  –—† «      S 7 Œ­w)rx   ry   r   rz   rm   N©ro   r   r   rt   r|   s       r$   Ú_cls_delete_asynczCoupon._cls_delete_asyncM  sS   è ø€ ð Ÿ™�¬+°cÔ*:Ð;ˆÜØØ×+Ñ+ØØØð ,ó ÷ ó
ð 	
ðúó   ‚<A	¾A
¿	A	c              ‹   ó   K  — y­wr€   r"   r�   s     r$   Údelete_asynczCoupon.delete_async^  s   è ø€ ð 	ùó   ‚c              ‹   ó   K  — y­wr€   r"   rƒ   s     r$   r�   zCoupon.delete_asynch  s   è ø€ ð 	ùrŽ   rŠ   c              ‹   ób   K  — | j                  d| j                  «       |¬«      ƒ d{  –—† S 7 Œ­w)rx   rz   rm   N)Ú_request_and_refresh_asyncr‡   rƒ   s     r$   r�   zCoupon.delete_asyncq  s<   è ø€ ð ×4Ñ4ØØ×ÑÓØð 5ó 
÷ 
ð 	
ð 
ús   ‚&/¨-©/rM   c                 ó¬   — | j                  d| j                  «       |¬«      }t        |t        «      s!t	        dt        |«      j                  z  «      ‚|S )ú1
        Returns a list of your coupons.
        Úgetrm   ú%Expected list object from API, got %s)rn   ro   Ú
isinstancer   Ú	TypeErrorÚtyper   ©rq   rh   Ú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)r“   r”   rm   Nr•   )rt   ro   r–   r   r—   r˜   r   r™   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.
        ry   r   rl   rm   r{   ©rq   r;   rh   r}   s       r$   ÚmodifyzCoupon.modify¦  sD   € ð Ÿ™�¬+°b¬/Ð:ˆÜØØ×ÑØØØð  ó ó
ð 	
r#   c              ‹   ó–   K  — | j                  «       ›dt        |«      ›�}t        d| j                  d||¬«      ƒ d{  –—† «      S 7 Œ­w)rŸ   ry   r   rl   rm   Nr‰   r    s       r$   Úmodify_asynczCoupon.modify_async·  sR   è ø€ ð Ÿ™�¬+°b¬/Ð:ˆÜØØ×+Ñ+ØØØð ,ó ÷ ó
ð 	
ðúr‹   ra   c                 ó8   —  | |fi |¤Ž}|j                  «        |S )ú9
        Retrieves the coupon with the given ID.
        )Úrefresh©rq   r;   rh   Ú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_asyncÓ  s3   è ø€ ñ �rÑ$˜VÑ$ˆØ×$Ñ$Ó&×&Ð&Øˆð 	'ús   ‚(Ÿ& ()r0   r3   N)/r   r   r   Ú__doc__r   r   r   r!   r   r%   r+   r   rC   r   rF   rH   rK   rR   rY   r]   r_   rb   r   r*   r    r   ÚboolrB   Úclassmethodr   rr   ru   r~   r   Ústaticmethodrz   r
   rŠ   r�   r   r›   r�   r¡   r£   r©   r¬   Ú_inner_class_typesr"   r#   r$   r   r      sà  … ñð 08€K�˜' (Ñ+Ñ,Ó7ô�Lô ô˜,ô ô6�~ô 6ôp 	ô ô iô ô�~ô ô�^ô ô,˜Iô ô$�~ô ô( iô ô˜ô ð ˜‘Óðð ˜Ñ#Ó#ØƒLðð �s‰mÓðð ˜t C¨Ð$8Ñ9Ñ:Ó:ðð Ð4Ñ5Ó5ðð ! ™Ó%ðð 	ƒGðð ƒNðð ˜c‘]Ó"ðð �t˜C ˜H‘~Ñ&Ó&ðð �3‰-Óðð �HÑÓðð ˜%‘Ó ðð ˜‰}Óðð Óðð ƒKðð �g˜d‘mÑ$Ó$ðð ð
˜fÐ%:Ñ;ð 
Àò 
ó ð
ð ð
ØÐ3Ñ4ð
à	ò
ó ð
ð" ð
Øð
Ø!'Ð(=Ñ!>ð
à	ò
ó ð
ð  Øð�Cð  6Ð*?Ñ#@ð ÀXò ó ó ðð ð˜vÐ&;Ñ<ð Àò ó ðñ ˜-Ó(ð

ØÐ4Ñ5ð

à	ò

ó )ð

ð ð
Øð
Ø!'Ð(=Ñ!>ð
à	ò
ó ð
ð  ØðØðØ"Ð#8Ñ9ðà	òó ó ðð ðØÐ4Ñ5ðà	òó ðñ Ð-Ó.ð

ØÐ4Ñ5ð

à	ò

ó /ð

ð ðØÐ1Ñ2ðà	�HÑ	òó ðð& ðØÐ1Ñ2ðà	�HÑ	òó ðð& ð
Øð
Ø &Ð'<Ñ =ð
à	ò
ó ð
ð  ð
Øð
Ø &Ð'<Ñ =ð
à	ò
ó ð
ð  ðØðØ &Ð'>Ñ ?ðà	òó ðð ðØðØ &Ð'>Ñ ?ðà	òó ðð  Ø+ñÑr#   r   N)Ústripe._createable_api_resourcer   Ústripe._deletable_api_resourcer   Ústripe._list_objectr   Ústripe._listable_api_resourcer   Ústripe._request_optionsr   Ústripe._stripe_objectr   Ústripe._updateable_api_resourcer	   Ústripe._utilr
   r   Útypingr   r   r   r   r   r   Útyping_extensionsr   r   r   r   r   r"   r#   r$   ú<module>r¼      sX   ðõ BÝ ?Ý *Ý =Ý 2Ý .Ý Aß :ß A× Aß EÓ EôRØ˜(Ñ#Ø˜Ñ"Ø˜Ñ!Ø˜(Ñ#õ	Rr#   