o
    Bi݆                    @   sd  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mZ erd 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/m0Z0 d dl1m2Z2 d dl3m4Z4 d dl5m6Z6 d dl7m8Z8 G dd ded ed ed Z9dS )    )CreateableAPIResource)ExpandableField)
ListObject)ListableAPIResource)RequestOptions)StripeObject)UpdateableAPIResource)class_method_variantsanitize_id)ClassVarDictListOptionalcastoverload)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)Account)Application)Coupon)Customer)Discount)PaymentMethod)Plan)Price)PromotionCode)Subscription)TaxId)TaxRate)	TestClockc                   @   s  e Zd ZU dZdZeed  ed< G dd deZ	G dd deZ
G dd	 d	eZG d
d deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG d d! d!eZG d"d# d#eZG d$d% d%eZG d&d' d'eZG d(d) d)eZG d*d+ d+eZG d,d- d-eZG d.d/ d/eZ G d0d1 d1eZ!G d2d3 d3eZ"G d4d5 d5eZ#G d6d7 d7eZ$G d8d9 d9eZ%G d:d; d;eZ&G d<d= d=eZ'G d>d? d?eZ(G d@dA dAeZ)G dBdC dCeZ*G dDdE dEeZ+G dFdG dGeZ,G dHdI dIeZ-G dJdK dKeZ.G dLdM dMeZ/G dNdO dOeZ0G dPdQ dQeZ1G dRdS dSeZ2G dTdU dUeZ3G dVdW dWeZ4G dXdY dYeZ5G dZd[ d[eZ6G d\d] d]eZ7G d^d_ d_eZ8G d`da daeZ9G dbdc dceZ:G ddde deeZ;G dfdg dgeZ<G dhdi dieZ=G djdk dkeZ>G dldm dmeZ?G dndo doeZ@G dpdq dqeZAG drds dseZBG dtdu dueZCG dvdw dweZDG dxdy dyeZEeFeGdz  ed{< 	 eFeH ed|< 	 eFeH ed}< 	 eHed~< 	 eFe	 ed< 	 eGd ed< 	 e
ed< ed ed< 	 eIed< 	 eJed< 	 eFeKeIeIf  ed< 	 ed ed< 	 eLe ed< 	 eFeH ed< 	 eFeI ed< 	 ed ed< 	 eFeGd  ed< 	 eFeGd  ed< 	 eMdeIdeNd dd fddZOePeQdeIdeNd dd fddZRePdeNd dd fddZReSddeNd dd fddZReMdeIdeNd dd fddZTePeQdeIdeNd dd fddZUePdeNd dd fddZUeSddeNd dd fddZUeMdeNd dd fddZVeMdeNd dd fddZWeMdeNd deXd  fddZYeMdeNd deXd  fddZZeMdeIdeNd dd fddZ[eMdeIdeNd dd fddZ\eMdeIdeNd dd fddZ]ePeQdeIdeNd dd fddZ^ePdeNd dd fddZ^eSddeNd dd fddZ^eMdeIdeNd dd fddZ_ePeQdeIdeNd dd fddZ`ePdeNd dd fddZ`eSddeNd dd fddZ`eMdeIdeNd dd fddĄZaeMdeIdeNd dd fddƄZbe	e
edǜZcdS )SubscriptionSchedulez
    A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.

    Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
    subscription_scheduleOBJECT_NAMEc                   @   s    e Zd ZU eed< 	 eed< dS )z!SubscriptionSchedule.CurrentPhaseend_date
start_dateN__name__
__module____qualname__int__annotations__ r.   r.   ]/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_subscription_schedule.pyCurrentPhase3   s
   
 r0   c                   @   s   e Zd ZU G dd deZG dd deZG dd deZG dd deZee	 e
d	< 	 ee e
d
< ed e
d< 	 ee e
d< 	 eed  e
d< 	 eed  e
d< 	 ee e
d< 	 ee
d< eed  e
d< 	 ee e
d< 	 eeeedZdS )z$SubscriptionSchedule.DefaultSettingsc                   @   >   e Zd ZU G dd deZeed< 	 ee ed< 	 deiZdS )z1SubscriptionSchedule.DefaultSettings.AutomaticTaxc                   @   ,   e Zd ZU eed  ed< 	 ed ed< dS )z;SubscriptionSchedule.DefaultSettings.AutomaticTax.Liabilityr   accountr3   selftypeNr)   r*   r+   r   r   r-   r   r.   r.   r.   r/   	Liability?   
   
 r8   enabled	liabilityN	r)   r*   r+   r   r8   boolr-   r   _inner_class_typesr.   r.   r.   r/   AutomaticTax>      
 
r?   c                   @   (   e Zd ZU ee ed< 	 ee ed< dS )z6SubscriptionSchedule.DefaultSettings.BillingThresholds
amount_gtereset_billing_cycle_anchorNr)   r*   r+   r   r,   r-   r=   r.   r.   r.   r/   BillingThresholdsS   
   
 rE   c                   @   sR   e Zd ZU G dd deZeeed   ed< 	 ee	 ed< 	 eed< deiZ
dS )z4SubscriptionSchedule.DefaultSettings.InvoiceSettingsc                   @   r2   )z;SubscriptionSchedule.DefaultSettings.InvoiceSettings.Issuerr   r3   r4   r6   Nr7   r.   r.   r.   r/   Issuer^   r9   rG   r    account_tax_idsdays_until_dueissuerNr)   r*   r+   r   rG   r   r   r   r-   r,   r>   r.   r.   r.   r/   InvoiceSettings]   s   
 
rL   c                   @   (   e Zd ZU ee ed< 	 ed ed< dS )z1SubscriptionSchedule.DefaultSettings.TransferDataamount_percentr   destinationNr)   r*   r+   r   floatr-   r   r.   r.   r.   r/   TransferDatas   rF   rR   application_fee_percentautomatic_tax	automaticphase_startbilling_cycle_anchorbilling_thresholdscharge_automaticallysend_invoicecollection_methodr   default_payment_methoddescriptioninvoice_settingsr   on_behalf_oftransfer_data)rT   rY   r`   rb   N)r)   r*   r+   r   r?   rE   rL   rR   r   rQ   r-   r   r   strr>   r.   r.   r.   r/   DefaultSettings=   s<   
 


