o
    Bi֓                    @   s   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mZ d d	lmZmZmZ G d
d de	ZdS )    )Discount)
ListObject)RequestOptions)SearchResultObject)StripeService)Subscription)sanitize_id)DictListcast)LiteralNotRequired	TypedDictc                	   @   s  e Zd 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 d+d, d,eZG d-d. d.eZG d/d0 d0eZG d1d2 d2eZG d3d4 d4eZG d5d6 d6eZG d7d8 d8eZG d9d: d:eZ G d;d< d<eZ!G d=d> d>eZ"G d?d@ d@eZ#G dAdB dBeZ$G dCdD dDeZ%G dEdF dFeZ&G dGdH dHeZ'G dIdJ dJeZ(G dKdL dLeZ)G dMdN dNeZ*G dOdP dPeZ+G dQdR dReZ,G dSdT dTeZ-G dUdV dVeZ.G dWdX dXeZ/G dYdZ dZeZ0G d[d\ d\eZ1G d]d^ d^eZ2G d_d` d`eZ3G dadb dbeZ4G dcdd ddeZ5G dedf dfeZ6G dgdh dheZ7G didj djeZ8G dkdl dleZ9G dmdn dneZ:G dodp dpeZ;G dqdr dreZ<G dsdt dteZ=G dudv dveZ>G dwdx dxeZ?G dydz dzeZ@G d{d| d|eZAG d}d~ d~eZBG dd deZCG dd deZDG dd deZEG dd deZFG dd deZGG dd deZHG dd deZIG dd deZJG dd deZKG dd deZLG dd deZMG dd deZNG dd deZOG dd deZPG dd deZQG dd deZRG dd deZSG dd deZTG dd deZUi i fdeVdddeWdeXfddZYi i fdeVdddeWdeXfddZZi i fdeVdddeWdeXfddZ[i i fdeVdddeWdeXfddZ\i i fdeVdddeWdeXfddZ]i i fdeVdddeWdeXfddZ^i i fdeVdddeWde_fddZ`i i fdeVdddeWde_fddZai i fdddeWdebeX fddZci i fdddeWdebeX fddZdi fdddeWdeXfddĄZei fdddeWdeXfddƄZfi fdddeWdegeX fddɄZhi fdddeWdegeX fdd˄Zii i fdeVdddeWdeXfddτZji i fdeVdddeWdeXfddфZkdS )SubscriptionServicec                   @   sH   e Zd ZU ed ed< 	 eee  ed< 	 ee ed< 	 ee ed< dS ) SubscriptionService.CancelParams3SubscriptionService.CancelParamsCancellationDetailscancellation_detailsexpandinvoice_nowprorateN)__name__
__module____qualname__r   __annotations__r
   strbool r   r   \/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_subscription_service.pyCancelParams   s   
 r   c                   @   (   e Zd ZU ed ed< 	 ed ed< dS )r   Literal['']|strcommentLiteral['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']feedbackNr   r   r   r   r   r   r   r   r   CancelParamsCancellationDetails#      
 r%   c                   @   s
  e Zd ZU eed  ed< 	 ed ed< 	 ed ed< 	 ee ed< 	 ee ed< 	 ed	 ed
