
    Ai;                         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mZ erd d	lmZ  G d
 de      Zy)    )connect_api_base)AuthenticationError)_APIRequestor)_api_encode)	urlencode)StripeObject)ListcastOptional)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)RequestOptionsc                   $   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y)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<   y	)
OAuth.OAuthTokenaccess_tokenscopelivemodebearer
token_typerefresh_tokenstripe_user_idstripe_publishable_keyN)__name__
__module____qualname__r   str__annotations__boolr        @/var/www/html/immo/lib/python3.12/site-packages/stripe/_oauth.py
OAuthTokenr      s}    sm#	 }	 4. 	 WX.//	  }$	 !%	 !)-	r%   r'   c                       e Zd ZU eed<   y)OAuth.OAuthDeauthorizationr   N)r   r   r    r!   r"   r$   r%   r&   OAuthDeauthorizationr)   7   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<   y)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,   ?   s    s##	 #76?33	 "#&&	
 3	 3	 $C((	 #4((	 !,DI 66	 !!JKK	r%   r7   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<   y)r5   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cityr1   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.OAuthAuthorizeUrlParamsStripeUserm   s   	 3	 	 S!!	 "#&&	 #3''	 #3''	  $$	 s##	 S!!	 s##	 c""	 $C((	 #	 3	
 	
 &c**	 )--	 c""	 %S))	 &c**	 $C((	 %S))	 C  	  $$	
 !%%	
 #3''	
 $C((	r%   rT   c                   l    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<   y)OAuth.OAuthTokenParams)authorization_coder   
grant_typer.   r   r   assert_capabilitiesN)r   r   r    r   r"   r   r!   r	   r$   r%   r&   OAuthTokenParamsrV     s_    ABB	 #	 #3''	 3	 )c33	r%   rZ   c                   *    e Zd ZU ee   ed<   	 eed<   y)OAuth.OAuthDeauthorizeParamsr-   r   N)r   r   r    r   r!   r"   r$   r%   r&   OAuthDeauthorizeParamsr\     s    s##	 	r%   r]   c                 >    d| v ry ddl m} |r|| d<   y 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%  s3    & $"+F;!E
 	
r%   expressr`   returnc                     | du rd}nd}t         j                  |       d|vrd|d<   t        t        t	        |d                  }t
        |z   dz   |z   }|S )NFz/oauth/authorizez/express/oauth/authorizer/   r.   V1?)r   ra   r   listr   r   )rb   r`   pathqueryr:   s        r&   authorize_urlzOAuth.authorize_url:  se     e%D-DV$&(&,F?#${6489:%+e3
r%   Napi_keyc           
      r    d| i}t        j                         }t        d|j                  dd||d            S )Nrk   r   postz/oauth/tokenconnectr`   optionsbase_address)r   _global_instancer
   requestrk   r`   rp   	requestors       r&   tokenzOAuth.tokenJ  sN     &/$8!224	&  	
 		
r%   c           
          d| i}t        j                         }t        j                  |       t	        d|j                  dd||d            S )Nrk   r)   rm   z/oauth/deauthorizern   ro   )r   rr   r   ra   r
   rs   rt   s       r&   deauthorizezOAuth.deauthorize[  s\     &/$8!224	V$($&  	
 		
r%   )F)N)r   r   r    r   r'   r*   r   r7   rT   rZ   r]   staticmethodra   r#   r   r!   rj   r   rv   rx   r$   r%   r&   r   r      s
   \ @| ,) ,\SI Sj9 0	 	 
 
( )/0G)H	  !%
#
178H1I
	
 
  !%
#
178N1O
	
 
r%   r   N)r_   r   stripe._errorr   stripe._api_requestorr   stripe._encoder   urllib.parser   stripe._stripe_objectr   typingr	   r
   r   typing_extensionsr   r   r   r   r   stripe._request_optionsr   objectr   r$   r%   r&   <module>r      s=    # - / & " . ' '  6U
F U
r%   