o
    "i                     @   s  d dl Z d dlZd dlmZmZ d dlmZmZmZm	Z	m
Z
mZmZmZ d dlmZ d dlZd dl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 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/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z= edZ>G dd deZ?eG dd  d e@ZAG d!d" d"eBeZCG d#d$ d$ZDG d%d& d&eDZEG d'd( d(eDZFdS ))    N)IntEnumEnum)AnyDictListMutableMappingOptionalTypeTypeVarUnion)define)default_backend)serialization)_get_cattrs_converter   )CheckTestNotificationResponse)ConsumptionRequest)Environment)ExtendRenewalDateRequest)ExtendRenewalDateResponse)HistoryResponse)MassExtendRenewalDateRequest)MassExtendRenewalDateResponse)#MassExtendRenewalDateStatusResponse)NotificationHistoryRequest)NotificationHistoryResponse)OrderLookupResponse)RefundHistoryResponse)SendTestNotificationResponse)Status)StatusResponse)TransactionHistoryRequest)TransactionInfoResponse)UpdateAppAccountTokenRequestTc                   @   sr  e Zd ZdZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ		 dZ
	 d	Z	 d
Z	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ	 dZ 	 dZ!	 d Z"	 d!Z#	 d"Z$	 d#Z%	 d$Z&	 d%Z'	 d&Z(	 d'Z)	 d(Z*	 d)Z+	 d*Z,	 d+Z-	 d,Z.	 d-Z/	 d.Z0	 d/Z1	 d0Z2	 d1Z3	 d2Z4	 d3Z5	 d4Z6	 d5Z7	 d6Z8	 d7Z9	 d8Z:	 d9Z;	 d:Z<	 d;Z=	 d<Z>d=S )>APIErrori 	= i	= i	= i	= i	= i		= i
	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i	= i 	= i!	= i"	= i#	= i$	= i%	= i&	= i'	= i(	= i)	= i*	= i+	= i/	= i0	= i	= i	= i	= i4~= i5~= i7~= iA= iB= iC= iD= iE= iF= iG= iH= iI= iJ= iuA i@KL iAKL N)?__name__
