
    <@g(v                         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 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rd dlmZ  G d ded   ed   ed         Zy)    )CreateableAPIResource)ExpandableField)
ListObject)ListableAPIResource)RequestOptions)StripeObject)UpdateableAPIResource)sanitize_id)ClassVarDictListOptionalUnioncast)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)Applicationc                      e Zd ZU dZdZeed      ed<    G d de      Z	 G d de      Z
 G d d	e      Z G d
 de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d  d!e      Z G d" d#e      Z G d$ d%e      Z G d& d'e      Z G d( d)e      Z G d* d+e      Z G d, d-e      Z G d. d/e      Z  G d0 d1e      Z! G d2 d3e      Z" G d4 d5e      Z# G d6 d7e      Z$ G d8 d9e      Z% G d: d;e      Z& G d< d=e      Z' G d> d?e      Z( G d@ dAe      Z)e*edB<   	 e+e,dC      edD<   	 e	edE<   e-edF<   	 e+e.   edG<   	 e
edH<   e.edI<   	 e*edJ<   	 e*edK<   	 eedL<   e+e/e.e.f      edM<   	 ed   edN<   	 e-edO<   	 e0dPe1dQ   dRd fdS       Z2e0dPe1dQ   dRd fdT       Z3e0dPe1dU   dRe4d    fdV       Z5e0dPe1dU   dRe4d    fdW       Z6e0dIe.dPe1dX   dRd fdY       Z7e0dIe.dPe1dX   dRd fdZ       Z8e0dIe.dPe1d[   dRd fd\       Z9e0dIe.dPe1d[   dRd fd]       Z:e	e
ed^Z;y_)`Configurationz^
    A portal configuration describes the functionality and behavior of a portal session.
    zbilling_portal.configurationOBJECT_NAMEc                   B    e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   y)Configuration.BusinessProfileheadlineprivacy_policy_urlterms_of_service_urlN)__name__
__module____qualname__r   str__annotations__     c/var/www/html/AdoubleTech/venv/lib/python3.12/site-packages/stripe/billing_portal/_configuration.pyBusinessProfiler   %   s3    3-	 %SM)	 'sm+	r%   r'   c                       e Zd ZU  G d de      Z G d de      Z G d de      Z G d de      Z G d	 d
e      Zee	d<   ee	d<   ee	d<   ee	d<   ee	d<   eeeeedZ
y)Configuration.Featuresc                   0    e Zd ZU eed      ed<   	 eed<   y)%Configuration.Features.CustomerUpdate)addressemailnamephoneshippingtax_idallowed_updatesenabledN)r   r    r!   r   r   r#   boolr$   r%   r&   CustomerUpdater+   4   s+    !M 
 Mr%   r5   c                       e Zd ZU eed<   y)%Configuration.Features.InvoiceHistoryr3   Nr   r    r!   r4   r#   r$   r%   r&   InvoiceHistoryr7   B       Mr%   r9   c                       e Zd ZU eed<   y)*Configuration.Features.PaymentMethodUpdater3   Nr8   r$   r%   r&   PaymentMethodUpdater<   H   r:   r%   r=   c                   f    e Zd ZU  G d de      Zeed<   eed<   	 ed   ed<   	 ed   ed<   	 deiZy	)
)Configuration.Features.SubscriptionCancelc                   0    e Zd ZU eed<   	 eed      ed<   y)<Configuration.Features.SubscriptionCancel.CancellationReasonr3   customer_servicelow_qualitymissing_featuresotherswitched_servicetoo_complextoo_expensiveunusedoptionsN)r   r    r!   r4   r#   r   r   r$   r%   r&   CancellationReasonrA   O   s-     "	 r%   rL   cancellation_reasonr3   at_period_endimmediatelymodealways_invoicecreate_prorationsnoneproration_behaviorN)	r   r    r!   r   rL   r#   r4   r   _inner_class_typesr$   r%   r&   SubscriptionCancelr?   N   sX    \ * "43M 899 !(=!  #89K!Lr%   rX   c                       e Zd ZU  G d de      Z G d de      Zeed      ed<   	 e	ed<   	 e
ee      ed<   	 ed	   ed
<   	 eed<   eedZy))Configuration.Features.SubscriptionUpdatec                   *    e Zd ZU ee   ed<   	 eed<   y)1Configuration.Features.SubscriptionUpdate.ProductpricesproductNr   r    r!   r   r"   r#   r$   r%   r&   Productr\   v   s    S	! r%   r`   c                   >    e Zd ZU  G d de      Zee   ed<   	 deiZy)=Configuration.Features.SubscriptionUpdate.ScheduleAtPeriodEndc                       e Zd ZU ed   ed<   y)GConfiguration.Features.SubscriptionUpdate.ScheduleAtPeriodEnd.Conditiondecreasing_item_amountshortening_intervaltypeNr   r    r!   r   r#   r$   r%   r&   	Conditionrd      s    !G r%   rj   
conditionsN)r   r    r!   r   rj   r   r#   rW   r$   r%   r&   ScheduleAtPeriodEndrb      s,      !O+ '3I%>"r%   rl   )pricepromotion_codequantitydefault_allowed_updatesr3   productsrR   rV   schedule_at_period_end)rq   rr   N)r   r    r!   r   r`   rl   r   r   r#   r4   r   rW   r$   r%   r&   SubscriptionUpdaterZ   u   s    , ?l ? &*=>&  M tG}-- !(=!  %87#*="r%   rs   customer_updateinvoice_historypayment_method_updatesubscription_cancelsubscription_update)rt   ru   rv   rw   rx   N)r   r    r!   r   r5   r9   r=   rX   rs   r#   rW   r$   r%   r&   Featuresr)   3   sy    	\ 		\ 		, 	%	M %	MN2	 2	h ('''22////--%8#5#5
r%   ry   c                   *    e Zd ZU eed<   	 ee   ed<   y)Configuration.LoginPager3   urlN)r   r    r!   r4   r#   r   r"   r$   r%   r&   	LoginPager{      s    	
 c]	r%   r}   c                       e Zd ZU ed   ed<   	 ed   ed<   	 eee      ed<   	 ded<   	 ed   ed	<   	 eeeef      ed
