
    Ch                         S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr  S SKJr  S SKJr  S S	KJrJrJrJrJrJr  S S
KJrJrJrJrJr  \(       a  S SKJr   " S S\S   \S   \S   5      rg)    )CreateableAPIResource)ExpandableField)
ListObject)ListableAPIResource)RequestOptions)StripeObject)UpdateableAPIResource)sanitize_id)ClassVarDictListOptionalUnioncast)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)Applicationc                      \ rS rSr% SrSr\\S      \S'    " S S\	5      r
 " S S\	5      r " S	 S
\	5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      r " S+ S,\5      r " S- S.\5      r  " S/ S0\5      r! " S1 S2\5      r" " S3 S4\5      r# " S5 S6\5      r$ " S7 S8\5      r% " S9 S:\5      r& " S; S<\5      r' " S= S>\5      r( " S? S@\5      r) " SA SB\5      r* " SC SD\5      r+ " SE SF\5      r,\-\SG'    \.\/SH      \SI'    \
\SJ'   \0\SK'    \.\1   \SL'    \\SM'   \1\SN'    \-\SO'    \-\SP'    \\SQ'   \.\2\1\14      \SR'    \.\1   \SS'    \S   \ST'    \0\SU'    \3SV\4SW   SXS 4SY j5       r5\3SV\4SW   SXS 4SZ j5       r6\3SV\4S[   SX\7S    4S\ j5       r8\3SV\4S[   SX\7S    4S] j5       r9\3SN\1SV\4S^   SXS 4S_ j5       r:\3SN\1SV\4S^   SXS 4S` j5       r;\3SN\1SV\4Sa   SXS 4Sb j5       r<\3SN\1SV\4Sa   SXS 4Sc j5       r=\
\\Sd.r>Ser?gf)gConfiguration   zV
A portal configuration describes the functionality and behavior of a portal session.
zbilling_portal.configurationOBJECT_NAMEc                   J    \ rS rSr% \\   \S'    \\   \S'    \\   \S'   Srg)Configuration.BusinessProfile%   headlineprivacy_policy_urlterms_of_service_url N)__name__
__module____qualname____firstlineno__r   str__annotations____static_attributes__r!       g/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/stripe/billing_portal/_configuration.pyBusinessProfiler   %   s3    3-	 %SM)	 'sm+	r)   r+   c                       \ rS rSr%  " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      r	\\
S'   \\
S'   \\
S'   \\
S'   \	\
S'   \\\\\	S.rSrg)Configuration.Features3   c                   8    \ rS rSr% \\S      \S'    \\S'   Srg)%Configuration.Features.CustomerUpdate4   )addressemailnamephoneshippingtax_idallowed_updatesenabledr!   N)	r"   r#   r$   r%   r   r   r'   boolr(   r!   r)   r*   CustomerUpdater0   4   s+    !M 
 Mr)   r;   c                        \ rS rSr% \\S'   Srg)%Configuration.Features.InvoiceHistoryB   r9   r!   Nr"   r#   r$   r%   r:   r'   r(   r!   r)   r*   InvoiceHistoryr=   B       Mr)   r@   c                        \ rS rSr% \\S'   Srg)*Configuration.Features.PaymentMethodUpdateH   r9   r!   Nr?   r!   r)   r*   PaymentMethodUpdaterC   H   rA   r)   rE   c                   n    \ rS rSr%  " S S\5      r\\S'   \\S'    \S   \S'    \S   \S	'    S\0r	S
r
g))Configuration.Features.SubscriptionCancelN   c                   8    \ rS rSr% \\S'    \\S      \S'   Srg)<Configuration.Features.SubscriptionCancel.CancellationReasonO   r9   customer_servicelow_qualitymissing_featuresotherswitched_servicetoo_complextoo_expensiveunusedoptionsr!   N)	r"   r#   r$   r%   r:   r'   r   r   r(   r!   r)   r*   CancellationReasonrJ   O   s-     "	 r)   rV   cancellation_reasonr9   at_period_endimmediatelymodealways_invoicecreate_prorationsnoneproration_behaviorr!   N)r"   r#   r$   r%   r   rV   r'   r:   r   _inner_class_typesr(   r!   r)   r*   SubscriptionCancelrG   N   sX    \ * "43M 899 !(=!  #89K!Lr)   rb   c                       \ rS rSr%  " S S\5      r " S S\5      r\\S      \	S'    \
\	S'    \\\      \	S	'    \S
   \	S'    \\	S'   \\S.rSrg))Configuration.Features.SubscriptionUpdateu   c                   \    \ rS rSr%  " S S\5      r\\S'   \\   \S'    \\S'    S\0r	Sr
g)	1Configuration.Features.SubscriptionUpdate.Productv   c                   >    \ rS rSr% \\S'    \\   \S'    \\S'   Srg)DConfiguration.Features.SubscriptionUpdate.Product.AdjustableQuantityw   r9   maximumminimumr!   N)	r"   r#   r$   r%   r:   r'   r   intr(   r!   r)   r*   AdjustableQuantityrj   w   s)    !M &c]* !Lr)   ro   adjustable_quantitypricesproductr!   N)r"   r#   r$   r%   r   ro   r'   r   r&   ra   r(   r!   r)   r*   Productrg   v   sA      &87S	!  *+=&"r)   rs   c                   F    \ rS rSr%  " S S\5      r\\   \S'    S\0rSr	g)=Configuration.Features.SubscriptionUpdate.ScheduleAtPeriodEnd   c                   &    \ rS rSr% \S   \S'   Srg)GConfiguration.Features.SubscriptionUpdate.ScheduleAtPeriodEnd.Condition   decreasing_item_amountshortening_intervaltyper!   Nr"   r#   r$   r%   r   r'   r(   r!   r)   r*   	Conditionrx      s    !G r)   r   
conditionsr!   N)
r"   r#   r$   r%   r   r   r   r'   ra   r(   r!   r)   r*   ScheduleAtPeriodEndru      s,      !O+ '3I%>"r)   r   )pricepromotion_codequantitydefault_allowed_updatesr9   productsr\   r`   schedule_at_period_end)r   r   r!   N)r"   r#   r$   r%   r   rs   r   r   r   r'   r:   r   ra   r(   r!   r)   r*   SubscriptionUpdaterd   u   s    , 8?l ? &*=>&  M tG}-- !(=!  %87#*="r)   r   customer_updateinvoice_historypayment_method_updatesubscription_cancelsubscription_update)r   r   r   r   r   r!   N)r"   r#   r$   r%   r   r;   r@   rE   rb   r   r'   ra   r(   r!   r)   r*   Featuresr-   3   s{    	\ 		\ 		, 	%	M %	MND	 D	L ('''22////--%8#5#5
r)   r   c                   2    \ rS rSr% \\S'    \\   \S'   Srg)Configuration.LoginPage   r9   urlr!   N)	r"   r#   r$   r%   r:   r'   r   r&   r(   r!   r)   r*   	LoginPager      s    	
 c]	r)   r   c                       \ rS rSr% \S   \S'    \S   \S'    \\\      \S'    S\S'    \S	   \S
