o
    i3                     @   s   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r6d dlmZ d dlmZ G dd	 d	ed	 Zd
S )    )CreateableAPIResource)ExpandableField)StripeObject)ClassVarListOptionalcast)LiteralUnpackTYPE_CHECKING)Customer)CustomerSessionCreateParamsc                   @   s   e Zd ZU dZdZeed  ed< G d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dZeded dd fddZde	iZdS )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                   @   s   e Zd ZU G dd deZG dd deZG dd deZG dd deZG d	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
dS )zCustomerSession.Componentsc                   @      e Zd ZU eed< dS )z$CustomerSession.Components.BuyButtonenabledN__name__
__module____qualname__bool__annotations__ r   r   x/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/_customer_session.py	BuyButton      
 r   c                   @   >   e Zd ZU G dd deZeed< 	 ee ed< 	 deiZdS )z(CustomerSession.Components.CustomerSheetc                   @   s4   e Zd ZU eeed   ed< 	 eed  ed< dS )z1CustomerSession.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   r   Features$   s   
 
r'   r   featuresN	r   r   r   r   r'   r   r   r   _inner_class_typesr   r   r   r   CustomerSheet#   s   
 r+   c                   @   r   )z/CustomerSession.Components.MobilePaymentElementc                   @   sj   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< dS )	z8CustomerSession.Components.MobilePaymentElement.Featuresr   r"   r#   payment_method_redisplayr%   payment_method_save,payment_method_save_allow_redisplay_overrideNr&   r   r   r   r   r'   ?   s"   
 
r'   r   r(   Nr)   r   r   r   r   MobilePaymentElement>   s   
 $r/   c                   @   r   )z)CustomerSession.Components.PaymentElementc                   @   sh   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	< d
S )z2CustomerSession.Components.PaymentElement.Featuresr   r"   r#   r,   payment_method_redisplay_limitr%   r-   )off_session
on_sessionpayment_method_save_usageN)r   r   r   r   r	   r   r   intr   r   r   r   r'   n   s"   
 r'   r   r(   Nr)   r   r   r   r   PaymentElementm   s   
 &r5   c                   @   r   )z'CustomerSession.Components.PricingTabler   Nr   r   r   r   r   PricingTable   r   r6   
buy_buttoncustomer_sheetmobile_payment_elementpayment_elementpricing_table)r7   r8   r9   r:   r;   N)r   r   r   r   r   r+   r/   r5   r6   r   r*   r   r   r   r   
Components   s,   
 /1
r<   client_secret
componentscreatedr   customer
expires_atlivemodeobjectparamsr   returnc                 K   s   t d| jd|  |d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rD   )r   _static_request	class_urlclsrD   r   r   r   create   s   zCustomerSession.createc                    s"   t d| jd|  |dI dH S )rF   r   rG   rH   N)r   _static_request_asyncrJ   rK   r   r   r   create_async   s   
zCustomerSession.create_asyncN)r   r   r   __doc__r   r   r	   r   r   r<   strr   r4   r   r   classmethodr
   rM   rO   r*   r   r   r   r   r      s@   
 	 %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   r   <module>   s   