rd   c                   @   s  e Zd ZU G dd deZG dd deZG dd deZG dd deZG d	d
 d
eZG dd deZ	G dd deZ
ee ed< 	 ee ed< 	 ee ed< eed  ed< 	 ee ed< 	 eed  ed< 	 eed  ed< 	 eed< 	 eed  ed< 	 eed  ed< 	 ee ed< 	 ee ed< 	 eed < 	 ee ed!< 	 ee	 ed"< 	 eeeef  ed#< 	 eed$  ed%< 	 ed& ed'< 	 eed(< 	 ee
 ed)< 	 ee ed*< 	 eeeeee	e
d+Zd,S )-zSubscriptionSchedule.Phasec                   @   sb   e Zd ZU G dd deZee ed< 	 ed ed< 	 ee	 ed< 	 eed  ed< 	 deiZ
d	S )
z)SubscriptionSchedule.Phase.AddInvoiceItemc                   @   B   e Zd ZU eed  ed< 	 eed  ed< 	 eed  ed< dS )z2SubscriptionSchedule.Phase.AddInvoiceItem.Discountr   couponDiscountResourcediscountr   promotion_codeNr)   r*   r+   r   r   r-   r.   r.   r.   r/   r         
 r   	discountsr   pricequantityr!   	tax_ratesN)r)   r*   r+   r   r   r   r-   r   r   r,   r>   r.   r.   r.   r/   AddInvoiceItem   s   
 rp   c                   @   r1   )z'SubscriptionSchedule.Phase.AutomaticTaxc                   @   r2   )z1SubscriptionSchedule.Phase.AutomaticTax.Liabilityr   r3   r4   r6   Nr7   r.   r.   r.   r/   r8      r9   r8   r:   r;   Nr<   r.   r.   r.   r/   r?      r@   r?   c                   @   rA   )z,SubscriptionSchedule.Phase.BillingThresholdsrB   rC   NrD   r.   r.   r.   r/   rE      rF   rE   c                   @   re   )z#SubscriptionSchedule.Phase.Discountr   rf   rg   rh   r   ri   Nrj   r.   r.   r.   r/   r      rk   r   c                   @   sX   e Zd ZU G dd deZeeed   ed< 	 ee	 ed< 	 ee ed< 	 deiZ
