
    Ai[(                         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
 d dlmZmZmZ erd dlmZ d dlmZ  G d d	ed	         Zy
)    )CreateableAPIResource)ExpandableField)StripeObject)ClassVarListOptionalcast)LiteralUnpackTYPE_CHECKING)Configuration)SessionCreateParamsc                   8   e Zd ZU dZdZeed      ed<    G d de      Z	e
d   ed<   	 eed<   	 eed	<   	 ee	   ed
<   	 eed<   	 eed<   	 eed      ed<   	 ed   ed<   	 ee   ed<   	 ee   ed<   	 eed<   	 eded   dd fd       Zeded   dd fd       Zd
e	iZy)Sessiona  
    The Billing customer portal is a Stripe-hosted UI for subscription and
    billing management.

    A portal configuration describes the functionality and features that you
    want to provide to your customers through the portal.

    A portal session describes the instantiation of the customer portal for
    a particular customer. By visiting the session's URL, the customer
    can manage their subscriptions and billing details. For security reasons,
    sessions are short-lived and will expire if the customer does not visit the URL.
    Create sessions on-demand when customers intend to manage their subscriptions
    and billing details.

    Related guide: [Customer management](https://docs.stripe.com/customer-management)
    zbilling_portal.sessionOBJECT_NAMEc                       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eed	<   e	e   ed
<   	 e	e   ed<   	 e	e   ed<   	 e
d   ed<   	 eeeedZy)Session.Flowc                   z    e Zd ZU  G d de      Z G d de      Zee   ed<   	 ee   ed<   	 ed   ed<   	 eed	Z	y
)Session.Flow.AfterCompletionc                       e Zd ZU ee   ed<   y)/Session.Flow.AfterCompletion.HostedConfirmationcustom_messageN__name__
__module____qualname__r   str__annotations__     Q/var/www/html/immo/lib/python3.12/site-packages/stripe/billing_portal/_session.pyHostedConfirmationr   (   s     (-r    r"   c                       e Zd ZU eed<   y)%Session.Flow.AfterCompletion.Redirect
return_urlNr   r   r   r   r   r   r    r!   Redirectr$   .   s    r    r'   hosted_confirmationredirect)r(   portal_homepager)   type)r(   r)   N)
r   r   r   r   r"   r'   r   r   r
   _inner_class_typesr   r    r!   AfterCompletionr   '   sb    \ <  "**<!== x(( NOO (:$"r    r-   c                   J    e Zd ZU  G d de      Zee   ed<   	 eed<   	 deiZy)Session.Flow.SubscriptionCancelc                   P    e Zd ZU  G d de      Zee   ed<   	 ed   ed<   	 deiZy))Session.Flow.SubscriptionCancel.Retentionc                       e Zd ZU eed<   y)5Session.Flow.SubscriptionCancel.Retention.CouponOffercouponNr&   r   r    r!   CouponOfferr3   G   s    Kr    r5   coupon_offerr+   N)	r   r   r   r   r5   r   r   r
   r,   r   r    r!   	Retentionr1   F   s?    ,  '{33 n-- '5k%B"r    r7   	retentionsubscriptionN)	r   r   r   r   r7   r   r   r   r,   r   r    r!   SubscriptionCancelr/   E   s<    CL C"  	**  #.y!9r    r:   c                       e Zd ZU eed<   y)Session.Flow.SubscriptionUpdater9   Nr&   r   r    r!   SubscriptionUpdater<   a   s    r    r=   c                   z    e Zd ZU  G d de      Z G d de      Zeee      ed<   	 ee   ed<   	 e	ed<   	 eedZ
y	)
&Session.Flow.SubscriptionUpdateConfirmc                   0    e Zd ZU ee   ed<   	 ee   ed<   y)/Session.Flow.SubscriptionUpdateConfirm.Discountr4   promotion_codeNr   r   r    r!   DiscountrA   h   s"     % !)-r    rC   c                   B    e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   y)+Session.Flow.SubscriptionUpdateConfirm.ItemidpricequantityN)r   r   r   r   r   r   intr   r    r!   ItemrE   r   s3    SM!  }$ #3-'r    rJ   	discountsitemsr9   )rK   rL   N)r   r   r   r   rC   rJ   r   r   r   r   r,   r   r    r!   SubscriptionUpdateConfirmr?   g   s[    < |   X// :  08$!Gr    rM   after_completionsubscription_cancelsubscription_updatesubscription_update_confirm)payment_method_updaterO   rP   rQ   r+   )rN   rO   rP   rQ   N)r   r   r   r   r-   r:   r=   rM   r   r   r
   r,   r   r    r!   Flowr   &   s    	l 	<	: 	:8	 	%	H %	HN *)%&899	 &&899	 &..G%HH	 +
 	
	 !0#5#5+D	
r    rS   r   configurationcreatedcustomerflowrF   livemode)/autobgcsdadeelenzen-AUzen-CAzen-GBzen-IEzen-INzen-NZzen-SGeszes-419etfifilfrzfr-CAhrhurF   itjakoltlvmsmtnbnlplptzpt-BRroruskslsvthtrvizhzzh-HKzzh-TWlocaleobjecton_behalf_ofr%   urlparamsr   returnc                 Z    t        d| j                  d| j                         |            S );
        Creates a session of the customer portal.
        r   postr   )r	   _static_request	class_urlclsr   s     r!   createzSession.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Session.create_async  sD      ++ ,  
 	
s   ,97
	9N)r   r   r   __doc__r   r   r
   r   r   rS   r   rI   r   r   boolclassmethodr   r   r   r,   r   r    r!   r   r      sF   $ 	! '":;< C
| C
J #?33 L M 4. 	G N .0	
2 2f ,-- 3-  
H 
f%:; 
	 
 
 
34
	
 
 !$r    r   N)stripe._createable_api_resourcer   stripe._expandable_fieldr   stripe._stripe_objectr   typingr   r   r   r	   typing_extensionsr
   r   r   $stripe.billing_portal._configurationr   3stripe.params.billing_portal._session_create_paramsr   r   r   r    r!   <module>r      s<    B 4 . 1 1 < <B
X(#I. X(r    