'    \\\\4      \S'    \S   \S'   Sr	g)Configuration.CreateParams   )Configuration.CreateParamsBusinessProfilebusiness_profileLiteral['']|strdefault_return_urlexpand"Configuration.CreateParamsFeaturesfeatures#Configuration.CreateParamsLoginPage
login_pagemetadatar4   r!   N)
r"   r#   r$   r%   r   r'   r   r&   r   r(   r!   r)   r*   CreateParamsr      s    %7
 	
	 ((9::	 DI&&	 76	   EFF	 d38n--	 +,,	r)   r   c                   J    \ rS rSr% \S   \S'    \\   \S'    \\   \S'   Srg)r      r   r   r   r    r!   N)r"   r#   r$   r%   r   r'   r&   r(   r!   r)   r*   CreateParamsBusinessProfile)Configuration.CreateParamsBusinessProfile   s7    /00	 (,,	 *#..	r)   r   c                   n    \ rS rSr% \S   \S'    \S   \S'    \S   \S'    \S   \S	'    \S
   \S'   Srg)r   i  0Configuration.CreateParamsFeaturesCustomerUpdater   0Configuration.CreateParamsFeaturesInvoiceHistoryr   5Configuration.CreateParamsFeaturesPaymentMethodUpdater   4Configuration.CreateParamsFeaturesSubscriptionCancelr   4Configuration.CreateParamsFeaturesSubscriptionUpdater   r!   Nr"   r#   r$   r%   r   r'   r(   r!   r)   r*   CreateParamsFeatures"Configuration.CreateParamsFeatures  s    $>
 	
	 %>
 	
	  +C 
 	
	 )B
 	
	 )B
 	
	r)   r   c                   2    \ rS rSr% \S   \S'    \\S'   Srg)r   i"  TLiteral['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]r8   r9   r!   Nr"   r#   r$   r%   r   r'   r:   r(   r!   r)   r*   "CreateParamsFeaturesCustomerUpdate0Configuration.CreateParamsFeaturesCustomerUpdate"  s#    $b
 	
	 	r)   r   c                        \ rS rSr% \\S'   Srg)r   i.  r9   r!   Nr?   r!   r)   r*   "CreateParamsFeaturesInvoiceHistory0Configuration.CreateParamsFeaturesInvoiceHistory.      	r)   r   c                        \ rS rSr% \\S'   Srg)r   i4  r9   r!   Nr?   r!   r)   r*   'CreateParamsFeaturesPaymentMethodUpdate5Configuration.CreateParamsFeaturesPaymentMethodUpdate4  r   r)   r   c                   b    \ rS rSr% \S   \S'    \\S'    \\S      \S'    \\S      \S'   S	rg
)r   i:  FConfiguration.CreateParamsFeaturesSubscriptionCancelCancellationReasonrW   r9   rX   r[   r\   r`   r!   N	r"   r#   r$   r%   r   r'   r:   r   r(   r!   r)   r*   &CreateParamsFeaturesSubscriptionCancel4Configuration.CreateParamsFeaturesSubscriptionCancel:  sX    (T
 	
	 	 '"@ABB	 (AB
 	
	r)   r   c                   H    \ rS rSr% \\S'    \\S   \\S      4   \S'   Sr	g)r   iP  r9    rL   rU   r!   N)
r"   r#   r$   r%   r:   r'   r   r   r   r(   r!   r)   r*   8CreateParamsFeaturesSubscriptionCancelCancellationReasonFConfiguration.CreateParamsFeaturesSubscriptionCancelCancellationReasonP  sA    	 BK	
 	
	r)   r   c                   n    \ rS rSr% \S   \S'    \\S'    \S   \S'    \\S      \S'    \S	   \S
'   Srg)r   ih  @Literal['']|List[Literal['price', 'promotion_code', 'quantity']]r   r9   zMLiteral['']|List[Configuration.CreateParamsFeaturesSubscriptionUpdateProduct]r   r\   r`   GConfiguration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndr   r!   Nr   r!   r)   r*   &CreateParamsFeaturesSubscriptionUpdate4Configuration.CreateParamsFeaturesSubscriptionUpdateh  sn    !,N"
 	
	 	 [
 	
	 (AB
 	
	 !,U!
 	
	r)   r   c                   D    \ rS rSr% \S   \S'    \\   \S'    \\S'   Srg);Configuration.CreateParamsFeaturesSubscriptionUpdateProducti  MConfiguration.CreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantityrp   rq   rr   r!   N	r"   r#   r$   r%   r   r'   r   r&   r(   r!   r)   r*   -CreateParamsFeaturesSubscriptionUpdateProductr     4    ([
 	
	 S		 	r)   r   c                   D    \ rS rSr% \\S'    \\   \S'    \\   \S'   Srg)r   i  r9   rl   rm   r!   N	r"   r#   r$   r%   r:   r'   r   rn   r(   r!   r)   r*   ?CreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantityMConfiguration.CreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity  2     	 S!!	 S!!	r)   r   c                   ,    \ rS rSr% \\S      \S'   Srg)r   i  PConfiguration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionr   r!   N)r"   r#   r$   r%   r   r   r'   r(   r!   r)   r*   9CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndGConfiguration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd  s    b
 	

	r)   r   c                   &    \ rS rSr% \S   \S'   Srg)r   i  rz   r}   r!   Nr~   r!   r)   r*   BCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionPConfiguration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition       EFF	r)   r   c                        \ rS rSr% \\S'   Srg)r   i  r9   r!   Nr?   r!   r)   r*   CreateParamsLoginPage#Configuration.CreateParamsLoginPage  r   r)   r   c                       \ rS rSr% \\   \S'    \\   \S'    \\\      \S'    \\   \S'    \\	   \S'    \\   \S'   Sr
