
    Ch3                     ~    S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
JrJrJr  S SKJrJrJr   " S S	\5      rg
)    )
ListObject)PromotionCode)RequestOptions)StripeService)sanitize_id)DictListcast)LiteralNotRequired	TypedDictc            	          \ rS rSr " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      r0 0 4SSS\S\\   4S jjr0 0 4SSS\S\\   4S jjr0 4SSS\S\4S jjr0 4SSS\S\4S jjr0 0 4S\SSS\S\4S jjr0 0 4S\SSS\S\4S  jjr0 0 4S\SS!S\S\4S" jjr0 0 4S\SS!S\S\4S# jjrS$rg%)&PromotionCodeService   c                       \ rS rSr% \\   \S'    \\   \S'    \\S'    \\   \S'    \\\      \S'    \\	   \S'    \\	   \S'    \\
\\4      \S	'    \S
   \S'   Srg)!PromotionCodeService.CreateParams   activecodecouponcustomerexpand
expires_atmax_redemptionsmetadata-PromotionCodeService.CreateParamsRestrictionsrestrictions N)__name__
__module____qualname____firstlineno__r   bool__annotations__strr	   intr   __static_attributes__r       a/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/stripe/_promotion_code_service.pyCreateParamsr      s    D!!	 #	
 	 c""	 DI&&	  $$	 %S))	 d38n--	 ";
 	
	r(   r*   c                   f    \ rS rSr% \\\S4      \S'    \\   \S'    \\	   \S'    \\   \S'   Sr
g)	r   7   <PromotionCodeService.CreateParamsRestrictionsCurrencyOptionscurrency_optionsfirst_time_transactionminimum_amountminimum_amount_currencyr   N)r   r    r!   r"   r   r   r%   r$   r#   r&   r'   r   r(   r)   CreateParamsRestrictions-PromotionCodeService.CreateParamsRestrictions7   s^    %NP
 	
	 !,D 11	 $C((	 "-S!11	r(   r2   c                   &    \ rS rSr% \\   \S'   Srg)r-   N   r0   r   Nr   r    r!   r"   r   r&   r$   r'   r   r(   r)   'CreateParamsRestrictionsCurrencyOptions<PromotionCodeService.CreateParamsRestrictionsCurrencyOptionsN       #C((	r(   r7   c                       \ rS rSr% \\   \S'    \\   \S'    \\   \S'    \S   \S'    \\   \S'    \\   \S'    \\\      \S	'    \\	   \S
'    \\   \S'   Sr
g)PromotionCodeService.ListParamsT   r   r   r   z*PromotionCodeService.ListParamsCreated|intcreatedr   ending_beforer   limitstarting_afterr   N)r   r    r!   r"   r   r#   r$   r%   r	   r&   r'   r   r(   r)   
ListParamsr;   T   s    D!!	 #	 C  	 IJJ	 c""	 #3''	 DI&&	 3	 $C((	r(   rA   c                   \    \ rS rSr% \\   \S'    \\   \S'    \\   \S'    \\   \S'   Srg)&PromotionCodeService.ListParamsCreatedz   gtgteltlter   Nr6   r   r(   r)   ListParamsCreatedrC   z   sH    	 	 	 	r(   rI   c                   ,    \ rS rSr% \\\      \S'   Srg)#PromotionCodeService.RetrieveParams   r   r   N)	r   r    r!   r"   r   r	   r%   r$   r'   r   r(   r)   RetrieveParamsrK      s    DI&&	r(   rM   c                   b    \ rS rSr% \\   \S'    \\\      \S'    \S   \S'    \S   \S'   Sr	g	)
!PromotionCodeService.UpdateParams   r   r   zLiteral['']|Dict[str, str]r   -PromotionCodeService.UpdateParamsRestrictionsr   r   N)
r   r    r!   r"   r   r#   r$   r	   r%   r'   r   r(   r)   UpdateParamsrO      sR    D!!	 DI&&	 :;;	 ";
 	
	r(   rR   c                   0    \ rS rSr% \\\S4      \S'   Srg)rQ      <PromotionCodeService.UpdateParamsRestrictionsCurrencyOptionsr.   r   N)	r   r    r!   r"   r   r   r%   r$   r'   r   r(   r)   UpdateParamsRestrictions-PromotionCodeService.UpdateParamsRestrictions   s(    %NP
 	
	r(   rV   c                   &    \ rS rSr% \\   \S'   Srg)rU      r0   r   Nr6   r   r(   r)   'UpdateParamsRestrictionsCurrencyOptions<PromotionCodeService.UpdateParamsRestrictionsCurrencyOptions   r9   r(   rZ   paramsr;   optionsreturnc                 R    [        [        [           U R                  SSSUUS95      $ ))
Returns a list of your promotion codes.
get/v1/promotion_codesapibase_addressr\   r]   )r
   r   r   _requestselfr\   r]   s      r)   listPromotionCodeService.list   s9     }%MM%"  	
 		