<   y)Configuration.CreateParams)Configuration.CreateParamsBusinessProfilebusiness_profileLiteral['']|strdefault_return_urlexpand"Configuration.CreateParamsFeaturesfeatures#Configuration.CreateParamsLoginPage
login_pagemetadataN)r   r    r!   r   r#   r   r"   r   r$   r%   r&   CreateParamsr      sz    %7
 	
	 ((9::	 DI&&	 76	   EFF	 d38n--	r%   r   c                   B    e Zd ZU ed   ed<   	 ee   ed<   	 ee   ed<   y)r   r   r   r   r   N)r   r    r!   r   r#   r"   r$   r%   r&   CreateParamsBusinessProfilez)Configuration.CreateParamsBusinessProfile   s7    /00	 (,,	 *#..	r%   r   c                   f    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
<   y)r   0Configuration.CreateParamsFeaturesCustomerUpdatert   0Configuration.CreateParamsFeaturesInvoiceHistoryru   5Configuration.CreateParamsFeaturesPaymentMethodUpdaterv   4Configuration.CreateParamsFeaturesSubscriptionCancelrw   4Configuration.CreateParamsFeaturesSubscriptionUpdaterx   Nr   r    r!   r   r#   r$   r%   r&   CreateParamsFeaturesz"Configuration.CreateParamsFeatures   s    $>
 	
	 %>
 	
	  +C 
 	
	 )B
 	
	 )B
 	
	r%   r   c                   *    e Zd ZU ed   ed<   	 eed<   y)r   TLiteral['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]r2   r3   Nr   r    r!   r   r#   r4   r$   r%   r&   "CreateParamsFeaturesCustomerUpdatez0Configuration.CreateParamsFeaturesCustomerUpdate  s#    $b
 	
	 	r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   "CreateParamsFeaturesInvoiceHistoryz0Configuration.CreateParamsFeaturesInvoiceHistory      	r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   'CreateParamsFeaturesPaymentMethodUpdatez5Configuration.CreateParamsFeaturesPaymentMethodUpdate  r   r%   r   c                   Z    e Zd ZU ed   ed<   	 eed<   	 eed      ed<   	 eed      ed<   y)	r   FConfiguration.CreateParamsFeaturesSubscriptionCancelCancellationReasonrM   r3   rN   rQ   rR   rV   Nr   r    r!   r   r#   r4   r   r$   r%   r&   &CreateParamsFeaturesSubscriptionCancelz4Configuration.CreateParamsFeaturesSubscriptionCancel$  sX    (T
 	
	 	 '"@ABB	 (AB
 	
	r%   r   c                   @    e Zd ZU eed<   	 eed   eed      f   ed<   y)r   r3    rB   rK   N)r   r    r!   r4   r#   r   r   r   r$   r%   r&   8CreateParamsFeaturesSubscriptionCancelCancellationReasonzFConfiguration.CreateParamsFeaturesSubscriptionCancelCancellationReason:  sA    	 BK	
 	
	r%   r   c                   f    e Zd ZU ed   ed<   	 eed<   	 ed   ed<   	 eed      ed<   	 ed   ed	<   y
)r   @Literal['']|List[Literal['price', 'promotion_code', 'quantity']]rp   r3   zMLiteral['']|List[Configuration.CreateParamsFeaturesSubscriptionUpdateProduct]rq   rR   rV   GConfiguration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndrr   Nr   r$   r%   r&   &CreateParamsFeaturesSubscriptionUpdatez4Configuration.CreateParamsFeaturesSubscriptionUpdateR  sn    !,N"
 	
	 	 [
 	
	 (AB
 	
	 !,U!
 	
	r%   r   c                   *    e Zd ZU ee   ed<   	 eed<   y);Configuration.CreateParamsFeaturesSubscriptionUpdateProductr]   r^   Nr_   r$   r%   r&   -CreateParamsFeaturesSubscriptionUpdateProductr   p      S		 	r%   r   c                   $    e Zd ZU eed      ed<   y)r   PConfiguration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionrk   N)r   r    r!   r   r   r#   r$   r%   r&   9CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndzGConfiguration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndz  s    b
 	

	r%   r   c                       e Zd ZU ed   ed<   y)r   re   rh   Nri   r$   r%   r&   BCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionzPConfiguration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition       EFF	r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   CreateParamsLoginPagez#Configuration.CreateParamsLoginPage  r   r%   r   c                   ~    e Zd ZU 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<   y)Configuration.ListParamsactiveending_beforer   
