o
    Bi]                     @   sh   d dl mZ d dlmZ d dlmZ d dlmZmZm	Z	 d dl
mZmZmZmZ G dd ded ZdS )	    )CreateableAPIResource)RequestOptions)StripeObject)ClassVarListcast)LiteralNotRequired	TypedDictUnpackc                   @   s0  e Zd ZU dZdZeed  ed< 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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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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G d,d- d-eZG d.d/ d/eZ G d0d1 d1eZ!G d2d3 d3eZ"G d4d5 d5eZ#e$ed6< 	 e$ed7< 	 e	ed8< e%ed9< 	 e&ed:< 	 ed ed;< 	 e'd<e(d= d>d fd?d@Z)e'd<e(d= d>d fdAdBZ*d8e	iZ+dCS )DAccountSessiona  
    An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.

    We recommend that you create an AccountSession each time you need to display an embedded component
    to your user. Do not save AccountSessions to your database as they expire relatively
    quickly, and cannot be used more than once.

    Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
    account_sessionOBJECT_NAMEc                   @   s2  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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G dd deZeed< eed< eed< eed< eed< e	ed< e
ed< eed< eed< eed < eed!< eeeeee	e
eeeed"Zd#S )$zAccountSession.Componentsc                   @   8   e Zd ZU G dd deZeed< 	 eed< deiZdS )z+AccountSession.Components.AccountManagementc                   @      e Zd ZU eed< dS )z4AccountSession.Components.AccountManagement.Featuresexternal_account_collectionN__name__
__module____qualname__bool__annotations__ r   r   W/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_account_session.pyFeatures      
 r   enabledfeaturesNr   r   r   r   r   r   r   _inner_class_typesr   r   r   r   AccountManagement      
 r    c                   @   r   )z+AccountSession.Components.AccountOnboardingc                   @   r   )z4AccountSession.Components.AccountOnboarding.Featuresr   Nr   r   r   r   r   r   '   r   r   r   r   Nr   r   r   r   r   AccountOnboarding&   r!   r"   c                   @   r   )z"AccountSession.Components.Balancesc                   @   4   e Zd ZU eed< 	 eed< 	 eed< 	 eed< dS )z+AccountSession.Components.Balances.Featuresedit_payout_scheduler   instant_payoutsstandard_payoutsNr   r   r   r   r   r   5      
 r   r   r   Nr   r   r   r   r   Balances4      
 r(   c                   @   r   )z#AccountSession.Components.Documentsc                   @      e Zd ZdS )z,AccountSession.Components.Documents.FeaturesNr   r   r   r   r   r   r   r   O       r   r   r   Nr   r   r   r   r   	DocumentsN      
 r-   c                   @   r   )z,AccountSession.Components.NotificationBannerc                   @   r   )z5AccountSession.Components.NotificationBanner.Featuresr   Nr   r   r   r   r   r   Z   r   r   r   r   Nr   r   r   r   r   NotificationBannerY   r!   r/   c                   @   r   )z(AccountSession.Components.PaymentDetailsc                   @   r#   )z1AccountSession.Components.PaymentDetails.Featurescapture_payments*destination_on_behalf_of_charge_managementdispute_managementrefund_managementNr   r   r   r   r   r   h   r'   r   r   r   Nr   r   r   r   r   PaymentDetailsg   r)   r4   c                   @   r   )z"AccountSession.Components.Paymentsc                   @   r#   )z+AccountSession.Components.Payments.Featuresr0   r1   r2   r3   Nr   r   r   r   r   r      r'   r   r   r   Nr   r   r   r   r   Payments   r)   r5   c                   @   r   )z!AccountSession.Components.Payoutsc                   @   r#   )z*AccountSession.Components.Payouts.Featuresr$   r   r%   r&   Nr   r   r   r   r   r      r'   r   r   r   Nr   r   r   r   r   Payouts   r)   r6   c                   @   r   )z%AccountSession.Components.PayoutsListc                   @   r*   )z.AccountSession.Components.PayoutsList.FeaturesNr+   r   r   r   r   r      r,   r   r   r   Nr   r   r   r   r   PayoutsList   r.   r7   c                   @   r   )z*AccountSession.Components.TaxRegistrationsc                   @   r*   )z3AccountSession.Components.TaxRegistrations.FeaturesNr+   r   r   r   r   r      r,   r   r   r   Nr   r   r   r   r   TaxRegistrations   r.   r8   c                   @   r   )z%AccountSession.Components.TaxSettingsc                   @   r*   )z.AccountSession.Components.TaxSettings.FeaturesNr+   r   r   r   r   r      r,   r   r   r   Nr   r   r   r   r   TaxSettings   r.   r9   account_managementaccount_onboardingbalances	documentsnotification_bannerpayment_detailspaymentspayoutspayouts_listtax_registrationstax_settings)r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   N)r   r   r   r   r    r"   r(   r-   r/   r4   r5   r6   r7   r8   r9   r   r   r   r   r   r   
Components   sF   
 
rE   c                   @   s2   e Zd ZU eed< 	 ded< 	 eee  ed< dS )AccountSession.CreateParamsaccount%AccountSession.CreateParamsComponents
componentsexpandN)r   r   r   strr   r	   r   r   r   r   r   CreateParams   s   
 rL   c                   @   s   e Zd ZU ed ed< 	 ed ed< 	 ed ed< 	 ed ed< 	 ed	 ed
