Ë
    <@‹g8  ã                   ó~   — 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
)é    )ÚCoupon)Ú
ListObject)ÚRequestOptions)ÚStripeService)Úsanitize_id)ÚDictÚListÚcast)ÚLiteralÚNotRequiredÚ	TypedDictc            	       óú  — e Z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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 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d dedee   fd!„Zi i fdd dedee   fd"„Zi i fdd#dedefd$„Zi i fdd#dedefd%„Zy&)'ÚCouponServicec                   ó  — 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)úCouponService.CreateParamsÚ
amount_offú#CouponService.CreateParamsAppliesToÚ
applies_toÚcurrencyú)CouponService.CreateParamsCurrencyOptionsÚcurrency_options)ÚforeverÚonceÚ	repeatingÚdurationÚduration_in_monthsÚexpandÚidÚmax_redemptionsúLiteral['']|Dict[str, str]ÚmetadataÚnameÚpercent_offÚ	redeem_byN)Ú__name__Ú
__module__Ú__qualname__r   ÚintÚ__annotations__Ústrr   r   r	   Úfloat© ó    úU/var/www/html/AdoubleTech/venv/lib/python3.12/site-packages/stripe/_coupon_service.pyÚCreateParamsr      s  … Ø Ñ$Ó$ð	ð  Ð EÑFÓFð	ð ˜cÑ"Ó"ð	ð &Ø�ÐAÐAÑBñ
ó 	
ð	ð ˜gÐ&DÑEÑFÓFð	ð (¨Ñ,Ó,ð	ð ˜D ™IÑ&Ó&ð	ð ˜ÑÓð	ð % SÑ)Ó)ð	ð Ð:Ñ;Ó;ð	ð ˜#ÑÓð	ð ! Ñ'Ó'ð	ð ˜sÑ#Ó#ð	r-   r/   c                   ó$   — e Zd ZU eee      ed<   y)r   ÚproductsN©r%   r&   r'   r   r	   r*   r)   r,   r-   r.   ÚCreateParamsAppliesToz#CouponService.CreateParamsAppliesToE   s   … Ø˜d 3™iÑ(Ó(ð	r-   r3   c                   ó   — e Zd ZU eed<   y)r   r   N©r%   r&   r'   r(   r)   r,   r-   r.   ÚCreateParamsCurrencyOptionsz)CouponService.CreateParamsCurrencyOptionsK   ó   … Ø‹ð	r-   r6   c                   ó   — e Zd Zy)úCouponService.DeleteParamsN)r%   r&   r'   r,   r-   r.   ÚDeleteParamsr9   Q   s   „ Ør-   r:   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)úCouponService.ListParamsz#CouponService.ListParamsCreated|intÚcreatedÚending_beforer   ÚlimitÚstarting_afterN)r%   r&   r'   r   r)   r*   r	   r(   r,   r-   r.   Ú
ListParamsr<   T   s_   … ØÐBÑCÓCð	ð # 3Ñ'Ó'ð	ð ˜D ™IÑ&Ó&ð	ð ˜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)úCouponService.ListParamsCreatedÚgtÚgteÚltÚlteN)r%   r&   r'   r   r(   r)   r,   r-   r.   ÚListParamsCreatedrC   j   sH   … Ø˜ÑÓð	ð ˜ÑÓð	ð ˜ÑÓð	ð ˜ÑÓð	r-   rH   c                   ó$   — e Zd ZU eee      ed<   y)úCouponService.RetrieveParamsr   Nr2   r,   r-   r.   ÚRetrieveParamsrJ   |   s   … Ø˜D ™IÑ&Ó&ð	r-   rK   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)úCouponService.UpdateParamsú)CouponService.UpdateParamsCurrencyOptionsr   r   r    r!   r"   N)r%   r&   r'   r   r   r*   r)   r	   r,   r-   r.   ÚUpdateParamsrM   ‚   s]   … Ø%Ø�ÐAÐAÑBñ
ó 	
ð	ð ˜D ™IÑ&Ó&ð	ð Ð:Ñ;Ó;ð	ð ˜#ÑÓð	r-   rO   c                   ó   — e Zd ZU eed<   y)rN   r   Nr5   r,   r-   r.   ÚUpdateParamsCurrencyOptionsz)CouponService.UpdateParamsCurrencyOptions–   r7   r-   rQ   ÚcouponÚparamsr9   ÚoptionsÚreturnc                 ó|   — t        t        | j                  ddj                  t	        |«      ¬«      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.
        Údeleteú/v1/coupons/{coupon}©rR   Úapi©Úbase_addressrS   rT   ©r
   r   Ú_requestÚformatr   ©ÚselfrR   rS   rT   s       r.   rX   zCouponService.deleteœ   sG   € ô ÜØ�M‰MØØ&×-Ñ-´[ÀÓ5HÐ-ÓIØ"ØØð ó ó	
ð 		
r-   c              ƒ   ó˜   K  — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      ƒ d{  –—† «      S 7 Œ­w)rW   rX   rY   rZ   r[   r\   N©r
   r   Ú_request_asyncr`   r   ra   s       r.   Údelete_asynczCouponService.delete_async°   sW   è ø€ ô ÜØ×%Ñ%ØØ&×-Ñ-´[ÀÓ5HÐ-ÓIØ"ØØð &ó ÷ ó	
ð 		
ðúó   ‚=A
¿A
Á 	A
rJ   c                 ó|   — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      «      S )ú9
        Retrieves the coupon with the given ID.
        ÚgetrY   rZ   r[   r\   r^   ra   s       r.   ÚretrievezCouponService.retrieveÄ   sG   € ô ÜØ�M‰MØØ&×-Ñ-´[ÀÓ5HÐ-ÓIØ"ØØð ó ó	
ð 		
r-   c              ƒ   ó˜   K  — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      ƒ d{  –—† «      S 7 Œ­w)ri   rj   rY   rZ   r[   r\   Nrd   ra   s       r.   Úretrieve_asynczCouponService.retrieve_asyncØ   sW   è ø€ ô ÜØ×%Ñ%ØØ&×-Ñ-´[ÀÓ5HÐ-ÓIØ"ØØð &ó ÷ ó	
ð 		
ðúrg   rM   c                 ó|   — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      «      S )ú‡
        Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
        ÚpostrY   rZ   r[   r\   r^   ra   s       r.   ÚupdatezCouponService.updateì   sG   € ô ÜØ�M‰MØØ&×-Ñ-´[ÀÓ5HÐ-ÓIØ"ØØð ó ó	
ð 		
r-   c              ƒ   ó˜   K  — t        t        | j                  ddj                  t	        |«      ¬«      d||¬«      ƒ d{  –—† «      S 7 Œ­w)ro   rp   rY   rZ   r[   r\   Nrd   ra   s       r.   Úupdate_asynczCouponService.update_async   sW   è ø€ ô ÜØ×%Ñ%ØØ&×-Ñ-´[ÀÓ5HÐ-ÓIØ"ØØð &ó ÷ ó	
ð 		
ðúrg   r<   c           
      óX   — t        t        t           | j                  ddd||¬«      «      S )ú1
        Returns a list of your coupons.
        rj   ú/v1/couponsr[   r\   )r
   r   r   r_   ©rb   rS   rT   s      r.   ÚlistzCouponService.list  s9   € ô Ü”vÑØ�M‰MØØØ"ØØð ó ó	
ð 		
r-   c           
   ƒ   ót   K  — t        t        t           | j                  ddd||¬«      ƒ d{  –—† «      S 7 Œ­w)ru   rj   rv   r[   r\   N)r
   r   r   re   rw   s      r.   Ú
list_asynczCouponService.list_async'  sI   è ø€ ô Ü”vÑØ×%Ñ%ØØØ"ØØð &ó ÷ ó	
ð 		
ðús   ‚+8­6
®	8r   c           
      óJ   — t        t        | j                  d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.
        rp   rv   r[   r\   )r
   r   r_   rw   s      r.   ÚcreatezCouponService.create:  s4   € ô ÜØ�M‰MØØØ"ØØð ó ó	
ð 		
r-   c           
   ƒ   óf   K  — t        t        | j                  ddd||¬«      ƒ d{  –—† «      S 7 Œ­w)r|   rp   rv   r[   r\   N)r
   r   re   rw   s      r.   Úcreate_asynczCouponService.create_asyncO  sD   è ø€ ô ÜØ×%Ñ%ØØØ"ØØð &ó ÷ ó	
ð 		
ðús   ‚$1¦/
§	1N)r%   r&   r'   r   r/   r3   r6   r:   rA   rH   rK   rO   rQ   r*   r   r   rX   rf   rk   rm   rq   rs   r   rx   rz   r}   r   r,   r-   r.   r   r      sO  „ ô6�yô 6ôp 	ô ô iô ô�yô ô�Yô ô,˜Iô ô$˜ô ô�yô ô( iô ð 02Ø"$ñ	
àð
ð -ð
ð  ð	
ð
 
ó
ð. 02Ø"$ñ	
àð
ð -ð
ð  ð	
ð
 
ó
ð. 24Ø"$ñ	
àð
ð /ð
ð  ð	
ð
 
ó
ð. 24Ø"$ñ	
àð
ð /ð
ð  ð	
ð
 
ó
ð. 02Ø"$ñ	
àð
ð -ð
ð  ð	
ð
 
ó
ð. 02Ø"$ñ	
àð
ð -ð
ð  ð	
ð
 
ó
ð, .0Ø"$ñ
à*ð
ð  ð
ð 
�FÑ	ó	
ð* .0Ø"$ñ
à*ð
ð  ð
ð 
�FÑ	ó	
ð* 02Ø"$ñ
à,ð
ð  ð
ð 
ó	
ð. 02Ø"$ñ
à,ð
ð  ð
ð 
ô	
r-   r   N)Ústripe._couponr   Ústripe._list_objectr   Ústripe._request_optionsr   Ústripe._stripe_servicer   Ústripe._utilr   Útypingr   r	   r
   Útyping_extensionsr   r   r   r   r,   r-   r.   ú<module>r‡      s0   ðõ "Ý *Ý 2Ý 0Ý $ß #Ñ #ß =Ñ =ôV
�Mõ V
r-   