
    +hp                         d dl mZmZ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 d dlmZ erd d	lmZ  G d
 ded   ed   ed         Zy)    )CreateableAPIResourceListableAPIResourceUpdateableAPIResource)ExpandableField)
ListObject)RequestOptions)StripeObject)ClassVarDictListOptionalUnioncast)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)
quote_plus)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er 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(e)ed><   	 e*e+d?      ed@<   	 e	edA<   e,edB<   	 e*e-   edC<   	 e
edD<   e-edE<   	 e)edF<   	 e)edG<   	 eedH<   e*e.e-e-f      edI<   	 ed   edJ<   	 e,edK<   	 e/	 	 	 	 d\dMe*e-   dNe*e-   dOe*e-   dPe*e-   dQe0dR   dSd fdT       Z1e/	 	 	 d]dMe*e-   dOe*e-   dPe*e-   dQe0dU   dSe2d    f
dV       Z3e/dEe-dQe0dW   dSd fdX       Z4e/dEe-dQe0dY   dSd fdZ       Z5e	e
ed[Z6yL)^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__     d/var/www/html/venv/lib/python3.12/site-packages/stripe/api_resources/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 G d de      Z	ee
d<   ee
d<   ee
d<   ee
d<   ee
d<   e	e
d<   e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+   6   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   D       Mr%   r9   c                       e Zd ZU eed<   y)*Configuration.Features.PaymentMethodUpdater3   Nr8   r$   r%   r&   PaymentMethodUpdater<   J   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   Q   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?   P   sX    \ * "43M 899 !(=!  #89K!Lr%   rW   c                       e Zd ZU eed<   y)(Configuration.Features.SubscriptionPauser3   Nr8   r$   r%   r&   SubscriptionPauserY   w   r:   r%   rZ   c                   z    e Zd ZU  G d de      Zeed      ed<   	 eed<   	 e	ee      ed<   	 ed   ed<   	 dei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^   ~   s    S	! r%   rb   pricepromotion_codequantitydefault_allowed_updatesr3   productsrQ   rU   N)r   r    r!   r	   rb   r   r   r#   r4   r   rV   r$   r%   r&   SubscriptionUpdater\   }   sq    ,  &*=>&  M tG}-- !(=!  #-g!6r%   ri   customer_updateinvoice_historypayment_method_updatesubscription_cancelsubscription_pausesubscription_update)rj   rk   rl   rm   rn   ro   N)r   r    r!   r	   r5   r9   r=   rW   rZ   ri   r#   rV   r$   r%   r&   Featuresr)   5   s    	\ 		\ 		, 	%	M %	MN	 		7 	7B ('''22//--//--%8#5"3#5
r%   rp   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&   	LoginPagerr      s    	
 c]	r%   rt   c                   l    e Zd ZU ded<   	 ed   ed<   	 ed   ed<   	 ded<   	 ed	   ed
