
    Ai3                         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)Customer)CustomerSessionCreateParamsc                       e Zd ZU dZdZeed      ed<    G d de      Z	e
ed<   	 ee	   ed<   	 eed<   	 ed	   ed
<   	 eed<   	 eed<   	 ed   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)CustomerSessiona&  
    A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access
    control over a Customer.

    Related guides: [Customer Session with the Payment Element](https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods),
    [Customer Session with the Pricing Table](https://docs.stripe.com/payments/checkout/pricing-table#customer-session),
    [Customer Session with the Buy Button](https://docs.stripe.com/payment-links/buy-button#pass-an-existing-customer).
    customer_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 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)CustomerSession.Componentsc                       e Zd ZU eed<   y)$CustomerSession.Components.BuyButtonenabledN__name__
__module____qualname__bool__annotations__     K/var/www/html/immo/lib/python3.12/site-packages/stripe/_customer_session.py	BuyButtonr          Mr   r!   c                   J    e Zd ZU  G d de      Zeed<   	 ee   ed<   	 deiZy)(CustomerSession.Components.CustomerSheetc                   B    e Zd ZU eeed         ed<   	 eed      ed<   y)1CustomerSession.Components.CustomerSheet.Featuresalwayslimitedunspecified&payment_method_allow_redisplay_filtersdisabledr   payment_method_removeNr   r   r   r   r   r
   r   r   r   r    Featuresr&   $   s:    8@!CDE9 
 (08M0N'OOr   r0   r   featuresN	r   r   r   r   r0   r   r   r   _inner_class_typesr   r   r    CustomerSheetr$   #   s9    <   M x(( #-h!7r   r4   c                   J    e Zd ZU  G d de      Zeed<   	 ee   ed<   	 deiZy)/CustomerSession.Components.MobilePaymentElementc                       e Zd ZU eeed         ed<   	 eed      ed<   	 eed      ed<   	 eed      ed<   	 eed      ed<   y)	8CustomerSession.Components.MobilePaymentElement.Featuresr'   r+   r,   payment_method_redisplayr.   payment_method_save,payment_method_save_allow_redisplay_overrideNr/   r   r   r    r0   r8   ?   s    8@!CDE9 
 +312+  (08M0N'OO
 &.g6K.L%MM
 ?G>?? r   r0   r   r1   Nr2   r   r   r    MobilePaymentElementr6   >   s:    "< "H M x(( #-h!7r   r<   c                   J    e Zd ZU  G d de      Zeed<   	 ee   ed<   	 deiZy))CustomerSession.Components.PaymentElementc                       e Zd ZU 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	<   y
)2CustomerSession.Components.PaymentElement.Featuresr'   r+   r,   r9   payment_method_redisplay_limitr.   r:   )off_session
on_sessionpayment_method_save_usageN)r   r   r   r   r
   r   r   intr   r   r    r0   r@   n   s    8<>?9 
 +22G*HH 19= (//D'EE
 &--B%CC
 ,478, r   r0   r   r1   Nr2   r   r   r    PaymentElementr>   m   s:    $< $L M x(( #-h!7r   rF   c                       e Zd ZU eed<   y)'CustomerSession.Components.PricingTabler   Nr   r   r   r    PricingTablerH      r"   r   rI   
buy_buttoncustomer_sheetmobile_payment_elementpayment_elementpricing_table)rJ   rK   rL   rM   rN   N)r   r   r   r   r!   r4   r<   rF   rI   r   r3   r   r   r    
Componentsr      s    	 		8L 	86-	8< -	8^/	8\ /	8b	< 	 	 &%	 !54	 ('	 $#	 $+&:-)
r   rO   client_secret
componentscreatedr   customer
expires_atlivemodeobjectparamsr   returnc                 Z    t        d| j                  d| j                         |            S )
        Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
        r   postrW   )r	   _static_request	class_urlclsrW   s     r    createzCustomerSession.create   s6        
 	
r   c                 v   K   t        d| j                  d| j                         |       d{         S 7 w)rZ   r   r[   r\   N)r	   _static_request_asyncr^   r_   s     r    create_asynczCustomerSession.create_async   sD      ++ ,  
 	
s   ,97
	9N)r   r   r   __doc__r   r   r
   r   r   rO   strr   rE   r   r   classmethodr   ra   rd   r3   r   r   r    r   r      s     :LK'"456Kb
\ b
H 
 $$ L j)) O N &'' 
;<
	
 
 
;<
	
 
 '
3r   r   N)stripe._createable_api_resourcer   stripe._expandable_fieldr   stripe._stripe_objectr   typingr   r   r   r	   typing_extensionsr
   r   r   stripe._customerr   -stripe.params._customer_session_create_paramsr   r   r   r   r    <module>ro      s=    B 4 . 1 1 < <)
o4+,=> o4r   