o
    i
%                     @   s   d dl mZ d dlmZ d dlmZmZ d dlmZ erLd 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 G dd deZdS )    )StripeService)sanitize_id)Optionalcast)TYPE_CHECKING)
ListObject)RequestOptions)Authorization)AuthorizationApproveParams)AuthorizationDeclineParams)AuthorizationListParams)AuthorizationRetrieveParams)AuthorizationUpdateParamsc                	   @   s  e Zd Z		d"ded ded ddfdd	Z		d"ded ded ddfd
dZ		d"deded ded ddfddZ		d"deded ded ddfddZ		d"deded ded ddfddZ			d"deded ded ddfddZ
		d"deded ded ddfddZ		d"deded ded ddfddZ		d"deded ded ddfddZ		d"deded ded ddfd d!ZdS )#AuthorizationServiceNparamsr   optionsr   returnListObject[Authorization]c              	   C   s   t d| jddd||dS )
        Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
        r   get/v1/issuing/authorizationsapibase_addressr   r   )r   _requestselfr   r    r   /var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/issuing/_authorization_service.pylist   s   zAuthorizationService.listc              	      s"   t d| jddd||dI dH S )r   r   r   r   r   r   N)r   _request_asyncr   r   r   r   
list_async1   s   
zAuthorizationService.list_asyncauthorizationr   r	   c              	   C   &   t d| jddjt|dd||dS )<
        Retrieves an Issuing Authorization object.
        r	   r   */v1/issuing/authorizations/{authorization}r"   r   r   r   r   formatr   r   r"   r   r   r   r   r   retrieveD      	zAuthorizationService.retrievec              	      .   t d| jddjt|dd||dI dH S )r$   r	   r   r%   r&   r   r   Nr   r    r(   r   r)   r   r   r   retrieve_asyncZ      	
z#AuthorizationService.retrieve_asyncr   c              	   C   r#   )
        Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
        r	   postr%   r&   r   r   r'   r)   r   r   r   updatep   r+   zAuthorizationService.updatec              	      r,   )r0   r	   r1   r%   r&   r   r   Nr-   r)   r   r   r   update_async   r/   z!AuthorizationService.update_asyncr
   c              	   C   r#   )  
        [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
        This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
        r	   r1   2/v1/issuing/authorizations/{authorization}/approver&   r   r   r'   r)   r   r   r   approve      
zAuthorizationService.approvec              	      r,   )r4   r	   r1   r5   r&   r   r   Nr-   r)   r   r   r   approve_async      

z"AuthorizationService.approve_asyncr   c              	   C   r#   )  
        [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
        This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
        r	   r1   2/v1/issuing/authorizations/{authorization}/decliner&   r   r   r'   r)   r   r   r   decline   r7   zAuthorizationService.declinec              	      r,   )r:   r	   r1   r;   r&   r   r   Nr-   r)   r   r   r   decline_async   r9   z"AuthorizationService.decline_async)NN)__name__
__module____qualname__r   r   r!   strr*   r.   r2   r3   r6   r8   r<   r=   r   r   r   r   r      s    








r   N)stripe._stripe_servicer   stripe._utilr   typingr   r   typing_extensionsr   stripe._list_objectr   stripe._request_optionsr   stripe.issuing._authorizationr	   3stripe.params.issuing._authorization_approve_paramsr
   3stripe.params.issuing._authorization_decline_paramsr   0stripe.params.issuing._authorization_list_paramsr   4stripe.params.issuing._authorization_retrieve_paramsr   2stripe.params.issuing._authorization_update_paramsr   r   r   r   r   r   <module>   s   