<   	 ed   ed<   y)Configuration.CreateParams)Configuration.CreateParamsBusinessProfilebusiness_profileLiteral['']|strdefault_return_url	List[str]expand"Configuration.CreateParamsFeaturesfeatures#Configuration.CreateParamsLoginPage
login_pagezDict[str, str]metadataN)r   r    r!   r#   r   r$   r%   r&   CreateParamsrv      se    II !,,= >>  ,, ;: $$IJJ ""233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                   x    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<   y)r}   0Configuration.CreateParamsFeaturesCustomerUpdaterj   0Configuration.CreateParamsFeaturesInvoiceHistoryrk   5Configuration.CreateParamsFeaturesPaymentMethodUpdaterl   4Configuration.CreateParamsFeaturesSubscriptionCancelrm   3Configuration.CreateParamsFeaturesSubscriptionPausern   4Configuration.CreateParamsFeaturesSubscriptionUpdatero   Nr   r    r!   r   r#   r$   r%   r&   CreateParamsFeaturesz"Configuration.CreateParamsFeatures       (B  )B  $/G$  "-F"  !,E!  "-F" r%   r   c                   t    e Zd ZU eed   eed      f   ed<   	 eed<   	 eed   ed   f   ed<   	 ed   ed<   y	)
r    rc   rg   r3   ;Configuration.CreateParamsFeaturesSubscriptionUpdateProductrh   6Literal['always_invoice', 'create_prorations', 'none']rU   N)	r   r    r!   r   r   r   r#   r4   r   r$   r%   r&   &CreateParamsFeaturesSubscriptionUpdatez4Configuration.CreateParamsFeaturesSubscriptionUpdate  s}    %*WBCDF&  M Q  !,H! r%   r   c                   *    e Zd ZU ee   ed<   	 eed<   y)r   r_   r`   Nra   r$   r%   r&   -CreateParamsFeaturesSubscriptionUpdateProductz;Configuration.CreateParamsFeaturesSubscriptionUpdateProduct      I Lr%   r   c                       e Zd ZU ed   ed<   y)r   r4   r3   Nr   r$   r%   r&   %CreateParamsFeaturesSubscriptionPausez3Configuration.CreateParamsFeaturesSubscriptionPause'       ((r%   r   c                   N    e Zd ZU ed   ed<   	 eed<   	 ed   ed<   	 ed   ed<   y)	r   FConfiguration.CreateParamsFeaturesSubscriptionCancelCancellationReasonrM   r3   'Literal['at_period_end', 'immediately']rP   r   rU   Nr   r    r!   r   r#   r4   r$   r%   r&   &CreateParamsFeaturesSubscriptionCancelz4Configuration.CreateParamsFeaturesSubscriptionCancel-  sM    !,X"  M GHH !,H! r%   r   c                   @    e Zd ZU eed<   	 eed   eed      f   ed<   y)r   r3   r   rB   rK   N)r   r    r!   r4   r#   r   r   r   r$   r%   r&   8CreateParamsFeaturesSubscriptionCancelCancellationReasonzFConfiguration.CreateParamsFeaturesSubscriptionCancelCancellationReasonC  sC     M "	 r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   'CreateParamsFeaturesPaymentMethodUpdatez5Configuration.CreateParamsFeaturesPaymentMethodUpdate]  r:   r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   "CreateParamsFeaturesInvoiceHistoryz0Configuration.CreateParamsFeaturesInvoiceHistoryc  r:   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   Nr   r$   r%   r&   "CreateParamsFeaturesCustomerUpdatez0Configuration.CreateParamsFeaturesCustomerUpdatei  s#    (f  Mr%   r   c                   B    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   y)rw   ry   r   r"   r   r   Nr   r$   r%   r&   CreateParamsBusinessProfilez)Configuration.CreateParamsBusinessProfileu  s7    !"344 !,E 22 #.e"44r%   r   c                   x    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
<   y)Configuration.ListParamsr4   activer"   ending_beforer{   r|   
is_defaultintlimitstarting_afterNr   r$   r%   r&   
ListParamsr     sl    '' 'u--  ,, $F++ u%% (..r%   r   c                       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<   y)Configuration.ModifyParamsr4   r   )Configuration.ModifyParamsBusinessProfilerx   ry   rz   r{   r|   "Configuration.ModifyParamsFeaturesr~   #Configuration.ModifyParamsLoginPager   zLiteral['']|Dict[str, str]r   Nr   r$   r%   r&   ModifyParamsr     s    '' *;  !,,= >>  ,, ""FGG $$IJJ "">??r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   ModifyParamsLoginPagez#Configuration.ModifyParamsLoginPage  s    Mr%   r   c                   x    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<   y)r   0Configuration.ModifyParamsFeaturesCustomerUpdaterj   0Configuration.ModifyParamsFeaturesInvoiceHistoryrk   5Configuration.ModifyParamsFeaturesPaymentMethodUpdaterl   4Configuration.ModifyParamsFeaturesSubscriptionCancelrm   3Configuration.ModifyParamsFeaturesSubscriptionPausern   4Configuration.ModifyParamsFeaturesSubscriptionUpdatero   Nr   r$   r%   r&   ModifyParamsFeaturesz"Configuration.ModifyParamsFeatures  r   r%   r   c                   T    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   y	)
r   z@Literal['']|List[Literal['price', 'promotion_code', 'quantity']]rg   r4   r3   zMLiteral['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateProduct]rh   r   rU   Nr   r$   r%   r&   &ModifyParamsFeaturesSubscriptionUpdatez4Configuration.ModifyParamsFeaturesSubscriptionUpdate  sW    %0R&  !(( "_  !,H! r%   r   c                   *    e Zd ZU ee   ed<   	 eed<   y);Configuration.ModifyParamsFeaturesSubscriptionUpdateProductr_   r`   Nra   r$   r%   r&   -ModifyParamsFeaturesSubscriptionUpdateProductr     r   r%   r   c                       e Zd ZU ed   ed<   y)r   r4   r3   Nr   r$   r%   r&   %ModifyParamsFeaturesSubscriptionPausez3Configuration.ModifyParamsFeaturesSubscriptionPause  r   r%   r   c                   T    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   y	)
r   FConfiguration.ModifyParamsFeaturesSubscriptionCancelCancellationReasonrM   r4   r3   r   rP   r   rU   Nr   r$   r%   r&   &ModifyParamsFeaturesSubscriptionCancelz4Configuration.ModifyParamsFeaturesSubscriptionCancel  sS    !,X"  !(( GHH !,H! 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(     M ! j r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   'ModifyParamsFeaturesPaymentMethodUpdatez5Configuration.ModifyParamsFeaturesPaymentMethodUpdate7  r:   r%   r   c                       e Zd ZU eed<   y)r   r3   Nr8   r$   r%   r&   "ModifyParamsFeaturesInvoiceHistoryz0Configuration.ModifyParamsFeaturesInvoiceHistory=  r:   r%   r   c                   0    e Zd ZU ed   ed<   	 ed   ed<   y)r   r   r2   r4   r3   Nr   r$   r%   r&   "ModifyParamsFeaturesCustomerUpdatez0Configuration.ModifyParamsFeaturesCustomerUpdateC  s)    (f  !((r%   r   c                   B    e Zd ZU ed   ed<   	 ed   ed<   	 ed   ed<   y)r   ry   r   r   r   Nr   r$   r%   r&   ModifyParamsBusinessProfilez)Configuration.ModifyParamsBusinessProfileO  s9    !"344 !,,= >> #..?"@@r%   r   c                       e Zd ZU ed   ed<   y)Configuration.RetrieveParamsr{   r|   Nr   r$   r%   r&   RetrieveParamsr   ]  s    ,,r%   r   r   r   applicationrx   createdrz   r~   idr   livemoder   r   objectupdatedNapi_keyidempotency_keystripe_versionstripe_accountparamsrv   returnc                 `    t        d| j                  d| j                         |||||            S )zj
        Creates a configuration that describes the functionality and behavior of a PortalSession
        r   post)r   _static_request	class_url)clsr   r   r   r   r   s         r&   createzConfiguration.create  s=     
 	