dS )z*SubscriptionSchedule.Phase.InvoiceSettingsc                   @   r2   )z1SubscriptionSchedule.Phase.InvoiceSettings.Issuerr   r3   r4   r6   Nr7   r.   r.   r.   r/   rG      r9   rG   r    rH   rI   rJ   NrK   r.   r.   r.   r/   rL      s   
 
rL   c                   @   s   e Zd ZU G dd deZG dd deZee ed< 	 ee ed< 	 ee	e
e
f  ed< 	 ed ed	< 	 ed
 ed< 	 ee ed< 	 eed  ed< 	 eedZdS )zSubscriptionSchedule.Phase.Itemc                   @   s   e Zd ZU ee ed< dS )z1SubscriptionSchedule.Phase.Item.BillingThresholds	usage_gteN)r)   r*   r+   r   r,   r-   r.   r.   r.   r/   rE     s   
 rE   c                   @   re   )z(SubscriptionSchedule.Phase.Item.Discountr   rf   rg   rh   r   ri   Nrj   r.   r.   r.   r/   r     rk   r   rY   rl   metadatar   planr   rm   rn   r!   ro   )rY   rl   N)r)   r*   r+   r   rE   r   r   r-   r   r   rc   r   r,   r>   r.   r.   r.   r/   Item  s(   
 
rt   c                   @   rM   )z'SubscriptionSchedule.Phase.TransferDatarN   r   rO   NrP   r.   r.   r.   r/   rR   F  rF   rR   add_invoice_itemsrS   rT   rU   rX   rY   rZ   r]   r   rf   currencyr   r^   r!   default_tax_ratesr_   rl   r&   r`   itemsrr   r   ra   always_invoicecreate_prorationsnoneproration_behaviorr'   rb   	trial_end)ru   rT   rY   rl   r`   rx   rb   N)r)   r*   r+   r   rp   r?   rE   r   rL   rt   rR   r   r-   r   rQ   r   r   rc   r,   r   r>   r.   r.   r.   r/   Phase   sz   
 !
6

r   c                   @   s:   e Zd ZU eee  ed< 	 ee ed< 	 ee ed< dS )!SubscriptionSchedule.CancelParamsexpandinvoice_nowprorateNr)   r*   r+   r   r   rc   r-   r=   r.   r.   r.   r/   CancelParams  s   
 r   c                   @   s   e Zd ZU ee ed< 	 ed ed< 	 eed  ed< 	 eee  ed< 	 ee ed< 	 ed ed	< 	 eed
  ed< 	 ed ed< dS )!SubscriptionSchedule.CreateParamscustomer0SubscriptionSchedule.CreateParamsDefaultSettingsdefault_settingscancelr|   releaserenewend_behaviorr   from_subscriptionLiteral['']|Dict[str, str]rr   &SubscriptionSchedule.CreateParamsPhasephasesint|Literal['now']r'   N)r)   r*   r+   r   rc   r-   r   r   r.   r.   r.   r/   CreateParams  s*   
 r   c                   @      e Zd ZU ee ed< 	 ed ed< 	 eed  ed< 	 ed ed< 	 eed  ed	< 	 ee ed
< 	 ed ed< 	 ed ed< 	 ed ed< 	 ed ed< dS )r   rS   <SubscriptionSchedule.CreateParamsDefaultSettingsAutomaticTaxrT   rU   rX   zMLiteral['']|SubscriptionSchedule.CreateParamsDefaultSettingsBillingThresholdsrY   rZ   r]   r^   Literal['']|strr_   ?SubscriptionSchedule.CreateParamsDefaultSettingsInvoiceSettingsr`   ra   zHLiteral['']|SubscriptionSchedule.CreateParamsDefaultSettingsTransferDatarb   Nr)   r*   r+   r   rQ   r-   r   rc   r.   r.   r.   r/   CreateParamsDefaultSettings  >   
 r   c                   @   $   e Zd ZU eed< 	 ed ed< dS )r   r:   ESubscriptionSchedule.CreateParamsDefaultSettingsAutomaticTaxLiabilityr;   Nr)   r*   r+   r=   r-   r   r.   r.   r.   r/   'CreateParamsDefaultSettingsAutomaticTax     
 r   c                   @   rM   )r   r3   r4   r6   Nr)   r*   r+   r   rc   r-   r   r.   r.   r.   r/   0CreateParamsDefaultSettingsAutomaticTaxLiability#  rF   r   c                   @   rA   )zASubscriptionSchedule.CreateParamsDefaultSettingsBillingThresholdsrB   rC   Nr)   r*   r+   r   r,   r-   r=   r.   r.   r.   r/   ,CreateParamsDefaultSettingsBillingThresholds-  rF   r   c                   @   6   e Zd ZU ed ed< 	 ee ed< 	 ed ed< dS )r   Literal['']|List[str]rH   rI   ESubscriptionSchedule.CreateParamsDefaultSettingsInvoiceSettingsIssuerrJ   Nr)   r*   r+   r   r-   r,   r.   r.   r.   r/   *CreateParamsDefaultSettingsInvoiceSettings7     
 r   c                   @   rM   )r   r3   r4   r6   Nr   r.   r.   r.   r/   0CreateParamsDefaultSettingsInvoiceSettingsIssuerG  rF   r   c                   @   $   e Zd ZU ee ed< 	 eed< dS )z<SubscriptionSchedule.CreateParamsDefaultSettingsTransferDatarN   rO   Nr)   r*   r+   r   rQ   r-   rc   r.   r.   r.   r/   'CreateParamsDefaultSettingsTransferDataQ  
   
 r   c                   @   sX  e Zd ZU eed  ed< 	 ee ed< 	 ed ed< 	 eed  ed< 	 ed ed	< 	 eed
  ed< 	 ee ed< 	 ee ed< 	 ee ed< 	 ed ed< 	 ed ed< 	 ed ed< 	 ee	 ed< 	 ed ed< 	 ed ed< 	 ee	 ed< 	 ee
