
    kh                         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eed<   	 eed<   	 eed	<   	 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__     X/var/www/api/v1/venv_fitandmore/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.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.Features)alwayslimitedunspecified&payment_method_allow_redisplay_filters)disabledr   payment_method_redisplaypayment_method_redisplay_limitpayment_method_removepayment_method_save)off_session
on_sessionpayment_method_save_usageN)r   r   r   r   r
   r   r   intr   r   r    Featuresr&   $   s    8<>?9 
 +22G*HH 19= (//D'EE
 &--B%CC
 ,478, r   r4   r   featuresN)	r   r   r   r   r4   r   r   r   _inner_class_typesr   r   r    PaymentElementr$   #   s:    $< $L M x(( #-h!7r   r7   c                       e Zd ZU eed<   y)'CustomerSession.Components.PricingTabler   Nr   r   r   r    PricingTabler9   T   r"   r   r:   
buy_buttonpayment_elementpricing_table)r;   r<   r=   N)	r   r   r   r   r!   r7   r:   r   r6   r   r   r    
Componentsr      sa    	 	/	8\ /	8b	< 	 	 ('	 $#	 $-)
r   r>   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rF   )r	   _static_request	class_urlclsrF   s     r    createzCustomerSession.create   s6        
 	
r   c                 v   K   t        d| j                  d| j                         |       d{         S 7 w)rI   r   rJ   rK   N)r	   _static_request_asyncrM   rN   s     r    create_asynczCustomerSession.create_async   sD      ++ ,  
 	
s   ,97
	9N)r   r   r   __doc__r   r   r
   r   r   r>   strr   r3   r   r   classmethodr   rP   rS   r6   r   r   r    r   r      s     :LK'"456KN
\ N
` 
 $$ 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>r^      s=    B 4 . 1 1 < <)
[4+,=> [4r   