o
    Bix	                     @   sX   d dl mZ d dlmZ d dlmZ d dlmZmZ d dl	m
Z
mZ G dd deZdS )	    )RequestOptions)StripeService)ConnectionToken)Listcast)NotRequired	TypedDictc                   @   sT   e Zd ZG dd deZi i fdddedefddZi i fdddedefd	d
ZdS )ConnectionTokenServicec                   @   s,   e Zd ZU eee  ed< 	 ee ed< dS )#ConnectionTokenService.CreateParamsexpandlocationN)__name__
__module____qualname__r   r   str__annotations__ r   r   i/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/terminal/_connection_token_service.pyCreateParams   s
   
 r   paramsr
   optionsreturnc              	   C   s   t t| jddd||dS )
        To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
        post/v1/terminal/connection_tokensapibase_addressr   r   )r   r   _requestselfr   r   r   r   r   create   s   zConnectionTokenService.createc              	      s"   t t| jddd||dI dH S )r   r   r   r   r   N)r   r   _request_asyncr   r   r   r   create_async(   s   
z#ConnectionTokenService.create_asyncN)	r   r   r   r   r   r   r   r!   r#   r   r   r   r   r	   
   s(    
r	   N)stripe._request_optionsr   stripe._stripe_servicer   !stripe.terminal._connection_tokenr   typingr   r   typing_extensionsr   r   r	   r   r   r   r   <module>   s   