g	)
Configuration.ListParamsi  activeending_beforer   
is_defaultlimitstarting_afterr!   N)r"   r#   r$   r%   r   r:   r'   r&   r   rn   r(   r!   r)   r*   
ListParamsr     sp    D!!	 #3''	 DI&&	  %%	 3	 $C((	r)   r   c                       \ rS rSr% \\   \S'    \S   \S'    \S   \S'    \\\      \S'    \S   \S	'    \S
   \S'    \S   \S'    \S   \S'   Sr	g)Configuration.ModifyParamsi  r   )Configuration.ModifyParamsBusinessProfiler   r   r   r   "Configuration.ModifyParamsFeaturesr   #Configuration.ModifyParamsLoginPager   zLiteral['']|Dict[str, str]r   r4   r!   N)
r"   r#   r$   r%   r   r:   r'   r   r&   r(   r!   r)   r*   ModifyParamsr     s    D!!	 &7
 	
	 ((9::	 DI&&	 BCC	   EFF	 :;;	 +,,	r)   r   c                   J    \ rS rSr% \S   \S'    \S   \S'    \S   \S'   Srg)r   i  r   r   r   r    r!   Nr   r!   r)   r*   ModifyParamsBusinessProfile)Configuration.ModifyParamsBusinessProfile  s9    /00	 ((9::	 **;<<	r)   r   c                   n    \ rS rSr% \S   \S'    \S   \S'    \S   \S'    \S   \S	'    \S
   \S'   Srg)r   i
  0Configuration.ModifyParamsFeaturesCustomerUpdater   0Configuration.ModifyParamsFeaturesInvoiceHistoryr   5Configuration.ModifyParamsFeaturesPaymentMethodUpdater   4Configuration.ModifyParamsFeaturesSubscriptionCancelr   4Configuration.ModifyParamsFeaturesSubscriptionUpdater   r!   Nr   r!   r)   r*   ModifyParamsFeatures"Configuration.ModifyParamsFeatures
  r   r)   r   c                   8    \ rS rSr% \S   \S'    \\   \S'   Srg)r   i*  r   r8   r9   r!   Nr   r!   r)   r*   "ModifyParamsFeaturesCustomerUpdate0Configuration.ModifyParamsFeaturesCustomerUpdate*  s)    $b
 	
	 T""	r)   r   c                        \ rS rSr% \\S'   Srg)r   i6  r9   r!   Nr?   r!   r)   r*   "ModifyParamsFeaturesInvoiceHistory0Configuration.ModifyParamsFeaturesInvoiceHistory6  r   r)   r   c                        \ rS rSr% \\S'   Srg)r   i<  r9   r!   Nr?   r!   r)   r*   'ModifyParamsFeaturesPaymentMethodUpdate5Configuration.ModifyParamsFeaturesPaymentMethodUpdate<  r   r)   r   c                   h    \ rS rSr% \S   \S'    \\   \S'    \\S      \S'    \\S      \S'   S	rg
)r   iB  FConfiguration.ModifyParamsFeaturesSubscriptionCancelCancellationReasonrW   r9   rX   r[   r\   r`   r!   Nr   r!   r)   r*   &ModifyParamsFeaturesSubscriptionCancel4Configuration.ModifyParamsFeaturesSubscriptionCancelB  s^    (T
 	
	 T""	 '"@ABB	 (AB
 	
	r)   r  c                   2    \ rS rSr% \\S'    \S   \S'   Srg)r  iX  r9   zLiteral['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]rU   r!   N)r"   r#   r$   r%   r:   r'   r   r(   r!   r)   r*   8ModifyParamsFeaturesSubscriptionCancelCancellationReasonFConfiguration.ModifyParamsFeaturesSubscriptionCancelCancellationReasonX  s&    	  f
 	
	r)   r  c                   t    \ rS rSr% \S   \S'    \\   \S'    \S   \S'    \\S      \S'    \S	   \S
'   Srg)r   id  r   r   r9   zMLiteral['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateProduct]r   r\   r`   GConfiguration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndr   r!   Nr   r!   r)   r*   &ModifyParamsFeaturesSubscriptionUpdate4Configuration.ModifyParamsFeaturesSubscriptionUpdated  st    !,N"
 	
	 T""	 [
 	
	 (AB
 	
	 !,U!
 	
	r)   r  c                   D    \ rS rSr% \S   \S'    \\   \S'    \\S'   Srg);Configuration.ModifyParamsFeaturesSubscriptionUpdateProducti  MConfiguration.ModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantityrp   rq   rr   r!   Nr   r!   r)   r*   -ModifyParamsFeaturesSubscriptionUpdateProductr    r   r)   r  c                   D    \ rS rSr% \\S'    \\   \S'    \\   \S'   Srg)r  i  r9   rl   rm   r!   Nr   r!   r)   r*   ?ModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantityMConfiguration.ModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantity  r   r)   r  c                   &    \ rS rSr% \S   \S'   Srg)r
  i  zbLiteral['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]r   r!   Nr   r!   r)   r*   9ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndGConfiguration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd  s    p
 	
	r)   r  c                   &    \ rS rSr% \S   \S'   Srg)PConfiguration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndConditioni  rz   r}   r!   Nr~   r!   r)   r*   BModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionr    r   r)   r  c                        \ rS rSr% \\S'   Srg)r   i  r9   r!   Nr?   r!   r)   r*   ModifyParamsLoginPage#Configuration.ModifyParamsLoginPage  s    	r)   r  c                   ,    \ rS rSr% \\\      \S'   Srg)Configuration.RetrieveParamsi  r   r!   N)	r"   r#   r$   r%   r   r   r&   r'   r(   r!   r)   r*   RetrieveParamsr    s    DI&&	r)   r  r   r   applicationr   createdr   r   idr   livemoder   r   r4   objectupdatedparamsr   returnc           	      T    [        SU R                  SU R                  5       US95      $ )Z