__module____qualname__GENERAL_BAD_REQUESTINVALID_APP_IDENTIFIERINVALID_REQUEST_REVISIONINVALID_TRANSACTION_IDINVALID_ORIGINAL_TRANSACTION_IDINVALID_EXTEND_BY_DAYSINVALID_EXTEND_REASON_CODEINVALID_REQUEST_IDENTIFIERSTART_DATE_TOO_FAR_IN_PASTSTART_DATE_AFTER_END_DATEINVALID_PAGINATION_TOKENINVALID_START_DATEINVALID_END_DATEPAGINATION_TOKEN_EXPIREDINVALID_NOTIFICATION_TYPEMULTIPLE_FILTERS_SUPPLIEDINVALID_TEST_NOTIFICATION_TOKENINVALID_SORTINVALID_PRODUCT_TYPEINVALID_PRODUCT_ID%INVALID_SUBSCRIPTION_GROUP_IDENTIFIERINVALID_EXCLUDE_REVOKEDINVALID_IN_APP_OWNERSHIP_TYPE*INVALID_EMPTY_STOREFRONT_COUNTRY_CODE_LISTINVALID_STOREFRONT_COUNTRY_CODEINVALID_REVOKEDINVALID_STATUSINVALID_ACCOUNT_TENUREINVALID_APP_ACCOUNT_TOKENINVALID_CONSUMPTION_STATUSINVALID_CUSTOMER_CONSENTEDINVALID_DELIVERY_STATUS"INVALID_LIFETIME_DOLLARS_PURCHASED!INVALID_LIFETIME_DOLLARS_REFUNDEDINVALID_PLATFORMINVALID_PLAY_TIMEINVALID_SAMPLE_CONTENT_PROVIDEDINVALID_USER_STATUS"INVALID_TRANSACTION_NOT_CONSUMABLE&INVALID_TRANSACTION_TYPE_NOT_SUPPORTED&APP_TRANSACTION_ID_NOT_SUPPORTED_ERROR$INVALID_APP_ACCOUNT_TOKEN_UUID_ERROR&FAMILY_TRANSACTION_NOT_SUPPORTED_ERROR3TRANSACTION_ID_IS_NOT_ORIGINAL_TRANSACTION_ID_ERROR!SUBSCRIPTION_EXTENSION_INELIGIBLESUBSCRIPTION_MAX_EXTENSION/FAMILY_SHARED_SUBSCRIPTION_EXTENSION_INELIGIBLEACCOUNT_NOT_FOUNDACCOUNT_NOT_FOUND_RETRYABLEAPP_NOT_FOUNDAPP_NOT_FOUND_RETRYABLE!ORIGINAL_TRANSACTION_ID_NOT_FOUND+ORIGINAL_TRANSACTION_ID_NOT_FOUND_RETRYABLE!SERVER_NOTIFICATION_URL_NOT_FOUNDTEST_NOTIFICATION_NOT_FOUNDSTATUS_REQUEST_NOT_FOUNDTRANSACTION_ID_NOT_FOUNDRATE_LIMIT_EXCEEDEDGENERAL_INTERNALGENERAL_INTERNAL_RETRYABLE re   re   `/var/www/html/premium_crap/venv/lib/python3.10/site-packages/appstoreserverlibrary/api_client.pyr%   &   s    r%   c                   @   sZ   e Zd ZU eed< ee ed< ee ed< ee ed< ddedee dee fddZdS )	APIExceptionhttp_status_code	api_errorraw_api_errorerror_messageNc                 C   sL   || _ || _d | _|| _z|d urt|| _W d S W d S  ty%   Y d S w N)rh   rj   ri   rk   r%   
ValueError)selfrh   rj   rk   re   re   rf   __init__  s   zAPIException.__init__)NN)	r&   r'   r(   int__annotations__r   r%   strro   re   re   re   rf   rg     s   
 $rg   c                   @   s   e Zd ZdZ	 dZdS )GetTransactionHistoryVersionv1v2N)r&   r'   r(   V1V2re   re   re   rf   rs     s    rs   c                
   @   s   e Zd Zdededededef
ddZdefd	d
ZdefddZde	eef fddZ
de	eef fddZdededee defddZdS )BaseAppStoreServerAPIClientsigning_keykey_id	issuer_id	bundle_idenvironmentc                 C   sz   |t jkr	td|t jkrd| _n|t jkrd| _n|t jkr$d| _ntdtj|d t	 d| _
|| _|| _|| _d S )NzCXcode is not a supported environment for an AppStoreServerAPIClientz%https://api.storekit.itunes.apple.comzhttps://local-testing-base-urlz-https://api.storekit-sandbox.itunes.apple.comzInvalid environment provided)passwordbackend)r   XCODErm   
PRODUCTION	_base_urlLOCAL_TESTINGSANDBOXr   load_pem_private_keyr   _signing_key_key_id
_issuer_id
_bundle_idrn   ry   rz   r{   r|   r}   re   re   rf   ro     s   




z$BaseAppStoreServerAPIClient.__init__returnc                 C   sN   t j t jjt jdd }tj| j| jdt	
| d| jdd| jidS )N   )minuteszappstoreconnect-v1)bidissaudexpES256kid)	algorithmheaders)datetimenowtimezoneutc	timedeltajwtencoder   r   calendartimegm	timetupler   r   )rn   future_timere   re   rf   _generate_token  s   z+BaseAppStoreServerAPIClient._generate_tokenc                 C   s
   | j | S rl   )r   )rn   pathre   re   rf   _get_full_url
  s   
z)BaseAppStoreServerAPIClient._get_full_urlc                 C   s   dd|    ddS )Nz%app-store-server-library/python/1.9.0zBearer application/json)z
User-AgentAuthorizationAccept)r   rn   re   re   rf   _get_headers  s   
z(BaseAppStoreServerAPIClient._get_headersc                 C   s.   |d ur
t t|nd }|d ur||S d S rl   )r   typeunstructure)rn   bodycre   re   rf   _get_request_json  s   z-BaseAppStoreServerAPIClient._get_request_jsonstatus_coder   destination_classc              
   C   s   d|  kr
dk rn n|d u rd S t |}| }|||S d|vs)|d dkr-t|z| }t||d |d  tyH } z|d }~w tyX } zt||d }~ww )N   i,  zcontent-typer   	errorCodeerrorMessage)r   	structurerg   	Exception)rn   r   r   json_supplierr   r   response_bodyere   re   rf   _parse_response  s$   
z+BaseAppStoreServerAPIClient._parse_responseN)r&   r'   r(   bytesrr   r   ro   r   r   r   r   r   r   rp   r   r	   r$   r   re   re   re   rf   rx     s    "rx   c                       s  e Zd Zdededededef
 fddZded	ed
eeeee	e f f de
e def
ddZd	ededeeeee	e f f deeef deeef dejfddZdedefddZdededefddZd@dedee	e  defdd Zded!ee defd"d#Zd$ed%edefd&d'Zd(edefd)d*Z d+ee d,e!de"fd-d.Z#e$j%fded!ee d/e&d0e$de'f
d1d2Z(dede)fd3d4Z*d5ede+fd6d7Z,de-fd8d9Z.ded:e/fd;d<Z0ded=e1fd>d?Z2  Z3S )AAppStoreServerAPIClientry   rz   r{   r|   r}   c                    s   t  j|||||d d S )Nry   rz   r{   r|   r}   )superro   r   	__class__re   rf   ro   -  s   z AppStoreServerAPIClient.__init__r   methodqueryParametersr   r   c           	         sJ   |  |}| |}|  }| ||||| |  j j fdd|S )Nc                            S rl   jsonre   responsere   rf   <lambda>6      z7AppStoreServerAPIClient._make_request.<locals>.<lambda>r   r   r   _execute_requestr   r   r   	rn   r   r   r   r   r   urlr   r   re   r   rf   _make_request0  s
   

z%AppStoreServerAPIClient._make_requestr   paramsr   r   c                 C   s   t j|||||dS N)r   r   r   )requestsrequestrn   r   r   r   r   r   re   re   rf   r   8  s   z(AppStoreServerAPIClient._execute_request mass_extend_renewal_date_requestc                 C   s   |  ddi |tS )~  
        Uses a subscription's product identifier to extend the renewal date for all of its eligible active subscribers.
        https://developer.apple.com/documentation/appstoreserverapi/extend_subscription_renewal_dates_for_all_active_subscribers
        
        :param mass_extend_renewal_date_request: The request body for extending a subscription renewal date for all of its active subscribers.
        :return: A response that indicates the server successfully received the subscription-renewal-date extension request.
        :throws APIException: If a response was returned indicating the request could not be processed
        $/inApps/v1/subscriptions/extend/massPOSTr   r   rn   r   re   re   rf   .extend_renewal_date_for_all_active_subscribers;  s   	zFAppStoreServerAPIClient.extend_renewal_date_for_all_active_subscribersoriginal_transaction_idextend_renewal_date_requestc                 C   s   |  d| di |tS )  
        Extends the renewal date of a customer's active subscription using the original transaction identifier.
        https://developer.apple.com/documentation/appstoreserverapi/extend_a_subscription_renewal_date
        
        :param original_transaction_id:    The original transaction identifier of the subscription receiving a renewal date extension.
        :param extend_renewal_date_request: The request body containing subscription-renewal-extension data.
        :return: A response that indicates whether an individual renewal-date extension succeeded, and related details.
        :throws APIException: If a response was returned indicating the request could not be processed
         /inApps/v1/subscriptions/extend/PUTr   r   rn   r   r   re   re   rf    extend_subscription_renewal_dateF  s   
z8AppStoreServerAPIClient.extend_subscription_renewal_dateNtransaction_idstatusc                 C   s6   t  }|durdd |D |d< | d| d|dtS )  
        Get the statuses for all of a customer's auto-renewable subscriptions in your app.
        https://developer.apple.com/documentation/appstoreserverapi/get_all_subscription_statuses
        
        :param transaction_id: The identifier of a transaction that belongs to the customer, and which may be an original transaction identifier.
        :param status: An optional filter that indicates the status of subscriptions to include in the response. Your query may specify more than one status query parameter.
        :return: A response that contains status information for all of a customer's auto-renewable subscriptions in your app.
        :throws APIException: If a response was returned indicating the request could not be processed
        Nc                 S      g | ]}|j qS re   value.0sre   re   rf   
<listcomp>^      zIAppStoreServerAPIClient.get_all_subscription_statuses.<locals>.<listcomp>r   /inApps/v1/subscriptions/GETdictr   r    rn   r   r   r   re   re   rf   get_all_subscription_statusesR  s   
z5AppStoreServerAPIClient.get_all_subscription_statusesrevisionc                 C   s.   t  }|dur|g|d< | d| d|dtS a  
        Get a paginated list of all of a customer's refunded in-app purchases for your app.
        https://developer.apple.com/documentation/appstoreserverapi/get_refund_history

        :param transaction_id: The identifier of a transaction that belongs to the customer, and which may be an original transaction identifier.
        :param revision: A token you provide to get the next set of up to 20 transactions. All responses include a revision token. Use the revision token from the previous RefundHistoryResponse.
        :return: A response that contains status information for all of a customer's auto-renewable subscriptions in your app.
        :throws APIException: If a response was returned indicating the request could not be processed
        Nr   z/inApps/v2/refund/lookup/r   r   r   r   rn   r   r   r   re   re   rf   get_refund_historyb  s   
z*AppStoreServerAPIClient.get_refund_historyrequest_identifier
product_idc                 C   s   |  d| d | di dtS a  
        Checks whether a renewal date extension request completed, and provides the final count of successful or failed extensions.
        https://developer.apple.com/documentation/appstoreserverapi/get_status_of_subscription_renewal_date_extensions

        :param request_identifier: The UUID that represents your request to the Extend Subscription Renewal Dates for All Active Subscribers endpoint.
        :param product_id: The product identifier of the auto-renewable subscription that you request a renewal-date extension for.
        :return: A response that indicates the current status of a request to extend the subscription renewal date to all eligible subscribers.
        :throws APIException: If a response was returned indicating the request could not be processed
        z%/inApps/v1/subscriptions/extend/mass//r   Nr   r   rn   r   r   re   re   rf   2get_status_of_subscription_renewal_date_extensionss  s   
zJAppStoreServerAPIClient.get_status_of_subscription_renewal_date_extensionstest_notification_tokenc                 C      |  d| di dtS a3  
        Check the status of the test App Store server notification sent to your server.
        https://developer.apple.com/documentation/appstoreserverapi/get_test_notification_status

        :param test_notification_token: The test notification token received from the Request a Test Notification endpoint
        :return: A response that contains the contents of the test notification sent by the App Store server and the result from your server.
        :throws APIException: If a response was returned indicating the request could not be processed
        z/inApps/v1/notifications/test/r   Nr   r   rn   r   re   re   rf   get_test_notification_status     	z4AppStoreServerAPIClient.get_test_notification_statuspagination_tokennotification_history_requestc                 C   s*   t  }|dur|g|d< | dd||tS a  
        Get a list of notifications that the App Store server attempted to send to your server.
        https://developer.apple.com/documentation/appstoreserverapi/get_notification_history

        :param pagination_token: An optional token you use to get the next set of up to 20 notification history records. All responses that have more records available include a paginationToken. Omit this parameter the first time you call this endpoint.
        :param notification_history_request: The request body that includes the start and end dates, and optional query constraints.
        :return: A response that contains the App Store Server Notifications history for your app.
        :throws APIException: If a response was returned indicating the request could not be processed
        NpaginationTokenz /inApps/v1/notifications/historyr   r   r   r   rn   r  r  r   re   re   rf   get_notification_history  s   

z0AppStoreServerAPIClient.get_notification_historytransaction_history_requestversionc                 C   s   t  }|dur|g|d< |jdurt|jg|d< |jdur&t|jg|d< |jdur0|j|d< |jdur?dd |jD |d< |jdurK|jjg|d	< |jdurU|j|d
< |j	dura|j	jg|d< |j
durnt|j
g|d< | d| d | d|dtS )2  
        Get a customer's in-app purchase transaction history for your app.
        https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history

        :param transaction_id: The identifier of a transaction that belongs to the customer, and which may be an original transaction identifier.
        :param revision: A token you provide to get the next set of up to 20 transactions. All responses include a revision token. Note: For requests that use the revision token, include the same query parameters from the initial request. Use the revision token from the previous HistoryResponse.
        :param transaction_history_request: The request parameters that includes the startDate,endDate,productIds,productTypes and optional query constraints.
        :param version: The version of the Get Transaction History endpoint to use. V2 is recommended.
        :return: A response that contains the customer's transaction history for an app.
        :throws APIException: If a response was returned indicating the request could not be processed
        Nr   	startDateendDate	productIdc                 S   r   re   r   r   product_typere   re   rf   r     r   zCAppStoreServerAPIClient.get_transaction_history.<locals>.<listcomp>productTypesortsubscriptionGroupIdentifierinAppOwnershipTyperevoked/inApps/	/history/r   r   r  rr   r  
productIdsproductTypesr  r   subscriptionGroupIdentifiersr  r  r   r   rn   r   r   r  r  r   re   re   rf   get_transaction_history  s(   










z/AppStoreServerAPIClient.get_transaction_historyc                 C   r   a  
        Get information about a single transaction for your app.
        https://developer.apple.com/documentation/appstoreserverapi/get_transaction_info
        
        :param transaction_id The identifier of a transaction that belongs to the customer, and which may be an original transaction identifier.
        :return: A response that contains signed transaction information for a single transaction.
        :throws APIException: If a response was returned indicating the request could not be processed
        /inApps/v1/transactions/r   Nr   r"   rn   r   re   re   rf   get_transaction_info  r  z,AppStoreServerAPIClient.get_transaction_infoorder_idc                 C   r   a   
        Get a customer's in-app purchases from a receipt using the order ID.
        https://developer.apple.com/documentation/appstoreserverapi/look_up_order_id
        
        :param order_id: The order ID for in-app purchases that belong to the customer.
        :return: A response that includes the order lookup status and an array of signed transactions for the in-app purchases in the order.
        :throws APIException: If a response was returned indicating the request could not be processed
        z/inApps/v1/lookup/r   Nr   r   rn   r&  re   re   rf   look_up_order_id  r  z(AppStoreServerAPIClient.look_up_order_idc                 C   s   |  ddi dtS ao  
        Ask App Store Server Notifications to send a test notification to your server.
        https://developer.apple.com/documentation/appstoreserverapi/request_a_test_notification

        :return: A response that contains the test notification token.
        :throws APIException: If a response was returned indicating the request could not be processed
        z/inApps/v1/notifications/testr   Nr   r   r   re   re   rf   request_test_notification  s   z1AppStoreServerAPIClient.request_test_notificationconsumption_requestc                 C   s   |  d| di |d dS a  
        Send consumption information about a consumable in-app purchase to the App Store after your server receives a consumption request notification.
        https://developer.apple.com/documentation/appstoreserverapi/send_consumption_information

        :param transaction_id: The transaction identifier for which you're providing consumption information. You receive this identifier in the CONSUMPTION_REQUEST notification the App Store sends to your server.
        :param consumption_request:    The request body containing consumption information.
        :raises APIException: If a response was returned indicating the request could not be processed
        z$/inApps/v1/transactions/consumption/r   Nr   rn   r   r.  re   re   rf   send_consumption_data  s   	z-AppStoreServerAPIClient.send_consumption_data update_app_account_token_requestc                 C   s   |  d| d di |d dS aP  
        Sets the app account token value for a purchase the customer makes outside your app, or updates its value in an existing transaction.
        https://developer.apple.com/documentation/appstoreserverapi/set-app-account-token

        :param original_transaction_id The original transaction identifier of the transaction to receive the app account token update.
        :param update_app_account_token_request The request body that contains a valid app account token value.
        :raises APIException: If a response was returned indicating the request could not be processed
        r"  z/appAccountTokenr   Nr0  rn   r   r3  re   re   rf   set_app_account_token  s   	z-AppStoreServerAPIClient.set_app_account_tokenrl   )4r&   r'   r(   r   rr   r   ro   r   r   r   r	   r$   r   r   r   Responser   r   r   r   r   r   r   r   r   r    r   r   r   r   r   r   r  r   r   r  rs   rv   r!   r   r   r"   r%  r   r*  r   r-  r   r2  r#   r6  __classcell__re   re   r   rf   r   ,  s"    "6H (*

r   c                       s  e Zd Zdededededef
 fddZdd	 Zd
ededeee	ee
e f f dee def
ddZdededeee	ee
e f f deeef deeef f
ddZdedefddZdededefddZdBded ee
e  defd!d"Zded#ee defd$d%Zd&ed'edefd(d)Zd*edefd+d,Zd-ee d.e de!fd/d0Z"e#j$fded#ee d1e%d2e#de&f
d3d4Z'dede(fd5d6Z)d7ede*fd8d9Z+de,fd:d;Z-ded<e.fd=d>Z/ded?e0fd@dAZ1  Z2S )CAsyncAppStoreServerAPIClientry   rz   r{   r|   r}   c                    s>   t  j|||||d zdd l}| | _W d S    td)Nr   r   z=httpx not found but attempting to instantiate an async client)r   ro   httpxAsyncClienthttp_clientModuleNotFoundError)rn   ry   rz   r{   r|   r}   r:  r   re   rf   ro     s   z%AsyncAppStoreServerAPIClient.__init__c                    s   | j  I d H  d S rl   )r<  acloser   re   re   rf   async_close  s   z(AsyncAppStoreServerAPIClient.async_closer   r   r   r   r   c           	         sR   |  |}| |}|  }| |||||I d H  |  j j fdd|S )Nc                      r   rl   r   re   r   re   rf   r     r   z<AsyncAppStoreServerAPIClient._make_request.<locals>.<lambda>r   r   re   r   rf   r     s   

z*AsyncAppStoreServerAPIClient._make_requestr   r   r   r   c                    s   | j j|||||dI d H S r   )r<  r   r   re   re   rf   r     s   z-AsyncAppStoreServerAPIClient._execute_requestr   c                    s   |  ddi |tI dH S )r   r   r   Nr   r   re   re   rf   r     s   	zKAsyncAppStoreServerAPIClient.extend_renewal_date_for_all_active_subscribersr   r   c                    s   |  d| di |tI dH S )r   r   r   Nr   r   re   re   rf   r     s   
z=AsyncAppStoreServerAPIClient.extend_subscription_renewal_dateNr   r   c                    s>   t  }|durdd |D |d< | d| d|dtI dH S )r   Nc                 S   r   re   r   r   re   re   rf   r   3  r   zNAsyncAppStoreServerAPIClient.get_all_subscription_statuses.<locals>.<listcomp>r   r   r   r   r   re   re   rf   r   '  s
   
z:AsyncAppStoreServerAPIClient.get_all_subscription_statusesr   c                    s6   t  }|dur|g|d< | d| d|dtI dH S r   r   r   re   re   rf   r   7  s
   
z/AsyncAppStoreServerAPIClient.get_refund_historyr   r   c                    s&   |  d| d | di dtI dH S r   r   r   re   re   rf   r   H  s   $
zOAsyncAppStoreServerAPIClient.get_status_of_subscription_renewal_date_extensionsr   c                       |  d| di dtI dH S r   r  r  re   re   rf   r  T     	z9AsyncAppStoreServerAPIClient.get_test_notification_statusr  r  c                    s2   t  }|dur|g|d< | dd||tI dH S r  r	  r
  re   re   rf   r  _  s
   

z5AsyncAppStoreServerAPIClient.get_notification_historyr  r  c                    s  t  }|dur|g|d< |jdurt|jg|d< |jdur't|jg|d< |jdur1|j|d< |jdur@dd |jD |d< |jdurL|jjg|d	< |jdurV|j|d
< |j	durb|j	jg|d< |j
durot|j
g|d< | d| d | d|dtI dH S )r  Nr   r  r  r  c                 S   r   re   r   r  re   re   rf   r     r   zHAsyncAppStoreServerAPIClient.get_transaction_history.<locals>.<listcomp>r  r  r  r  r  r  r  r   r  r  re   re   rf   r   o  s*   










$z4AsyncAppStoreServerAPIClient.get_transaction_historyc                    r@  r!  r#  r$  re   re   rf   r%    rA  z1AsyncAppStoreServerAPIClient.get_transaction_infor&  c                    r@  r'  r(  r)  re   re   rf   r*    rA  z-AsyncAppStoreServerAPIClient.look_up_order_idc                    s   |  ddi dtI dH S r+  r,  r   re   re   rf   r-    s   z6AsyncAppStoreServerAPIClient.request_test_notificationr.  c                    s"   |  d| di |dI dH  dS r/  r0  r1  re   re   rf   r2    s    	z2AsyncAppStoreServerAPIClient.send_consumption_datar3  c                    s&   |  d| d di |dI dH  dS r4  r0  r5  re   re   rf   r6    s   $	z2AsyncAppStoreServerAPIClient.set_app_account_tokenrl   )3r&   r'   r(   r   rr   r   ro   r?  r   r   r   r	   r$   r   r   r   r   r   r   r   r   r   r   r   r    r   r   r   r   r   r   r  r   r   r  rs   rv   r!   r   r   r"   r%  r   r*  r   r-  r   r2  r#   r6  r8  re   re   r   rf   r9    s$    "6B (*

r9  )Gr   r   enumr   r   typingr   r   r   r   r   r	   r
   r   attrr   r   r   cryptography.hazmat.backendsr   cryptography.hazmat.primitivesr   +appstoreserverlibrary.models.LibraryUtilityr   $models.CheckTestNotificationResponser   models.ConsumptionRequestr   models.Environmentr   models.ExtendRenewalDateRequestr    models.ExtendRenewalDateResponser   models.HistoryResponser   #models.MassExtendRenewalDateRequestr   $models.MassExtendRenewalDateResponser   *models.MassExtendRenewalDateStatusResponser   !models.NotificationHistoryRequestr   "models.NotificationHistoryResponser   models.OrderLookupResponser   models.RefundHistoryResponser   #models.SendTestNotificationResponser   models.Statusr   models.StatusResponser     models.TransactionHistoryRequestr!   models.TransactionInfoResponser"   #models.UpdateAppAccountTokenRequestr#   r$   r%   r   rg   rr   rs   rx   r   r9  re   re   re   rf   <module>   sR   (   .A N