eef  ed< 	 ee ed< 	 eed  ed< 	 ed ed < 	 ee ed!< 	 ee	 ed"< d#S )$r   4SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemru   rS   2SubscriptionSchedule.CreateParamsPhaseAutomaticTaxrT   rU   rX   zCLiteral['']|SubscriptionSchedule.CreateParamsPhaseBillingThresholdsrY   rZ   r]   rf   rv   r^   r   rw   r   r_   z@Literal['']|List[SubscriptionSchedule.CreateParamsPhaseDiscount]rl   r&   5SubscriptionSchedule.CreateParamsPhaseInvoiceSettingsr`   *SubscriptionSchedule.CreateParamsPhaseItemrx   
iterationsrr   ra   ry   r}   2SubscriptionSchedule.CreateParamsPhaseTransferDatarb   trialr~   Nr)   r*   r+   r   r   r-   rQ   r   rc   r,   r   r=   r.   r.   r.   r/   CreateParamsPhase[  sz   
 r   c                   @   V   e Zd ZU eed  ed< 	 ee ed< 	 ed ed< 	 ee ed< 	 ed ed< d	S )
r   <SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemDiscountrl   rm   =SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPriceData
price_datarn   r   ro   Nr)   r*   r+   r   r   r-   rc   r,   r.   r.   r.   r/   CreateParamsPhaseAddInvoiceItem  "   
 r   c                   @   6   e Zd ZU ee ed< 	 ee ed< 	 ee ed< dS )r   rf   rh   ri   Nr)   r*   r+   r   rc   r-   r.   r.   r.   r/   'CreateParamsPhaseAddInvoiceItemDiscount     
 r   c                   @   N   e Zd ZU eed< 	 eed< 	 eed  ed< 	 ee ed< 	 ee ed< dS )r   rv   product	exclusive	inclusiveunspecifiedtax_behaviorunit_amountunit_amount_decimalNr)   r*   r+   rc   r-   r   r   r,   r.   r.   r.   r/   (CreateParamsPhaseAddInvoiceItemPriceData     
 r   c                   @   r   )r   r:   ;SubscriptionSchedule.CreateParamsPhaseAutomaticTaxLiabilityr;   Nr   r.   r.   r.   r/   CreateParamsPhaseAutomaticTax  r   r   c                   @   rM   )r   r3   r4   r6   Nr   r.   r.   r.   r/   &CreateParamsPhaseAutomaticTaxLiability  rF   r   c                   @   rA   )z7SubscriptionSchedule.CreateParamsPhaseBillingThresholdsrB   rC   Nr   r.   r.   r.   r/   "CreateParamsPhaseBillingThresholds  rF   r   c                   @   r   )z.SubscriptionSchedule.CreateParamsPhaseDiscountrf   rh   ri   Nr   r.   r.   r.   r/   CreateParamsPhaseDiscount'  r   r   c                   @   r   )r   r   rH   rI   ;SubscriptionSchedule.CreateParamsPhaseInvoiceSettingsIssuerrJ   Nr   r.   r.   r.   r/    CreateParamsPhaseInvoiceSettings5  r   r   c                   @   rM   )r   r3   r4   r6   Nr   r.   r.   r.   r/   &CreateParamsPhaseInvoiceSettingsIssuerE  rF   r   c                   @      e Zd ZU ed ed< 	 ed ed< 	 eeeef  ed< 	 ee ed< 	 ee ed< 	 ed ed	< 	 ee ed