< 	 ed ed< 	 ee ed< 	 ee 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d< 	 ed ed< 	 ee	 ed< 	 ed ed< 	 eee	  ed< 	 ed ed< 	 eed  ed < 	 ed! ed"< 	 ee ed#< 	 ed$ ed%< 	 eed&  ed'< 	 ed( ed)< 	 ed* ed+< 	 ee	 ed,< 	 eed-  ed.< 	 ed/ ed0< 	 ed1 ed2< 	 ee ed3< 	 ee ed4< 	 ed5 ed6< d7S )8 SubscriptionService.CreateParams.SubscriptionService.CreateParamsAddInvoiceItemadd_invoice_itemsLiteral['']|floatapplication_fee_percent,SubscriptionService.CreateParamsAutomaticTaxautomatic_taxbackdate_start_datebilling_cycle_anchor8SubscriptionService.CreateParamsBillingCycleAnchorConfigbilling_cycle_anchor_configz=Literal['']|SubscriptionService.CreateParamsBillingThresholdsbilling_thresholds	cancel_atcancel_at_period_endcharge_automaticallysend_invoicecollection_methodcouponcurrencycustomerdays_until_duedefault_payment_methoddefault_sourceLiteral['']|List[str]default_tax_ratesdescriptionz:Literal['']|List[SubscriptionService.CreateParamsDiscount]	discountsr   /SubscriptionService.CreateParamsInvoiceSettingsinvoice_settings$SubscriptionService.CreateParamsItemitemsLiteral['']|Dict[str, str]metadataoff_sessionr    on_behalf_ofallow_incompletedefault_incompleteerror_if_incompletepending_if_incompletepayment_behavior/SubscriptionService.CreateParamsPaymentSettingspayment_settingszFLiteral['']|SubscriptionService.CreateParamsPendingInvoiceItemIntervalpending_invoice_item_intervalpromotion_codealways_invoicecreate_prorationsnoneproration_behavior,SubscriptionService.CreateParamsTransferDatatransfer_dataLiteral['now']|int	trial_endtrial_from_plantrial_period_days-SubscriptionService.CreateParamsTrialSettingstrial_settingsN)
r   r   r   r   r
   r   intr   r   r   r   r   r   r   CreateParams/   s   
 rc   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(   6SubscriptionService.CreateParamsAddInvoiceItemDiscountrB   price7SubscriptionService.CreateParamsAddInvoiceItemPriceData
price_dataquantityr?   	tax_ratesNr   r   r   r   r
   r   r   rb   r   r   r   r   CreateParamsAddInvoiceItem      
 rl   c                   @   6   e Zd ZU ee ed< 	 ee ed< 	 ee ed< dS )re   r9   discountrT   Nr   r   r   r   r   r   r   r   r   r   "CreateParamsAddInvoiceItemDiscount      
 rq   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 )rg   r:   product	exclusive	inclusiveunspecifiedtax_behaviorunit_amountunit_amount_decimalNr   r   r   r   r   r   r   rb   r   r   r   r   #CreateParamsAddInvoiceItemPriceData     
 r}   c                   @   $   e Zd ZU eed< 	 ed ed< dS )r,   enabled5SubscriptionService.CreateParamsAutomaticTaxLiability	liabilityNr   r   r   r   r   r   r   r   r   r   CreateParamsAutomaticTax&     
 r   c                   @   (   e Zd ZU ee ed< 	 ed ed< dS )r   accountr   selftypeNr   r   r   r   r   r   r   r   r   r   r   !CreateParamsAutomaticTaxLiability2  
   
 r   c                   @   sN   e Zd ZU eed< 	 ee ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )r0   day_of_monthhourminutemonthsecondN)r   r   r   rb   r   r   r   r   r   r   $CreateParamsBillingCycleAnchorConfig<  s   
 r   c                   @   (   e Zd ZU ee ed< 	 ee ed< dS )z1SubscriptionService.CreateParamsBillingThresholds