is_defaultlimitstarting_afterN)	r   r    r!   r   r4   r#   r"   r   intr$   r%   r&   
ListParamsr     sp    D!!	 #3''	 DI&&	  %%	 3	 $C((	r%   r   c                       e Zd ZU ee   ed<   	 ed   ed<   	 ed   ed<   	 eee      ed<   	 ed   ed<   	 ed	   ed
<   	 ed   ed<   y)Configuration.ModifyParamsr   )Configuration.ModifyParamsBusinessProfiler   r   r   r   "Configuration.ModifyParamsFeaturesr   #Configuration.ModifyParamsLoginPager   zLiteral['']|Dict[str, str]r   N)r   r    r!   r   r4   r#   r   r"   r$   r%   r&   ModifyParamsr     s    D!!	 &7
 	
	 ((9::	 DI&&	 BCC	   EFF	 :;;	r%   r   c                   B    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   y)r   r   r   r   r   Nr   r$   r%   r&   ModifyParamsBusinessProfilez)Configuration.ModifyParamsBusinessProfile  s9    /00	 ((9::	 **;<<	r%   r   c                   f    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
<   y)r   0Configuration.ModifyParamsFeaturesCustomerUpdatert   0Configuration.ModifyParamsFeaturesInvoiceHistoryru   5Configuration.ModifyParamsFeaturesPaymentMethodUpdaterv   4Configuration.ModifyParamsFeaturesSubscriptionCancelrw   4Configuration.ModifyParamsFeaturesSubscriptionUpdaterx   Nr   r$   r%   r&   ModifyParamsFeaturesz"Configuration.ModifyParamsFeatures  r   r%   r   c                   0    e Zd ZU ed   ed<   	 ee   ed<   y)r   r   r2   r3   Nr   r$   r%   r&   "ModifyParamsFeaturesCustomerUpdatez0Configuration.ModifyParamsFeaturesCustomerUpdate  s)    $b
 	
	 T""	r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   "ModifyParamsFeaturesInvoiceHistoryz0Configuration.ModifyParamsFeaturesInvoiceHistory  r   r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   'ModifyParamsFeaturesPaymentMethodUpdatez5Configuration.ModifyParamsFeaturesPaymentMethodUpdate  r   r%   r   c                   `    e Zd ZU ed   ed<   	 ee   ed<   	 eed      ed<   	 eed      ed<   y)	r   FConfiguration.ModifyParamsFeaturesSubscriptionCancelCancellationReasonrM   r3   rN   rQ   rR   rV   Nr   r$   r%   r&   &ModifyParamsFeaturesSubscriptionCancelz4Configuration.ModifyParamsFeaturesSubscriptionCancel  s^    (T
 	
	 T""	 '"@ABB	 (AB
 	
	r%   r   c                   *    e Zd ZU eed<   	 ed   ed<   y)r   r3   zLiteral['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]rK   N)r   r    r!   r4   r#   r   r$   r%   r&   8ModifyParamsFeaturesSubscriptionCancelCancellationReasonzFConfiguration.ModifyParamsFeaturesSubscriptionCancelCancellationReason(  s&    	  f
 	
	r%   r   c                   l    e Zd ZU ed   ed<   	 ee   ed<   	 ed   ed<   	 eed      ed<   	 ed   ed	<   y
)r   r   rp   r3   zMLiteral['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateProduct]rq   rR   rV   GConfiguration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndrr   Nr   r$   r%   r&   &ModifyParamsFeaturesSubscriptionUpdatez4Configuration.ModifyParamsFeaturesSubscriptionUpdate4  st    !,N"
 	
	 T""	 [
 	
	 (AB
 	
	 !,U!
 	
	r%   r   c                   *    e Zd ZU ee   ed<   	 eed<   y);Configuration.ModifyParamsFeaturesSubscriptionUpdateProductr]   r^   Nr_   r$   r%   r&   -ModifyParamsFeaturesSubscriptionUpdateProductr   R  r   r%   r   c                       e Zd ZU ed   ed<   y)r   zbLiteral['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]rk   Nr   r$   r%   r&   9ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndzGConfiguration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd\  s    p
 	
	r%   r   c                       e Zd ZU ed   ed<   y)PConfiguration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionre   rh   Nri   r$   r%   r&   BModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionr   d  r   r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   ModifyParamsLoginPagez#Configuration.ModifyParamsLoginPagel  s    	r%   r   c                   $    e Zd ZU eee      ed<   y)Configuration.RetrieveParamsr   N)r   r    r!   r   r   r"   r#   r$   r%   r&   RetrieveParamsr   t  s    DI&&	r%   r   r   r   applicationr   createdr   r   idr   livemoder   r   objectupdatedparamsr   returnc                 Z    t        d| j                  d| j                         |            S )j
        Creates a configuration that describes the functionality and behavior of a PortalSession
        r   postr   )r   _static_request	class_urlclsr   s     r&   createzConfiguration.create  s6        
 	