< 	 ed ed< dS )r   zGLiteral['']|SubscriptionSchedule.CreateParamsPhaseItemBillingThresholdsrY   zDLiteral['']|List[SubscriptionSchedule.CreateParamsPhaseItemDiscount]rl   rr   rs   rm   3SubscriptionSchedule.CreateParamsPhaseItemPriceDatar   rn   r   ro   Nr)   r*   r+   r   r-   r   rc   r,   r.   r.   r.   r/   CreateParamsPhaseItemO  .   
 r   c                   @      e Zd ZU eed< dS )z;SubscriptionSchedule.CreateParamsPhaseItemBillingThresholdsrq   Nr(   r.   r.   r.   r/   &CreateParamsPhaseItemBillingThresholdsw     
 r   c                   @   r   )z2SubscriptionSchedule.CreateParamsPhaseItemDiscountrf   rh   ri   Nr   r.   r.   r.   r/   CreateParamsPhaseItemDiscount}  r   r   c                   @   X   e Zd ZU eed< 	 eed< 	 ded< 	 eed  ed< 	 ee ed< 	 ee ed< d	S )
r   rv   r   <SubscriptionSchedule.CreateParamsPhaseItemPriceDataRecurring	recurringr   r   r   r   Nr   r.   r.   r.   r/   CreateParamsPhaseItemPriceData      
 r   c                   @   (   e Zd ZU ed ed< 	 ee ed< dS )r   daymonthweekyearintervalinterval_countNr)   r*   r+   r   r-   r   r,   r.   r.   r.   r/   'CreateParamsPhaseItemPriceDataRecurring  rF   r   c                   @   r   )r   rN   rO   Nr   r.   r.   r.   r/   CreateParamsPhaseTransferData  r   r   c                   @   s   e Zd ZU ed ed< 	 ed ed< 	 ed ed< 	 ee ed< 	 ee ed< 	 eee  ed	< 	 ee ed