r(   c                 n   #    [        [        [           U R                  SSSUUS9I Sh  vN 5      $  N7f)r`   ra   rb   rc   rd   N)r
   r   r   _request_asyncrg   s      r)   
list_asyncPromotionCodeService.list_async   sH      }%%%%" &  	
 		
s   (53
	5r   c                 D    [        [        U R                  SSSUUS95      $ )
A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
postrb   rc   rd   )r
   r   rf   rg   s      r)   createPromotionCodeService.create   s4     MM%"  	
 		
r(   c                 `   #    [        [        U R                  SSSUUS9I Sh  vN 5      $  N7f)rp   rq   rb   rc   rd   N)r
   r   rl   rg   s      r)   create_async!PromotionCodeService.create_async   sC      %%%" &  	
 		
s   !.,
	.promotion_coderK   c                 p    [        [        U R                  SSR                  [	        U5      S9SUUS95      $ )
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://docs.stripe.com/docs/api/promotion_codes/list) with the desired code.
ra   $/v1/promotion_codes/{promotion_code}rw   rc   rd   r
   r   rf   formatr   rh   rw   r\   r]   s       r)   retrievePromotionCodeService.retrieve  sN     MM6==#.~#> >  #  
 	
r(   c                    #    [        [        U R                  SSR                  [	        U5      S9SUUS9I Sh  vN 5      $  N7f)ry   ra   rz   r{   rc   rd   Nr
   r   rl   r}   r   r~   s       r)   retrieve_async#PromotionCodeService.retrieve_async  s]      %%6==#.~#> >  # &  
 	
   7AA
	ArO   c                 p    [        [        U R                  SSR                  [	        U5      S9SUUS95      $ )
Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
rq   rz   r{   rc   rd   r|   r~   s       r)   updatePromotionCodeService.update/  sN     MM6==#.~#> >  #  
 	
r(   c                    #    [        [        U R                  SSR                  [	        U5      S9SUUS9I Sh  vN 5      $  N7f)r   rq   rz   r{   rc   rd   Nr   r~   s       r)   update_async!PromotionCodeService.update_asyncE  s]      %%6==#.~#> >  # &  
 	
r   r   N)r   r    r!   r"   r   r*   r2   r7   rA   rI   rM   rR   rV   rZ   r   r   r   ri   rm   rr   ru   r%   r   r   r   r   r'   r   r(   r)   r   r      s   (y (T9 .) $Y $LI $ y (	9 	)  57"$
1
  
 
M	"	
* 57"$
1
  
 
M	"	
, #%
3
  
 
	
, #%
3
  
 
	
, 9;"$	

 6
  	

 

2 9;"$	

 6
  	

 

2 79"$	

 4
  	

 

2 79"$	

 4
  	

 

 
r(   r   N)stripe._list_objectr   stripe._promotion_coder   stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr   typingr   r	   r
   typing_extensionsr   r   r   r   r   r(   r)   <module>r      s0    + 0 2 0 $ # # = =M
= M
r(   