amount_gtereset_billing_cycle_anchorNr   r   r   r   rb   r   r   r   r   r   r   CreateParamsBillingThresholdsR  r   r   c                   @   rn   )z(SubscriptionService.CreateParamsDiscountr9   ro   rT   Nrp   r   r   r   r   CreateParamsDiscount\  rr   r   c                   @   r   )rC   r?   account_tax_ids5SubscriptionService.CreateParamsInvoiceSettingsIssuerissuerNr$   r   r   r   r   CreateParamsInvoiceSettingsj  r&   r   c                   @   r   )r   r   r   r   Nr   r   r   r   r   !CreateParamsInvoiceSettingsIssuerv  r   r   c                   @   s   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 )rE   zALiteral['']|SubscriptionService.CreateParamsItemBillingThresholdsr2   z>Literal['']|List[SubscriptionService.CreateParamsItemDiscount]rB   rH   planrf   -SubscriptionService.CreateParamsItemPriceDatarh   ri   r?   rj   N)r   r   r   r   r   r	   r   rb   r   r   r   r   CreateParamsItem  s.   
 r   c                   @      e Zd ZU eed< dS )z5SubscriptionService.CreateParamsItemBillingThresholds	usage_gteNr   r   r   rb   r   r   r   r   r   !CreateParamsItemBillingThresholds     
 r   c                   @   rn   )z,SubscriptionService.CreateParamsItemDiscountr9   ro   rT   Nrp   r   r   r   r   CreateParamsItemDiscount  rr   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   r:   rt   6SubscriptionService.CreateParamsItemPriceDataRecurring	recurringru   ry   rz   r{   Nr|   r   r   r   r   CreateParamsItemPriceData     
 r   c                   @   (   e Zd ZU ed ed< 	 ee ed< dS )r   dayr   weekyearintervalinterval_countNr   r   r   r   r   r   rb   r   r   r   r   "CreateParamsItemPriceDataRecurring  r   r   c                   @   :   e Zd ZU ed ed< 	 ed ed< 	 eed  ed< dS )rQ   CSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionspayment_method_options  Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'multibanco', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]payment_method_typesoffon_subscriptionsave_default_payment_methodNr   r   r   r   r   r   r   r   r   r   CreateParamsPaymentSettings     
 r   c                   @   n   e Zd ZU 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d< dS )r   zXLiteral['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit
acss_debitzYLiteral['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact
bancontactzSLiteral['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCardcardz^Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalancecustomer_balancezVLiteral['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsKonbinikonbinizXLiteral['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit
sepa_debitz\Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountus_bank_accountNr$   r   r   r   r   /CreateParamsPaymentSettingsPaymentMethodOptions  :   
 r   c                   @   ,   e Zd ZU ed ed< 	 eed  ed< dS )zLSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitZSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsmandate_options	automaticinstantmicrodepositsverification_methodNr   r   r   r   r   8CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit"     
 r   c                   @      e Zd ZU eed  ed< dS )r   businesspersonaltransaction_typeNr   r   r   r   r   r   r   r   r   r   FCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions0     
 r   c                   @   r   )zMSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsBancontactdeenfrnlpreferred_languageNr   r   r   r   r   9CreateParamsPaymentSettingsPaymentMethodOptionsBancontact8     
 r   c                   @   >   e Zd ZU ed ed< 	 eed  ed< 	 eed  ed< dS )zGSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCardUSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptionsr   amexcartes_bancairesdinersdiscover	eftpos_augirocardinteracjcb
mastercardunionpayunknownvisanetworkanyr   	challengerequest_three_d_secureNr   r   r   r   r   3CreateParamsPaymentSettingsPaymentMethodOptionsCard>     
 r   c                   @   :   e Zd ZU ee ed< 	 eed  ed< 	 ee ed< dS )r   amountfixedmaximumamount_typerA   Nr   r   r   r   rb   r   r   r   r   r   r   r   ACreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions_     
 r  c                   @   (   e Zd ZU ed ed< 	 ee ed< dS )zRSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance^SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferbank_transferfunding_typeNr   r   r   r   r   r   r   r   r   r   >CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceo     
 r
  c                   @   r  )r  lSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfereu_bank_transferr   Nr	  r   r   r   r   JCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer}  r  r  c                   @   r   )r  countryNr   r   r   r   r   r   r   r   r   XCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer     
 r  c                   @      e Zd ZdS )zJSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsKonbiniNr   r   r   r   r   r   r   6CreateParamsPaymentSettingsPaymentMethodOptionsKonbini      r  c                   @   r  )zLSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebitNr  r   r   r   r   8CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit  r  r  c                   @   r   )zPSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountdSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsfinancial_connectionsr   r   Nr   r   r   r   r   <CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount     
 r  c                   @   F   e Zd ZU ed ed< 	 eeed   ed< 	 eeed   ed< dS )r  kSubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersfiltersbalances	ownershippayment_methodtransactionspermissionsr   r!  r#  prefetchNr   r   r   r   r   r
   r   r   r   r   r   PCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections  "   
 