< 	 ed ed< 	 ee ed< 	 ee ed< dS )SubscriptionSchedule.ListParamsz-SubscriptionSchedule.ListParamsCanceledAt|intcanceled_atz.SubscriptionSchedule.ListParamsCompletedAt|intcompleted_atz*SubscriptionSchedule.ListParamsCreated|intcreatedr   ending_beforer   limitz-SubscriptionSchedule.ListParamsReleasedAt|intreleased_at	scheduledstarting_afterN)	r)   r*   r+   r   r-   rc   r   r,   r=   r.   r.   r.   r/   
ListParams  s6   
 r   c                   @   D   e Zd ZU ee ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )z)SubscriptionSchedule.ListParamsCanceledAtgtgteltlteNr)   r*   r+   r   r,   r-   r.   r.   r.   r/   ListParamsCanceledAt     
 r  c                   @   r   )z*SubscriptionSchedule.ListParamsCompletedAtr   r   r   r   Nr   r.   r.   r.   r/   ListParamsCompletedAt  r  r  c                   @   r   )z&SubscriptionSchedule.ListParamsCreatedr   r   r   r   Nr   r.   r.   r.   r/   ListParamsCreated  r  r  c                   @   r   )z)SubscriptionSchedule.ListParamsReleasedAtr   r   r   r   Nr   r.   r.   r.   r/   ListParamsReleasedAt#  r  r  c                   @   sp   e Zd ZU ed ed< 	 eed  ed< 	 eee  ed< 	 ed ed< 	 eed  ed	< 	 eed
  ed< dS )!SubscriptionSchedule.ModifyParams0SubscriptionSchedule.ModifyParamsDefaultSettingsr   r   r   r   r   rr   &SubscriptionSchedule.ModifyParamsPhaser   ry   r}   N)r)   r*   r+   r   r-   r   r   rc   r.   r.   r.   r/   ModifyParams5  s&   
 r	  c                   @   r   )r  rS   <SubscriptionSchedule.ModifyParamsDefaultSettingsAutomaticTaxrT   rU   rX   zMLiteral['']|SubscriptionSchedule.ModifyParamsDefaultSettingsBillingThresholdsrY   rZ   r]   r^   r   r_   ?SubscriptionSchedule.ModifyParamsDefaultSettingsInvoiceSettingsr`   ra   zHLiteral['']|SubscriptionSchedule.ModifyParamsDefaultSettingsTransferDatarb   Nr   r.   r.   r.   r/   ModifyParamsDefaultSettingsU  r   r  c                   @   r   )r
  r:   ESubscriptionSchedule.ModifyParamsDefaultSettingsAutomaticTaxLiabilityr;   Nr   r.   r.   r.   r/   'ModifyParamsDefaultSettingsAutomaticTax  r   r  c                   @   rM   )r  r3   r4   r6   Nr   r.   r.   r.   r/   0ModifyParamsDefaultSettingsAutomaticTaxLiability  rF   r  c                   @   rA   )zASubscriptionSchedule.ModifyParamsDefaultSettingsBillingThresholdsrB   rC   Nr   r.   r.   r.   r/   ,ModifyParamsDefaultSettingsBillingThresholds  rF   r  c                   @   r   )r  r   rH   rI   ESubscriptionSchedule.ModifyParamsDefaultSettingsInvoiceSettingsIssuerrJ   Nr   r.   r.   r.   r/   *ModifyParamsDefaultSettingsInvoiceSettings  r   r  c                   @   rM   )r  r3   r4   r6   Nr   r.   r.   r.   r/   0ModifyParamsDefaultSettingsInvoiceSettingsIssuer  rF   r  c                   @   r   )z<SubscriptionSchedule.ModifyParamsDefaultSettingsTransferDatarN   rO   Nr   r.   r.   r.   r/   'ModifyParamsDefaultSettingsTransferData  r   r  c                   @   sf  e Zd ZU eed  ed< 	 ee ed< 	 ed ed< 	 eed  ed< 	 ed ed	< 	 eed
  ed< 	 ee ed< 	 ee ed< 	 ee ed< 	 ed ed< 	 ed ed< 	 ed ed< 	 ed ed< 	 ed ed< 	 ed ed< 	 ee	 ed< 	 ee
eef  ed< 	 ee ed< 	 eed  ed< 	 ed ed < 	 ed! ed"< 	 ee ed#< 	 ed ed$< d%S )&r  4SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemru   rS   2SubscriptionSchedule.ModifyParamsPhaseAutomaticTaxrT   rU   rX   zCLiteral['']|SubscriptionSchedule.ModifyParamsPhaseBillingThresholdsrY   rZ   r]   rf   rv   r^   r   rw   r   r_   z@Literal['']|List[SubscriptionSchedule.ModifyParamsPhaseDiscount]rl   r   r&   5SubscriptionSchedule.ModifyParamsPhaseInvoiceSettingsr`   *SubscriptionSchedule.ModifyParamsPhaseItemrx   r   rr   ra   ry   r}   r'   2SubscriptionSchedule.ModifyParamsPhaseTransferDatarb   r   r~   Nr   r.   r.   r.   r/   ModifyParamsPhase  s~   
 r  c                   @   r   )