r%   r   c                     | j                  d| j                         ||||      }t        |t              s!t	        dt        |      j                  z        |S )zj
        Returns a list of configurations that describe the functionality of the customer portal.
        get)r   r   r   r   z%Expected list object from API, got %s)r   r   
isinstancer   	TypeErrortyper   )r   r   r   r   r   results         r&   listzConfiguration.list  sf     $$MMO)) % 
 &*-7<((* 
 r%   r   c                 z    | j                         dt        |      }t        d| j                  d||            S )zb
        Updates a configuration that describes the functionality of the customer portal.
        /r   r   )r   )r   r   r   r   )r   r   r   rs   s       r&   modifyzConfiguration.modify  s=     *R.9F;
 	
r%   r   c                 8     | |fi |}|j                          |S )zd
        Retrieves a configuration that describes the functionality of the customer portal.
        )refresh)r   r   r   instances       r&   retrievezConfiguration.retrieve  s$     r$V$r%   )rx   r~   r   )NNNN)NNN)7r   r    r!   __doc__r   r
   r   r#   r	   r'   rp   rt   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   rV   r$   r%   r&   r   r      s   
 	' ./ ', v
< v
p
L 
 	> 	4	I 	$	9 $	L	Y 	8	I 		I 		Y 	,		4	i 		 	
	 
		) 		 	4	> 	@	I 	$	9 $	L	Y 	0	I 		I 		Y 	,			i 		 	
	 
		) 		^ 	 L /-899 &%L !% G  N tCH~&& 233 L  "&)-(,(,
#
 "#
 !	

 !
 56
 

 
0  "&(,(,	# ! !	
 34 
O	$ 6 



 &'C D

	

 

  &'E F	  ,r%   r   N)stripe.api_resources.abstractr   r   r   %stripe.api_resources.expandable_fieldr    stripe.api_resources.list_objectr   stripe.request_optionsr   stripe.stripe_objectr	   typingr
   r   r   r   r   r   typing_extensionsr   r   r   r   r   urllib.parser    stripe.api_resources.applicationr   r   r$   r%   r&   <module>r     s]    
 B 7 1 - > >  $<F/*(/*Fr%   