r%   c                 v   K   t        d| j                  d| j                         |       d{         S 7 w)r   r   r   r   N)r   _static_request_asyncr   r   s     r&   create_asynczConfiguration.create_async  sD      ++ ,  
 	
s   ,97
	9r   c                     | j                  d| j                         |      }t        |t              s!t	        dt        |      j                  z        |S )j
        Returns a list of configurations that describe the functionality of the customer portal.
        getr   %Expected list object from API, got %s)r   r   
isinstancer   	TypeErrorrh   r   r   r   results      r&   listzConfiguration.list  s]     $$MMO % 

 &*-7<((* 
 r%   c                    K   | j                  d| j                         |       d{   }t        |t              s!t	        dt        |      j                  z        |S 7 7w)r   r   r   Nr   )r   r   r  r   r  rh   r   r  s      r&   
list_asynczConfiguration.list_async  sk      00MMO 1 
 

 &*-7<((* 
 
s   &A"A 8A"r   c                 z    | j                         dt        |      }t        d| j                  d||            S )b
        Updates a configuration that describes the functionality of the customer portal.
        /r   r   r   )r   r
   r   r   r   r   r   r|   s       r&   modifyzConfiguration.modify  sD     +b/:   
 	
r%   c                    K   | j                         dt        |      }t        d| j                  d||       d{         S 7 w)r	  r
  r   r   r   N)r   r
   r   r   r  s       r&   modify_asynczConfiguration.modify_async  sR      +b/:++ ,  
 	
s   <A	A
	A	r   c                 8     | |fi |}|j                          |S )d
        Retrieves a configuration that describes the functionality of the customer portal.
        )refreshr   r   r   instances       r&   retrievezConfiguration.retrieve  s$     r$V$r%   c                 T   K    | |fi |}|j                          d{    |S 7 w)r  N)refresh_asyncr  s       r&   retrieve_asynczConfiguration.retrieve_async  s3      r$V$$$&&& 	's   (&()r   r   r   N)<r   r    r!   __doc__r   r   r   r#   r   r'   ry   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   r4   r   r   r   r"   r   classmethodr   r   r   r   r  r  r  r  r  r  rW   r$   r%   r&   r   r      s   

 	' '"@AB , A
< A
F
L 
~ 8i y @
Y 
Y )  ,9 0 <	 I 	 ^ 4~ @i y @
Y 
Y )  ,
9 
 <	 I 	   L /-899 &%L !% G  N tCH~&& 233 L 
:;
	
 
 
:;
	
 
 89	O	$ & 89	O	$ & 

 &'C D
	
 
  

 &'C D
	
 
   &'E F	   &'E F	  ,r%   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
   typingr   r   r   r   r   r   typing_extensionsr   r   r   r   r   stripe._applicationr   r   r$   r%   r&   <module>r%     s\    B 4 * = 2 . A $ > >  /R/*(/*Rr%   