r  <SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemDiscountrl   rm   =SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPriceDatar   rn   r   ro   Nr   r.   r.   r.   r/   ModifyParamsPhaseAddInvoiceItem;  r   r  c                   @   r   )r  rf   rh   ri   Nr   r.   r.   r.   r/   'ModifyParamsPhaseAddInvoiceItemDiscountW  r   r  c                   @   r   )r  rv   r   r   r   r   r   Nr   r.   r.   r.   r/   (ModifyParamsPhaseAddInvoiceItemPriceDatae  r   r  c                   @   r   )r  r:   ;SubscriptionSchedule.ModifyParamsPhaseAutomaticTaxLiabilityr;   Nr   r.   r.   r.   r/   ModifyParamsPhaseAutomaticTax}  r   r!  c                   @   rM   )r   r3   r4   r6   Nr   r.   r.   r.   r/   &ModifyParamsPhaseAutomaticTaxLiability  rF   r"  c                   @   rA   )z7SubscriptionSchedule.ModifyParamsPhaseBillingThresholdsrB   rC   Nr   r.   r.   r.   r/   "ModifyParamsPhaseBillingThresholds  rF   r#  c                   @   r   )z.SubscriptionSchedule.ModifyParamsPhaseDiscountrf   rh   ri   Nr   r.   r.   r.   r/   ModifyParamsPhaseDiscount  r   r$  c                   @   r   )r  r   rH   rI   ;SubscriptionSchedule.ModifyParamsPhaseInvoiceSettingsIssuerrJ   Nr   r.   r.   r.   r/    ModifyParamsPhaseInvoiceSettings  r   r&  c                   @   rM   )r%  r3   r4   r6   Nr   r.   r.   r.   r/   &ModifyParamsPhaseInvoiceSettingsIssuer  rF   r'  c                   @   r   )r  zGLiteral['']|SubscriptionSchedule.ModifyParamsPhaseItemBillingThresholdsrY   zDLiteral['']|List[SubscriptionSchedule.ModifyParamsPhaseItemDiscount]rl   rr   rs   rm   3SubscriptionSchedule.ModifyParamsPhaseItemPriceDatar   rn   r   ro   Nr   r.   r.   r.   r/   ModifyParamsPhaseItem  r   r)  c                   @   r   )z;SubscriptionSchedule.ModifyParamsPhaseItemBillingThresholdsrq   Nr(   r.   r.   r.   r/   &ModifyParamsPhaseItemBillingThresholds  r   r*  c                   @   r   )z2SubscriptionSchedule.ModifyParamsPhaseItemDiscountrf   rh   ri   Nr   r.   r.   r.   r/   ModifyParamsPhaseItemDiscount  r   r+  c                   @   r   )
r(  rv   r   <SubscriptionSchedule.ModifyParamsPhaseItemPriceDataRecurringr   r   r   r   r   Nr   r.   r.   r.   r/   ModifyParamsPhaseItemPriceData  r   r-  c                   @   r   )r,  r   r   r   Nr   r.   r.   r.   r/   'ModifyParamsPhaseItemPriceDataRecurring  rF   r.  c                   @   r   )r  rN   rO   Nr   r.   r.   r.   r/   ModifyParamsPhaseTransferData)  r   r/  c                   @   s,   e Zd ZU eee  ed< 	 ee ed< dS )"SubscriptionSchedule.ReleaseParamsr   preserve_cancel_dateNr   r.   r.   r.   r/   ReleaseParams3  r9   r2  c                   @   s   e Zd ZU eee  ed< dS )#SubscriptionSchedule.RetrieveParamsr   N)r)   r*   r+   r   r   rc   r-   r.   r.   r.   r/   RetrieveParams=  s   
 r4  r   applicationr   r   r   current_phaser   r   r   r   r   idlivemoderr   objectr   r   released_subscription)activecanceled	completednot_startedreleasedstatusr   subscriptionr"   
test_clockscheduleparamsr   returnc                 K   "   t d| jddjt|d|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#   post,/v1/subscription_schedules/{schedule}/cancelrC  rD  r   _static_requestformatr
   clsrC  rD  r.   r.   r/   _cls_cancel     	z SubscriptionSchedule._cls_cancelc                 K      dS rG  Nr.   rC  rD  r.   r.   r/   r        zSubscriptionSchedule.cancelc                 K   rS  rT  r.   r5   rD  r.   r.   r/   r        rQ  c              	   K   (   t d| jddjt| dd|dS )rG  r#   rH  rI  r7  rJ  rK  r   _requestrN  r
   getrW  r.   r.   r/   r        c                    *   t d| jddjt|d|dI dH S )rG  r#   rH  rI  rJ  rK  Nr   _static_request_asyncrN  r
   rO  r.   r.   r/   _cls_cancel_async     	