Creates a configuration that describes the functionality and behavior of a PortalSession
r   postr&  )r   _static_request	class_urlclsr&  s     r*   createConfiguration.create  s6        
 	
r)   c           	      p   #    [        SU R                  SU R                  5       US9I Sh  vN 5      $  N7f)r)  r   r*  r+  N)r   _static_request_asyncr-  r.  s     r*   create_asyncConfiguration.create_async   sC      ++ ,  
 	
s   )64
	6r   c                     U R                  SU R                  5       US9n[        U[        5      (       d!  [	        S[        U5      R                  -  5      eU$ )Z
Returns a list of configurations that describe the functionality of the customer portal.
getr+  %Expected list object from API, got %s)r,  r-  
isinstancer   	TypeErrorr}   r"   r/  r&  results      r*   listConfiguration.list  s`     $$MMO % 

 &*--7<((* 
 r)   c                    #    U R                  SU R                  5       US9I Sh  vN n[        U[        5      (       d!  [	        S[        U5      R                  -  5      eU$  N<7f)r7  r8  r+  Nr9  )r3  r-  r:  r   r;  r}   r"   r<  s      r*   
list_asyncConfiguration.list_async$  sm      00MMO 1 
 

 &*--7<((* 
 
s   #A$A"=A$r   c           	      x    U R                  5       < S[        U5      < 3n[        SU R                  SUUS95      $ )R
Updates a configuration that describes the functionality of the customer portal.
/r   r*  r+  )r-  r
   r   r,  r/  r"  r&  r   s       r*   modifyConfiguration.modify8  sD     +b/:   
 	
r)   c           	         #    U R                  5       < S[        U5      < 3n[        SU R                  SUUS9I Sh  vN 5      $  N7f)rD  rE  r   r*  r+  N)r-  r
   r   r3  rF  s       r*   modify_asyncConfiguration.modify_asyncI  sQ      +b/:++ ,  
 	
s   ;AA
	Ar  c                 8    U " U40 UD6nUR                  5         U$ )T
Retrieves a configuration that describes the functionality of the customer portal.
)refreshr/  r"  r&  instances       r*   retrieveConfiguration.retrieveZ  s$     r$V$r)   c                 T   #    U " U40 UD6nUR                  5       I Sh  vN   U$  N7f)rM  N)refresh_asyncrO  s       r*   retrieve_asyncConfiguration.retrieve_asynce  s2      r$V$$$&&& 	's   (&()r   r   r   r!   N)@r"   r#   r$   r%   __doc__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   rn   r&   r   classmethodr   r0  r4  r   r>  rA  rG  rJ  rQ  rU  ra   r(   r!   r)   r*   r   r      s   

 	' '"@AB , S
< S
j
L 
~ @i y @
Y 
Y )  ,9 0 <	   I 	 ^ 4"~ "Hi y @
Y 
Y )  ,
9 
 <	   I 	   L /-899 &%L !% G  N tCH~&& 3- 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>rd     s\    B 4 * = 2 . A $ > >  /\/*(/*\r)   