o
    i(                     @   s   d dl mZ d dlmZ d dlmZmZ d dlmZ erRd 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 deZdS )    )StripeService)sanitize_id)Optionalcast)TYPE_CHECKING)
ListObject)RequestOptions)SubscriptionSchedule) SubscriptionScheduleCancelParams) SubscriptionScheduleCreateParams)SubscriptionScheduleListParams)!SubscriptionScheduleReleaseParams)"SubscriptionScheduleRetrieveParams) SubscriptionScheduleUpdateParamsc                	   @   s  e Zd Z		d'ded ded ddfdd	Z		d'ded ded ddfd
dZ		d'ded ded ddfddZ		d'ded ded ddfddZ		d'deded ded ddfddZ			d'deded ded ddfddZ
		d'deded ded ddfddZ		d'deded ded ddfddZ		d'deded ded ddfddZ		d'deded ded ddfd d!Z		d'deded" ded ddfd#d$Z		d'deded" ded ddfd%d&ZdS )(SubscriptionScheduleServiceNparamsr   optionsr   return ListObject[SubscriptionSchedule]c              	   C      t d| jd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    r    /var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/_subscription_schedule_service.pylist!      z SubscriptionScheduleService.listc              	      "   t d| jddd||dI dH S )r   r   r   r   r   r   Nr   _request_asyncr   r    r    r!   
list_async4      
z&SubscriptionScheduleService.list_asyncr   r	   c              	   C   r   )
        Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
        r	   postr   r   r   r   r   r    r    r!   createG   r#   z"SubscriptionScheduleService.createc              	      r$   )r)   r	   r*   r   r   r   Nr%   r   r    r    r!   create_asyncZ   r(   z(SubscriptionScheduleService.create_asyncscheduler   c              	   C   &   t d| jddjt|dd||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}r-   r   r   r   r   formatr   r   r-   r   r   r    r    r!   retrievem      	z$SubscriptionScheduleService.retrievec              	      .   t d| jddjt|dd||dI dH S )r/   r	   r   r0   r1   r   r   Nr   r&   r3   r   r4   r    r    r!   retrieve_async      	
z*SubscriptionScheduleService.retrieve_asyncr   c              	   C   r.   )<
        Updates an existing subscription schedule.
        r	   r*   r0   r1   r   r   r2   r4   r    r    r!   update   r6   z"SubscriptionScheduleService.updatec              	      r7   )r;   r	   r*   r0   r1   r   r   Nr8   r4   r    r    r!   update_async   r:   z(SubscriptionScheduleService.update_asyncr
   c              	   C   r.   )
        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}/cancelr1   r   r   r2   r4   r    r    r!   cancel   r6   z"SubscriptionScheduleService.cancelc              	      r7   )r>   r	   r*   r?   r1   r   r   Nr8   r4   r    r    r!   cancel_async   r:   z(SubscriptionScheduleService.cancel_asyncr   c              	   C   r.   )  
        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}/releaser1   r   r   r2   r4   r    r    r!   release   r6   z#SubscriptionScheduleService.releasec              	      r7   )rB   r	   r*   rC   r1   r   r   Nr8   r4   r    r    r!   release_async  r:   z)SubscriptionScheduleService.release_async)NN)__name__
__module____qualname__r   r"   r'   r+   r,   strr5   r9   r<   r=   r@   rA   rD   rE   r    r    r    r!   r       s    










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   r    r    r    r!   <module>   s   