z&SubscriptionSchedule._cls_cancel_asyncc                       dS rT  r.   rU  r.   r.   r/   cancel_async     z!SubscriptionSchedule.cancel_asyncc                    rc  rT  r.   rW  r.   r.   r/   rd       ra  c              	      0   t d| jddjt| dd|dI dH S )rG  r#   rH  rI  r7  rJ  rK  Nr   _request_asyncrN  r
   r\  rW  r.   r.   r/   rd       
r   c                 K   s   t d| jd|  |dS )
        Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
        r#   rH  rK  )r   rM  	class_urlrP  rD  r.   r.   r/   create  s   zSubscriptionSchedule.createc                    s"   t d| jd|  |dI dH S )rk  r#   rH  rK  N)r   r`  rl  rm  r.   r.   r/   create_async  s   
z!SubscriptionSchedule.create_asyncr   c                 K   s4   | j d|  |d}t|tstdt|j |S )D
        Retrieves the list of your subscription schedules.
        r\  rK  %Expected list object from API, got %s)rM  rl  
isinstancer   	TypeErrorr6   r)   rP  rD  resultr.   r.   r/   list  s   
zSubscriptionSchedule.listc                    s<   | j d|  |dI dH }t|tstdt|j |S )rp  r\  rK  Nrq  )r`  rl  rr  r   rs  r6   r)   rt  r.   r.   r/   
list_async1  s   
zSubscriptionSchedule.list_asyncr  c                 K   s*   d|   t|f }td| jd||dS )<
        Updates an existing subscription schedule.
        %s/%sr#   rH  rK  )rl  r
   r   rM  rP  r7  rD  urlr.   r.   r/   modifyE  s   zSubscriptionSchedule.modifyc                    s2   d|   t|f }td| jd||dI dH S )rx  ry  r#   rH  rK  N)rl  r
   r   r`  rz  r.   r.   r/   modify_asyncV  s   
z!SubscriptionSchedule.modify_asyncr0  c                 K   rF  )  
        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#   rH  -/v1/subscription_schedules/{schedule}/releaserJ  rK  rL  rO  r.   r.   r/   _cls_releaseg  rR  z!SubscriptionSchedule._cls_releasec                 K   rS  r~  Nr.   rU  r.   r.   r/   r   {  rV  zSubscriptionSchedule.releasec                 K   rS  r  r.   rW  r.   r.   r/   r     rX  r  c              	   K   rY  )r~  r#   rH  r  r7  rJ  rK  rZ  rW  r.   r.   r/   r     r]  c                    r^  )r~  r#   rH  r  rJ  rK  Nr_  rO  r.   r.   r/   _cls_release_async  rb  z'SubscriptionSchedule._cls_release_asyncc                    rc  r  r.   rU  r.   r.   r/   release_async  re  z"SubscriptionSchedule.release_asyncc                    rc  r  r.   rW  r.   r.   r/   r    rf  r  c              	      rg  )r~  r#   rH  r  r7  rJ  rK  Nrh  rW  r.   r.   r/   r    rj  r3  c                 K   s   | |fi |}|   |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.
        )refreshrP  r7  rD  instancer.   r.   r/   retrieve  s   zSubscriptionSchedule.retrievec                    s$   | |fi |}|  I dH  |S )r  N)refresh_asyncr  r.   r.   r/   retrieve_async  s   z#SubscriptionSchedule.retrieve_async)r6  r   r   N)dr)   r*   r+   __doc__r%   r   r   r-   r   r0   rd   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r	  r  r  r  r  r  r  r  r  r  r  r  r!  r"  r#  r$  r&  r'  r)  r*  r+  r-  r.  r/  r2  r4  r   r   r,   rc   r=   r   r   classmethodr   rQ  r   staticmethodr   r	   ra  rd  rn  ro  r   rv  rw  r|  r}  r  r   r  r  r  r  r>   r.   r.   r.   r/   r#   $   s,  
 
k  	&4



j


(

0 4



n


(




r#   N):stripe._createable_api_resourcer   stripe._expandable_fieldr   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   stripe._accountr   stripe._applicationr   stripe._couponr   stripe._customerr   stripe._discountr   rg   stripe._payment_methodr   stripe._planr   stripe._pricer   stripe._promotion_coder   stripe._subscriptionr   stripe._tax_idr    stripe._tax_rater!   stripe.test_helpers._test_clockr"   r#   r.   r.   r.   r/   <module>   s:    
