
    jof;                         d dl mZ d dlmZ d dlmZ d dlmZ 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e          ZdS )    )connect_api_base)AuthenticationError)_APIRequestor)_api_encode)	urlencode)RequestOptions)StripeObject)ListcastOptional)LiteralNotRequired	TypedDictUnpackc                      e Zd Z 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	 G d de          Z
ed             Ze	 ddedee         defd            Ze	 ddee         dee	         defd            Ze	 ddee         dee
         defd            ZdS )OAuthc                       e Zd ZU ee         ed<   	 ee         ed<   	 ee         ed<   	 eed                  ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   d	S )
OAuth.OAuthTokenaccess_tokenscopelivemodebearer
token_typerefresh_tokenstripe_user_idstripe_publishable_keyN)__name__
__module____qualname__r   str__annotations__boolr        G/var/www/html/Alfredo/env/lib/python3.11/site-packages/stripe/_oauth.py
OAuthTokenr      s         sm###	 }	 4.   	 WX.////	  }$$$	 !%%%	 !)---	 	r$   r&   c                       e Zd ZU eed<   dS )OAuth.OAuthDeauthorizationr   N)r   r   r   r    r!   r#   r$   r%   OAuthDeauthorizationr(   /   s"         	 	r$   r)   c                       e Zd ZU ee         ed<   	 eed                  ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 eee                  ed	<   	 ed
         ed<   dS )OAuth.OAuthAuthorizeUrlParams	client_idcoderesponse_typeredirect_urir   statestripe_landingalways_promptsuggested_capabilities'OAuth.OAuthAuthorizeUrlParamsStripeUserstripe_userN)	r   r   r   r   r    r!   r   r"   r
   r#   r$   r%   OAuthAuthorizeUrlParamsr+   7   s         s####	 #76?3333	 "#&&&&	
 3	 3	 $C((((	 #4((((	 !,DI 6666	 !!JKKKK	 	r$   r6   c                      e Zd ZU dZee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed	<   	 ee         ed
<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   dS )r4   z
        A more detailed explanation of what it means for a field to be
        required or optional can be found in our API documentation.
        See `Account Creation (Overview)` and `Account Update`
        emailurlcountryphone_numberbusiness_namebusiness_type
first_name	last_namedob_day	dob_monthdob_yearstreet_addresscityr0   zipphysical_productproduct_descriptioncurrencyfirst_name_kanafirst_name_kanjilast_name_kanalast_name_kanjigender
block_kanablock_kanjibuilding_kanabuilding_kanjiN)r   r   r   __doc__r   r    r!   r#   r$   r%   !OAuthAuthorizeUrlParamsStripeUserz'OAuth.OAuthAuthorizeUrlParamsStripeUsere   s        	 	 3	 	 S!!!!	 "#&&&&	 #3''''	 #3''''	  $$$$	 s####	 S!!!!	 s####	 c""""	 $C((((	 #	 3	
 	
 &c****	 )----	 c""""	 %S))))	 &c****	 $C((((	 %S))))	 C    	  $$$$	
 !%%%%	
 #3''''	
 $C((((	 	r$   rS   c                       e Zd ZU ed         ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 eee                  ed<   dS )OAuth.OAuthTokenParams)authorization_coder   
grant_typer-   r   r   assert_capabilitiesN)r   r   r   r   r!   r   r    r
   r#   r$   r%   OAuthTokenParamsrU      s         ABBBB	 #	 #3''''	 3	 )c3333	 	r$   rY   c                   2    e Zd ZU ee         ed<   	 eed<   dS )OAuth.OAuthDeauthorizeParamsr,   r   N)r   r   r   r   r    r!   r#   r$   r%   OAuthDeauthorizeParamsr[     s:         s####	 	 	r$   r\   c                 J    d| v rd S ddl m} |r|| d<   d S t          d          )Nr,   r   )r,   ax  No client_id provided. (HINT: set your client_id using "stripe.client_id = <CLIENT-ID>"). You can find your client_ids in your Stripe dashboard at https://dashboard.stripe.com/account/applications/settings, after registering your account as a platform. See https://stripe.com/docs/connect/standalone-accounts for details, or email support@stripe.com if you have any questions.)striper,   r   )paramsr,   s     r%   _set_client_idzOAuth._set_client_id  sS    &  F$$$$$$ 	"+F;F!E
 
 	
r$   Fexpressr_   returnc                     | du rd}nd}t                               |           d|vrd|d<   t          t          t	          |                              }t
          |z   dz   |z   }|S )NFz/oauth/authorizez/express/oauth/authorizer.   r-   ?)r   r`   r   listr   r   )ra   r_   pathqueryr9   s        r%   authorize_urlzOAuth.authorize_url2  sz     e%DD-DV$$$&((&,F?#${6223344%+e3
r$   Napi_keyc                     d| i}t          j                    }t          d|                    dd||dd                    S )Nri   r   postz/oauth/tokenconnectV1r_   optionsbase_addressapi_mode)r   _global_instancer   requestri   r_   ro   	requestors       r%   tokenzOAuth.tokenB  s[     $-g"6!244	&   

 

 
	
r$   c                     d| i}t          j                    }t                              |           t	          d|                    dd||dd                    S )Nri   r(   rk   z/oauth/deauthorizerl   rm   rn   )r   rr   r   r`   r   rs   rt   s       r%   deauthorizezOAuth.deauthorizeT  so     $-g"6!244	V$$$($&   

 

 
	
r$   )F)N)r   r   r   r	   r&   r)   r   r6   rS   rY   r\   staticmethodr`   r"   r   r    rh   r   rv   rx   r#   r$   r%   r   r      s           \   @    |   , , , , ,) , , ,\S S S S SI S S Sj    9   0	 	 	 	 	 	 	 	 
 
 \
(  )/0G)H	   \ !%
 
#
178H1I
	
 
 
 \
" !%
 
#
178N1O
	
 
 
 \
 
 
r$   r   N)r^   r   stripe._errorr   stripe._api_requestorr   stripe._encoder   urllib.parser   stripe._request_optionsr   stripe._stripe_objectr	   typingr
   r   r   typing_extensionsr   r   r   r   objectr   r#   r$   r%   <module>r      s   # # # # # # - - - - - - / / / / / / & & & & & & " " " " " " 2 2 2 2 2 2 . . . . . . ' ' ' ' ' ' ' ' ' ' E E E E E E E E E E E EW
 W
 W
 W
 W
F W
 W
 W
 W
 W
r$   