r(  c                   @   "   e Zd ZU eeed   ed< dS )r  checkingsavingsaccount_subcategoriesNr   r   r   r   r
   r   r   r   r   r   r   WCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters  
   
 
r0  c                   @   r   )z:SubscriptionService.CreateParamsPendingInvoiceItemIntervalr   r   r   Nr   r   r   r   r   &CreateParamsPendingInvoiceItemInterval  r   r2  c                   @   $   e Zd ZU ee ed< 	 eed< dS )rZ   amount_percentdestinationNr   r   r   r   floatr   r   r   r   r   r   CreateParamsTransferData  
   
 r8  c                   @      e Zd ZU ded< dS )r`   8SubscriptionService.CreateParamsTrialSettingsEndBehaviorend_behaviorNr   r   r   r   r   r   r   r   CreateParamsTrialSettings     
 r>  c                   @      e Zd ZU ed ed< dS )r;  cancelcreate_invoicepausemissing_payment_methodNr   r   r   r   r   r   r   r   r   $CreateParamsTrialSettingsEndBehavior     
 rG  c                   @   r  )(SubscriptionService.DeleteDiscountParamsNr  r   r   r   r   DeleteDiscountParams  r  rJ  c                   @   s   e Zd ZU ed ed< 	 eed  ed< 	 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e ed< 	 ee ed< 	 ee ed< 	 eed  ed< 	 ee ed< dS )SubscriptionService.ListParams*SubscriptionService.ListParamsAutomaticTaxr-   r5   r8   z)SubscriptionService.ListParamsCreated|intcreatedz2SubscriptionService.ListParamsCurrentPeriodEnd|intcurrent_period_endz4SubscriptionService.ListParamsCurrentPeriodStart|intcurrent_period_startr;   ending_beforer   limitr   rf   starting_after)
activeallcanceledended
incompleteincomplete_expiredpast_duepausedtrialingunpaidstatus
test_clockN)	r   r   r   r   r   r   r   r
   rb   r   r   r   r   
ListParams  sR   
 r_  c                   @   r   )rL  r   N)r   r   r   r   r   r   r   r   r   ListParamsAutomaticTaxA  r   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%SubscriptionService.ListParamsCreatedgtgteltlteNr   r   r   r   rb   r   r   r   r   r   ListParamsCreatedG     
 rg  c                   @   ra  )z.SubscriptionService.ListParamsCurrentPeriodEndrb  rc  rd  re  Nrf  r   r   r   r   ListParamsCurrentPeriodEndY  rh  ri  c                   @   ra  )z0SubscriptionService.ListParamsCurrentPeriodStartrb  rc  rd  re  Nrf  r   r   r   r   ListParamsCurrentPeriodStartk  rh  rj  c                   @   sP   e Zd ZU eed  ed< 	 eee  ed< 	 eed  ed< 	 ee ed< dS ) SubscriptionService.ResumeParamsnow	unchangedr/   r   rU   rY   proration_dateN)	r   r   r   r   r   r   r
   r   rb   r   r   r   r   ResumeParams}  s   
 rp  c                   @   s   e Zd ZU eee  ed< dS )"SubscriptionService.RetrieveParamsr   N)r   r   r   r   r
   r   r   r   r   r   r   RetrieveParams  r   rr  c                   @   sD   e Zd ZU eee  ed< 	 ee ed< 	 ee ed< 	 eed< dS ) SubscriptionService.SearchParamsr   rQ  pagequeryN)r   r   r   r   r
   r   r   rb   r   r   r   r   SearchParams  s   
 rv  c                   @   s  e Zd ZU eed  ed< 	 ed ed< 	 ed ed< 	 eed  ed< 	 ed	 ed
< 	 ed ed< 	 ee 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ee  ed< 	 ed ed< 	 eed  ed < 	 ed! ed"< 	 ee ed#< 	 ed ed$< 	 ed% ed&< 	 eed'  ed(< 	 ed) ed*< 	 ed+ ed,< 	 ee ed-< 	 eed.  ed/< 	 ee	 ed0< 	 ed1 ed2< 	 ed3 ed4< 	 ee ed5< 	 ed6 ed7< d8S )9 SubscriptionService.UpdateParams.SubscriptionService.UpdateParamsAddInvoiceItemr)   r*   r+   ,SubscriptionService.UpdateParamsAutomaticTaxr-   rl  r/   z=Literal['']|SubscriptionService.UpdateParamsBillingThresholdsr2   zLiteral['']|intr3   r4   3SubscriptionService.UpdateParamsCancellationDetailsr   r5   r8   r9   r<   r=   r    r>   r?   r@   rA   z:Literal['']|List[SubscriptionService.UpdateParamsDiscount]rB   r   /SubscriptionService.UpdateParamsInvoiceSettingsrD   $SubscriptionService.UpdateParamsItemrF   rG   rH   rI   rJ   z;Literal['']|SubscriptionService.UpdateParamsPauseCollectionpause_collectionrK   rP   /SubscriptionService.UpdateParamsPaymentSettingsrR   zFLiteral['']|SubscriptionService.UpdateParamsPendingInvoiceItemIntervalrS   rT   rU   rY   ro  z8Literal['']|SubscriptionService.UpdateParamsTransferDatar[   r\   r]   r^   -SubscriptionService.UpdateParamsTrialSettingsra   N)
r   r   r   r   r
   r   r   r   r   rb   r   r   r   r   UpdateParams  s   
 	r  c                   @   rd   )
rx  6SubscriptionService.UpdateParamsAddInvoiceItemDiscountrB   rf   7SubscriptionService.UpdateParamsAddInvoiceItemPriceDatarh   ri   r?   rj   Nrk   r   r   r   r   UpdateParamsAddInvoiceItemV  rm   r  c                   @   rn   )r  r9   ro   rT   Nrp   r   r   r   r   "UpdateParamsAddInvoiceItemDiscountp  rr   r  c                   @   rs   )r  r:   rt   ru   ry   rz   r{   Nr|   r   r   r   r   #UpdateParamsAddInvoiceItemPriceData~  r~   r  c                   @   r   )ry  r   5SubscriptionService.UpdateParamsAutomaticTaxLiabilityr   Nr   r   r   r   r   UpdateParamsAutomaticTax  r   r  c                   @   r   )r  r   r   r   Nr   r   r   r   r   !UpdateParamsAutomaticTaxLiability  r   r  c                   @   r   )z1SubscriptionService.UpdateParamsBillingThresholdsr   r   Nr   r   r   r   r   UpdateParamsBillingThresholds  r   r  c                   @   r   )rz  r    r!   r"   r#   Nr$   r   r   r   r   UpdateParamsCancellationDetails  r&   r  c                   @   rn   )z(SubscriptionService.UpdateParamsDiscountr9   ro   rT   Nrp   r   r   r   r   UpdateParamsDiscount  rr   r  c                   @   r   )r{  r?   r   5SubscriptionService.UpdateParamsInvoiceSettingsIssuerr   Nr$   r   r   r   r   UpdateParamsInvoiceSettings  r&   r  c                   @   r   )r  r   r   r   Nr   r   r   r   r   !UpdateParamsInvoiceSettingsIssuer  r   r  c                   @   s   e Zd ZU ed ed< 	 ee ed< 	 ee ed< 	 ed ed< 	 ee ed< 	 ed 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|  zALiteral['']|SubscriptionService.UpdateParamsItemBillingThresholdsr2   clear_usagedeletedz>Literal['']|List[SubscriptionService.UpdateParamsItemDiscount]rB   idrG   rH   r   rf   -SubscriptionService.UpdateParamsItemPriceDatarh   ri   r?   rj   N)r   r   r   r   r   r   r   rb   r   r   r   r   UpdateParamsItem  s:   
 r  c                   @   r   )z5SubscriptionService.UpdateParamsItemBillingThresholdsr   Nr   r   r   r   r   !UpdateParamsItemBillingThresholds  r   r  c                   @   rn   )z,SubscriptionService.UpdateParamsItemDiscountr9   ro   rT   Nrp   r   r   r   r   UpdateParamsItemDiscount   rr   r  c                   @   r   )
r  r:   rt   6SubscriptionService.UpdateParamsItemPriceDataRecurringr   ru   ry   rz   r{   Nr|   r   r   r   r   UpdateParamsItemPriceData.  r   r  c                   @   r   )r  r   r   r   Nr   r   r   r   r   "UpdateParamsItemPriceDataRecurringJ  r   r  c                   @   r   )z/SubscriptionService.UpdateParamsPauseCollection)keep_as_draftmark_uncollectiblevoidbehavior
resumes_atNr   r   r   r   r   UpdateParamsPauseCollectionT  r   r  c                   @   r   )r~  CSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsr   r   r   r   r   Nr   r   r   r   r   UpdateParamsPaymentSettings^  r   r  c                   @   r   )r  zXLiteral['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitr   zYLiteral['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsBancontactr   zSLiteral['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCardr   z^Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalancer   zVLiteral['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsKonbinir   zXLiteral['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebitr   z\Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountr   Nr$   r   r   r   r   /UpdateParamsPaymentSettingsPaymentMethodOptionsr  r   r  c                   @   r   )zLSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitZSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptionsr   r   r   Nr   r   r   r   r   8UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit  r   r  c                   @   r   )r  r   r   Nr   r   r   r   r   FUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions  r   r  c                   @   r   )zMSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsBancontactr   r   Nr   r   r   r   r   9UpdateParamsPaymentSettingsPaymentMethodOptionsBancontact  r   r  c                   @   r   )zGSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCardUSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptionsr   r   r   r   r   Nr   r   r   r   r   3UpdateParamsPaymentSettingsPaymentMethodOptionsCard  r   r  c                   @   r   )r  r   r   r  rA   Nr  r   r   r   r   AUpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions  r  r  c                   @   r  )zRSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance^SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferr  r  Nr	  r   r   r   r   >UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance  r  r  c                   @   r  )r  lSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferr  r   Nr	  r   r   r   r   JUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer  r  r  c                   @   r   )r  r  Nr  r   r   r   r   XUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer  r  r  c                   @   r  )zJSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsKonbiniNr  r   r   r   r   6UpdateParamsPaymentSettingsPaymentMethodOptionsKonbini  r  r  c                   @   r  )zLSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebitNr  r   r   r   r   8UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit  r  r  c                   @   r   )zPSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountdSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsr  r   r   Nr   r   r   r   r   <UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount  r  r  c                   @   r  )r  kSubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersr  r  r$  r%  r&  Nr'  r   r   r   r   PUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections%  r)  r  c                   @   r*  )r  r+  r.  Nr/  r   r   r   r   WUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters?  r1  r  c                   @   r   )z:SubscriptionService.UpdateParamsPendingInvoiceItemIntervalr   r   r   Nr   r   r   r   r   &UpdateParamsPendingInvoiceItemIntervalI  r   r  c                   @   r3  )z,SubscriptionService.UpdateParamsTransferDatar4  r5  Nr6  r   r   r   r   UpdateParamsTransferDataS  r9  r  c                   @   r:  )r  8SubscriptionService.UpdateParamsTrialSettingsEndBehaviorr<  Nr=  r   r   r   r   UpdateParamsTrialSettings]  r?  r  c                   @   r@  )r  rA  rE  NrF  r   r   r   r   $UpdateParamsTrialSettingsEndBehaviore  rH  r  subscription_exposed_idparamsr   optionsreturnc              	   C   &   t t| jddjt|dd||dS )  
        Cancels a customer's subscription immediately. The customer will not be charged again for the subscription.

        Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

        By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
        delete+/v1/subscriptions/{subscription_exposed_id}r  apibase_addressr  r  r   r   _requestformatr   r   r  r  r  r   r   r   rB  k  s   zSubscriptionService.cancelc              	      .   t t| jddjt|dd||dI dH S )r  r  r  r  r  r  Nr   r   _request_asyncr  r   r  r   r   r   cancel_async  s   
z SubscriptionService.cancel_asyncrq  c              	   C   r  )?
        Retrieves the subscription with the given ID.
        getr  r  r  r  r  r  r   r   r   retrieve     	zSubscriptionService.retrievec              	      r  )r  r  r  r  r  r  Nr  r  r   r   r   retrieve_async     	
z"SubscriptionService.retrieve_asyncrw  c              	   C   r  )g
  
        Updates an existing subscription to match the specified parameters.
        When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
        To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.

        By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.

        Switching prices does not normally change the billing date or generate an immediate charge unless:


        The billing interval is changed (for example, from monthly to yearly).
        The subscription moves from free to paid.
        A trial starts or ends.


        In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).

        If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).

        If you don't want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don't generate any credits for the old subscription's unused time. We still reset the billing date and bill immediately for the new subscription.

        Updating the quantity on a subscription many times in an hour may result in [rate limiting. If you need to bill for a frequently changing quantity, consider integrating <a href="/docs/billing/subscriptions/usage-based">usage-based billing](https://stripe.com/docs/rate-limits) instead.
        postr  r  r  r  r  r  r   r   r   update  s   zSubscriptionService.updatec              	      r  )r  r  r  r  r  r  Nr  r  r   r   r   update_async  s   
z SubscriptionService.update_asyncrI  c              	   C   r  )K
        Removes the currently applied discount on a subscription.
        r  4/v1/subscriptions/{subscription_exposed_id}/discountr  r  r  )r   r   r  r  r   r  r   r   r   delete_discount+  r  z#SubscriptionService.delete_discountc              	      r  )r  r  r  r  r  r  N)r   r   r  r  r   r  r   r   r   delete_discount_asyncC  r  z)SubscriptionService.delete_discount_asyncrK  c              	   C      t tt | jddd||dS )
        By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
        r  /v1/subscriptionsr  r  )r   r   r   r  r   r  r  r   r   r   list[  s   zSubscriptionService.listc              	      &   t tt | jddd||dI dH S )r  r  r  r  r  N)r   r   r   r  r  r   r   r   
list_asyncn  s   
zSubscriptionService.list_asyncr'   c              	   C   s   t t| jddd||dS )  
        Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

        When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.
        The payment_behavior parameter determines the exact behavior of the initial payment.

        To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead.
        Schedules provide the flexibility to model more complex billing configurations that change over time.
        r  r  r  r  )r   r   r  r  r   r   r   create  s   zSubscriptionService.createc              	      s"   t t| jddd||dI dH S )r  r  r  r  r  N)r   r   r  r  r   r   r   create_async  s   
z SubscriptionService.create_asyncrs  c              	   C   r  )  
        Search for subscriptions you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
        Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
        conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
        to an hour behind during outages. Search functionality is not available to merchants in India.
        r  /v1/subscriptions/searchr  r  )r   r   r   r  r  r   r   r   search  s   zSubscriptionService.searchc              	      r  )r  r  r  r  r  N)r   r   r   r  r  r   r   r   search_async  s   
z SubscriptionService.search_asyncsubscriptionrk  c              	   C   r  )  
        Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
        r  '/v1/subscriptions/{subscription}/resumer  r  r  r  r   r  r  r  r   r   r   resume  s   	zSubscriptionService.resumec              	      r  )r  r  r  r  r  r  Nr  r  r   r   r   resume_async  s   	
z SubscriptionService.resume_asyncN)lr   r   r   r   r   r%   rc   rl   rq   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(  r0  r2  r8  r>  rG  rJ  r_  r`  rg  ri  rj  rp  rr  rv  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   rB  r  r  r  r  r  r   r  r  r   r  r  r  r  r   r  r  r  r  r   r   r   r   r      s*    8


(
,

!








O .


4

,

!








	




/
/








r   N)stripe._discountr   stripe._list_objectr   stripe._request_optionsr   stripe._search_result_objectr   stripe._stripe_servicer   stripe._subscriptionr   stripe._utilr   typingr	   r
   r   typing_extensionsr   r   r   r   r   r   r   r   <module>   s   