
    Ai(                         d dl mZ d dlmZ d dlmZmZ d dlmZ er6d 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 d dlmZ  G d de      Zy)    )StripeService)sanitize_id)Optionalcast)TYPE_CHECKING)
ListObject)RequestOptions)SubscriptionSchedule) SubscriptionScheduleCancelParams) SubscriptionScheduleCreateParams)SubscriptionScheduleListParams)!SubscriptionScheduleReleaseParams)"SubscriptionScheduleRetrieveParams) SubscriptionScheduleUpdateParamsc            	          e Zd Z	 	 dded   ded   ddfdZ	 	 dded   ded   ddfd	Z	 	 dded
   ded   ddfdZ	 	 dded
   ded   ddfdZ	 	 ddeded   ded   ddfdZ		 	 ddeded   ded   ddfdZ
	 	 ddeded   ded   ddfdZ	 	 ddeded   ded   ddfdZ	 	 ddeded   ded   ddfdZ	 	 ddeded   ded   ddfdZ	 	 ddeded   ded   ddfdZ	 	 ddeded   ded   ddfdZy)SubscriptionScheduleServiceNparamsr   optionsr	   return ListObject[SubscriptionSchedule]c           
      B    t        d| j                  ddd||            S )D
        Retrieves the list of your subscription schedules.
        r   get/v1/subscription_schedulesapibase_addressr   r   r   _requestselfr   r   s      X/var/www/html/immo/lib/python3.12/site-packages/stripe/_subscription_schedule_service.pylistz SubscriptionScheduleService.list!   s4     .MM,"  	
 		
    c           
      ^   K   t        d| j                  ddd||       d{         S 7 w)r   r   r   r   r   r   Nr   _request_asyncr    s      r"   
list_asyncz&SubscriptionScheduleService.list_async4   sD      .%%," &  	
 		
    -+
	-r   r
   c           
      B    t        d| j                  ddd||            S )
        Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
        r
   postr   r   r   r   r    s      r"   createz"SubscriptionScheduleService.createG   s4     "MM,"  	
 		
r$   c           
      ^   K   t        d| j                  ddd||       d{         S 7 w)r+   r
   r,   r   r   r   Nr&   r    s      r"   create_asyncz(SubscriptionScheduleService.create_asyncZ   sD      "%%," &  	
 		
r)   scheduler   c                 t    t        d| j                  ddj                  t        |            d||            S )
        Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.
        r
   r   %/v1/subscription_schedules/{schedule}r0   r   r   r   r   formatr   r!   r0   r   r   s       r"   retrievez$SubscriptionScheduleService.retrievem   sN     "MM7>>(2 ?  #  
 	
r$   c                    K   t        d| j                  ddj                  t        |            d||       d{         S 7 w)r2   r
   r   r3   r4   r   r   Nr   r'   r6   r   r7   s       r"   retrieve_asyncz*SubscriptionScheduleService.retrieve_async   s^      "%%7>>(2 ?  # &  
 	
   9AA
	Ar   c                 t    t        d| j                  ddj                  t        |            d||            S )<
        Updates an existing subscription schedule.
        r
   r,   r3   r4   r   r   r5   r7   s       r"   updatez"SubscriptionScheduleService.update   sN     "MM7>>(2 ?  #  
 	
r$   c                    K   t        d| j                  ddj                  t        |            d||       d{         S 7 w)r>   r
   r,   r3   r4   r   r   Nr:   r7   s       r"   update_asyncz(SubscriptionScheduleService.update_async   s^      "%%7>>(2 ?  # &  
 	
r<   r   c                 t    t        d| j                  ddj                  t        |            d||            S )
        Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
        r
   r,   ,/v1/subscription_schedules/{schedule}/cancelr4   r   r   r5   r7   s       r"   cancelz"SubscriptionScheduleService.cancel   sO     "MM>EE(2 F  #  
 	
r$   c                    K   t        d| j                  ddj                  t        |            d||       d{         S 7 w)rC   r
   r,   rD   r4   r   r   Nr:   r7   s       r"   cancel_asyncz(SubscriptionScheduleService.cancel_async   s_      "%%>EE(2 F  # &  
 	
r<   r   c                 t    t        d| j                  ddj                  t        |            d||            S )  
        Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
        r
   r,   -/v1/subscription_schedules/{schedule}/releaser4   r   r   r5   r7   s       r"   releasez#SubscriptionScheduleService.release   sO     "MM?FF(2 G  #  
 	
r$   c                    K   t        d| j                  ddj                  t        |            d||       d{         S 7 w)rI   r
   r,   rJ   r4   r   r   Nr:   r7   s       r"   release_asyncz)SubscriptionScheduleService.release_async  s_      "%%?FF(2 G  # &  
 	
r<   )NN)__name__
__module____qualname__r   r#   r(   r-   r/   strr8   r;   r?   rA   rE   rG   rK   rM    r$   r"   r   r       s    >B.2
9:
 *+
 
,	
* >B.2
9:
 *+
 
,	
* @D.2
;<
 *+
 
 	
* @D.2
;<
 *+
 
 	
, BF.2	

 =>
 *+	

 
 
2 BF.2	

 =>
 *+	

 
 
2 @D.2	

 ;<
 *+	

 
 
2 @D.2	

 ;<
 *+	

 
 
2 @D.2	

 ;<
 *+	

 
 
2 @D.2	

 ;<
 *+	

 
 
2 AE.2	

 <=
 *+	

 
 
2 AE.2	

 <=
 *+	

 
 
r$   r   N)stripe._stripe_servicer   stripe._utilr   typingr   r   typing_extensionsr   stripe._list_objectr   stripe._request_optionsr	   stripe._subscription_scheduler
   2stripe.params._subscription_schedule_cancel_paramsr   2stripe.params._subscription_schedule_create_paramsr   0stripe.params._subscription_schedule_list_paramsr   3stripe.params._subscription_schedule_release_paramsr   4stripe.params._subscription_schedule_retrieve_paramsr   2stripe.params._subscription_schedule_update_paramsr   r   rR   r$   r"   <module>r`      sK    1 $ ! +.6B
{
- {
r$   