< 	 ed ed< 	 ed ed< 	 ed ed< 	 ed ed< 	 ed ed< 	 ed ed< dS )rH   6AccountSession.CreateParamsComponentsAccountManagementr:   6AccountSession.CreateParamsComponentsAccountOnboardingr;   -AccountSession.CreateParamsComponentsBalancesr<   .AccountSession.CreateParamsComponentsDocumentsr=   7AccountSession.CreateParamsComponentsNotificationBannerr>   3AccountSession.CreateParamsComponentsPaymentDetailsr?   -AccountSession.CreateParamsComponentsPaymentsr@   ,AccountSession.CreateParamsComponentsPayoutsrA   0AccountSession.CreateParamsComponentsPayoutsListrB   5AccountSession.CreateParamsComponentsTaxRegistrationsrC   0AccountSession.CreateParamsComponentsTaxSettingsrD   N)r   r   r   r	   r   r   r   r   r   CreateParamsComponents   sN   
 rX   c                   @   $   e Zd ZU eed< 	 ed ed< dS )rM   r   >AccountSession.CreateParamsComponentsAccountManagementFeaturesr   Nr   r   r   r   r   r	   r   r   r   r   'CreateParamsComponentsAccountManagement;     
 r\   c                   @      e Zd ZU ee ed< dS )rZ   r   Nr   r   r   r	   r   r   r   r   r   r   /CreateParamsComponentsAccountManagementFeaturesG     
 r`   c                   @   rY   )rN   r   >AccountSession.CreateParamsComponentsAccountOnboardingFeaturesr   Nr[   r   r   r   r   'CreateParamsComponentsAccountOnboardingM  r]   rc   c                   @   r^   )rb   r   Nr_   r   r   r   r   /CreateParamsComponentsAccountOnboardingFeaturesY  ra   rd   c                   @   rY   )rO   r   5AccountSession.CreateParamsComponentsBalancesFeaturesr   Nr[   r   r   r   r   CreateParamsComponentsBalances_  r]   rf   c                   @   D   e Zd ZU ee ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )re   r$   r   r%   r&   Nr_   r   r   r   r   &CreateParamsComponentsBalancesFeaturesk     
 rh   c                   @   rY   )rP   r   6AccountSession.CreateParamsComponentsDocumentsFeaturesr   Nr[   r   r   r   r   CreateParamsComponentsDocuments}  r]   rk   c                   @   r*   )rj   Nr+   r   r   r   r   'CreateParamsComponentsDocumentsFeatures  r,   rl   c                   @   rY   )rQ   r   ?AccountSession.CreateParamsComponentsNotificationBannerFeaturesr   Nr[   r   r   r   r   (CreateParamsComponentsNotificationBanner  r]   rn   c                   @   r^   )rm   r   Nr_   r   r   r   r   0CreateParamsComponentsNotificationBannerFeatures  ra   ro   c                   @   rY   )rR   r   ;AccountSession.CreateParamsComponentsPaymentDetailsFeaturesr   Nr[   r   r   r   r   $CreateParamsComponentsPaymentDetails  r]   rq   c                   @   rg   )rp   r0   r1   r2   r3   Nr_   r   r   r   r   ,CreateParamsComponentsPaymentDetailsFeatures  ri   rr   c                   @   rY   )rS   r   5AccountSession.CreateParamsComponentsPaymentsFeaturesr   Nr[   r   r   r   r   CreateParamsComponentsPayments  r]   rt   c                   @   rg   )rs   r0   r1   r2   r3   Nr_   r   r   r   r   &CreateParamsComponentsPaymentsFeatures  ri   ru   c                   @   rY   )rT   r   4AccountSession.CreateParamsComponentsPayoutsFeaturesr   Nr[   r   r   r   r   CreateParamsComponentsPayouts  r]   rw   c                   @   rg   )rv   r$   r   r%   r&   Nr_   r   r   r   r   %CreateParamsComponentsPayoutsFeatures  ri   rx   c                   @   rY   )rU   r   8AccountSession.CreateParamsComponentsPayoutsListFeaturesr   Nr[   r   r   r   r   !CreateParamsComponentsPayoutsList  r]   rz   c                   @   r*   )ry   Nr+   r   r   r   r   )CreateParamsComponentsPayoutsListFeatures  r,   r{   c                   @   rY   )rV   r   =AccountSession.CreateParamsComponentsTaxRegistrationsFeaturesr   Nr[   r   r   r   r   &CreateParamsComponentsTaxRegistrations  r]   r}   c                   @   r*   )r|   Nr+   r   r   r   r   .CreateParamsComponentsTaxRegistrationsFeatures  r,   r~   c                   @   rY   )rW   r   8AccountSession.CreateParamsComponentsTaxSettingsFeaturesr   Nr[   r   r   r   r   !CreateParamsComponentsTaxSettings  r]   r   c                   @   r*   )r   Nr+   r   r   r   r   )CreateParamsComponentsTaxSettingsFeatures"  r,   r   rG   client_secretrI   
expires_atlivemodeobjectparamsrF   returnc                 K   s   t d| jd|  |dS )
        Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
        r   postr   )r   _static_request	class_urlclsr   r   r   r   create?  s   zAccountSession.createc                    s"   t d| jd|  |dI dH S )r   r   r   r   N)r   _static_request_asyncr   r   r   r   r   create_asyncO  s   
zAccountSession.create_asyncN),r   r   r   __doc__r   r   r   r   r   rE   r   rL   r
   rX   r\   r`   rc   rd   rf   rh   rk   rl   rn   ro   rq   rr   rt   ru   rw   rx   rz   r{   r}   r~   r   r   rK   intr   classmethodr   r   r   r   r   r   r   r   r   
   sj   
 
 Y>r   N)stripe._createable_api_resourcer   stripe._request_optionsr   stripe._stripe_objectr   typingr   r   r   typing_extensionsr   r	   r
   r   r   r   r   r   r   <module>   s   