https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/boto/fps/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/boto/fps/__pycache__/connection.cpython-310.pyc
o

ckF[�7�@s�ddlZddlZddlmZddlmZddlmZddlZdgZ	dZ
dd�Zd	d
�Zdd�Z
d
d�Zdd�ZGdd�de�ZdS)�N)�AWSQueryConnection)�ResponseErrorFactory)�ResponseFactory�
FPSConnection)�action�responsecCs"tD]}t||t||d��q|S�N)�decorated_attrs�setattr�getattr)�func�to�attr�r�5/usr/lib/python3/dist-packages/boto/fps/connection.py�add_attrs_from$src��fdd�}|S)Ncs0��fdd�}d��jd����|_t�|d�S)Ncs`t|j��D]}|�|�}t|dt|��||d<t|d|j�||d<q�|g|�Ri|��S)N�Valuez.Value�CurrencyCodez
.CurrencyCode)�filter�has_key�popr�str�currencycode)�self�args�kw�field�amount)�fieldsrrr�wrapper,s
�z3complex_amounts.<locals>.decorator.<locals>.wrapperz{0}
Complex Amounts: {1}z, �r
)�format�__doc__�joinr�rr �r�rr�	decorator+s
�z"complex_amounts.<locals>.decoratorr)rr(rr&r�complex_amounts*sr)cr)Ncs>��fdd�}d�dd��D��}d��j|�|_t�|d�S)Ncs\�fdd�}dtt|���kr'd�dd��D��}d�t�dd	�|�}t|���|i���S)
Ncst|�tt�j|��kSr)�lenrr��x�rrr�<lambda>>sz>requires.<locals>.decorator.<locals>.wrapper.<locals>.<lambda>�� OR cS�g|]}d�|��qS��+�r$��.0�grrr�
<listcomp>@�z@requires.<locals>.decorator.<locals>.wrapper.<locals>.<listcomp>z{0} requires {1} argument(s)r�Method)r*rr$r"r�KeyError)rr�hasgroup�message)r�groupsr-rr =s�z,requires.<locals>.decorator.<locals>.wrapperr0cSr1r2r4r5rrrr8Er9z/requires.<locals>.decorator.<locals>.<listcomp>z{0}
Required: {1}r!)r$r"r#r)rr r=�r>r'rr(;s�zrequires.<locals>.decoratorr)r>r(rr?r�requires9sr@cs&�fdd�}d��j�|_t�|d�S)Ncs|�dt����|i|��S)N�CallerReference)�
setdefault�uuid�uuid4)rrr'rrr Nsz'needs_caller_reference.<locals>.wrapperz2{0}
Uses CallerReference, defaults to uuid.uuid4()r!)r"r#rr%rr'r�needs_caller_referenceLs
�rEcr)Ncs|d��p
ttj�j�d����t���ttj	j
�d�r%ttj	j
�d�����fdd�}��|_|_
d�
��j�|_|S)N��_�Responsecs�|��g|�Ri|��Srr�rrr�rrrrrr ^sz.api_action.<locals>.decorator.<locals>.wrapperzFPS {0} API call
{1})r$�mapr�
capitalize�__name__�splitr�hasattr�boto�fpsrrrr"r#r%��apirJrr(Xs�zapi_action.<locals>.decoratorr)rSr(rrRr�
api_actionVsrTcseZdZdZeZdZ�fdd�Zdd�Ze	e
d�egd��e�d	d
�����Z
edg�e�dd
���Zedg�e�dd���Zedg�e�dd���Ze�dd��Zedg�e�dd���Ze�dd��Ze�dd��Ze	eddg�e�dd����Ze	ed d!g�d"d#���Ze	e
d$�egd%��e�d&d'�����Ze	e
d$�egd%��e�d(d)�����Zedg�e�d*d+���Ze
d$�egd,��e�d-d.����Ze
d/�egd0��e�d1d2����Zed3g�e�d4d5���Zed6gd7g�e�d8d9���Zed:d;g�e�d<d=���Ze�d>d?��Zed7g�e�d@dA���Z ed7g�e�dBdC���Z!e	e
dD�egdE��e�dFdG�����Z"edHg�e�dIdJ���Z#e	e
dK�egdL��e�dMdN�����Z$edOg�e�dPdQ���Z%edOg�e�dRdS���Z&e	e
d/�edOg�e�dTdU�����Z'ed7g�e�dVdW���Z(�Z)S)Xrz
2010-08-28�USDcs6|�d|j�|_|�dd�tt|�j|i|��dS)Nr�hostzfps.sandbox.amazonaws.com)rrrB�superr�__init__rI��	__class__rrrXmszFPSConnection.__init__cCsdgS)NrQr)rrrr�_required_auth_capabilityrsz'FPSConnection._required_auth_capability�SettlementAmount)�CreditInstrumentIdzSettlementAmount.Value�
SenderTokenIdzSettlementAmount.CurrencyCodecK�|�|||�S)z�
        Allows a caller to initiate a transaction that atomically transfers
        money from a sender's payment instrument to the recipient, while
        decreasing corresponding debt balance.
        ��
get_object�rrrrrrr�settle_debtu�zFPSConnection.settle_debt�
TransactionIdcKr_)z:
        Gets the latest status of a transaction.
        r`rbrrr�get_transaction_status��z$FPSConnection.get_transaction_status�	StartDatecKr_)z>
        Returns transactions for a given date range.
        r`rbrrr�get_account_activity�rgz"FPSConnection.get_account_activitycKr_)z7
        Returns all details of a transaction.
        r`rbrrr�get_transaction�rgzFPSConnection.get_transactioncC�|�|i|�S)z~
        Returns the total outstanding balance for all the credit instruments
        for the given creditor account.
        r`�rrrrrr�get_outstanding_debt_balance�rgz*FPSConnection.get_outstanding_debt_balance�PrepaidInstrumentIdcKr_)zP
        Returns the balance available on the given prepaid instrument.
        r`rbrrr�get_prepaid_balance�rgz!FPSConnection.get_prepaid_balancecCrk)z�
        Returns the total liability held by the given account corresponding to
        all the prepaid instruments owned by the account.
        r`rlrrr�get_total_prepaid_liability�rgz)FPSConnection.get_total_prepaid_liabilitycCrk)zJ
        Returns the account balance for an account in real time.
        r`rlrrr�get_account_balance��z!FPSConnection.get_account_balance�PaymentInstruction�	TokenTypecKr_)z<
        Installs a payment instruction for caller.
        r`rbrrr�install_payment_instruction��z)FPSConnection.install_payment_instruction�	returnURL�pipelineNamec
s�d|jvrdpd}d�|�}d}d}|d|vsJd��|�d	d
d��|�d|j�d
d���fdd��t�fdd�|��D��}dd�}d�d||||�g�}|j�	|�}	|d�|	�fg7}|�
�d�||||��S)zj
        Generate a signed URL for the Co-Branded service API given arguments as
        payload.
        �sandboxzpayments-sandbox�paymentszauthorize.{0}.amazon.comz/cobranded-ui/actions/start)�	SingleUse�MultiUse�	Recurring�	Recipient�SetupPrepaid�
SetupPostpaid�	EditTokenrxzInvalid pipelineName�
HmacSHA256�2)�signatureMethod�signatureVersion�	callerKeycSs|durt|�p	dS)NrF)rr+rrrr.��z(FPSConnection.cbui_url.<locals>.<lambda>cstj�|�dd�S)N�~)�safe)�urllib�quoter+)�safestrrrr.�scsg|]
\}}|�|�f�qSrr�r6�k�v)�	safequoterrr8��z*FPSConnection.cbui_url.<locals>.<listcomp>cSsd�dd�|D��S)N�&cSsg|]
\}}|d|�qS)�=rr�rrrr8�r�z<FPSConnection.cbui_url.<locals>.<lambda>.<locals>.<listcomp>r4)�prrrr.�r��
�GET�	signaturezhttps://{0}{1}?{2})rVr"�updaterB�aws_access_key_id�sorted�itemsr$�
_auth_handler�sign_string�sort)
rrry�endpoint�base�validpipelines�payload�encoded�	canonicalr�r)r�r�r�cbui_url�s&
�zFPSConnection.cbui_url�TransactionAmount)r^�TransactionAmount.Value�TransactionAmount.CurrencyCodecKr_)z�
        Reserve API is part of the Reserve and Settle API conjunction that
        serve the purpose of a pay where the authorization and settlement have
        a timing difference.
        r`rbrrr�reserve�rdzFPSConnection.reservecKr_)zY
        Allows calling applications to move money from a sender to a recipient.
        r`rbrrr�pay��	zFPSConnection.paycKr_)zP
        Cancels an ongoing transaction and puts it in cancelled state.
        r`rbrrr�cancel�rgzFPSConnection.cancel)�ReserveTransactionIdr�r�cKr_)z�
        The Settle API is used in conjunction with the Reserve API and is used
        to settle previously reserved transaction.
        r`rbrrr�settler�zFPSConnection.settle�RefundAmount)re�RefundAmount.ValuerAzRefundAmount.CurrencyCodecKr_)z=
        Refunds a previously completed transaction.
        r`rbrrr�refund
szFPSConnection.refund�RecipientTokenIdcKr_)z/
        Returns the recipient status.
        r`rbrrr�!get_recipient_verification_statusrgz/FPSConnection.get_recipient_verification_statusrA�TokenIdcKr_)z�
        Returns the details of a particular token installed by this calling
        application using the subway co-branded UI.
        r`rbrrr�get_token_by_callerrvz!FPSConnection.get_token_by_caller�UrlEndPoint�HttpParameterscKr_)zM
        Verify the signature that FPS sent in IPN or callback urls.
        r`rbrrr�verify_signature(rgzFPSConnection.verify_signaturecKr_)zJ
        Returns a list of tokens installed on the given account.
        r`rbrrr�
get_tokens0rrzFPSConnection.get_tokenscKr_)z/
        Returns the usage of a token.
        r`rbrrr�get_token_usage7rgzFPSConnection.get_token_usagecKr_)zd
        Cancels any token installed by the calling application on its own
        account.
        r`rbrrr�cancel_token?rvzFPSConnection.cancel_token�
FundingAmount)rnzFundingAmount.Valuer^zFundingAmount.CurrencyCodecKr_)zL
        Funds the prepaid balance on the given prepaid instrument.
        r`rbrrr�fund_prepaidHr�zFPSConnection.fund_prepaidr]cKr_)zS
        Returns the balance corresponding to the given credit instrument.
        r`rbrrr�get_debt_balanceSrgzFPSConnection.get_debt_balance�AdjustmentAmount)r]zAdjustmentAmount.ValuezAdjustmentAmount.CurrencyCodecKr_)zu
        Allows a creditor to write off the debt balance accumulated partially
        or fully at any time.
        r`rbrrr�write_off_debt[s
zFPSConnection.write_off_debt�SubscriptionIdcKr_)zF
        Returns the transactions for a given subscriptionID.
        r`rbrrr�!get_transactions_for_subscriptiongrgz/FPSConnection.get_transactions_for_subscriptioncKr_)zQ
        Returns the details of Subscription for a given subscriptionID.
        r`rbrrr�get_subscription_detailsorgz&FPSConnection.get_subscription_detailscKs*d}d|vsd|vsJ|��|�|||�S)z)
        Cancels a subscription.
        z@If you specify a RefundAmount, you must specify CallerReference.r�rAr`)rrrrr=rrr�cancel_subscription_and_refundwsz,FPSConnection.cancel_subscription_and_refundcKr_)z:
        Gets the payment instruction of a token.
        r`rbrrr�get_payment_instruction�rgz%FPSConnection.get_payment_instruction)*rM�
__module__�__qualname__�
APIVersionr�
ResponseErrorrrXr[rEr)r@rTrcrfrirjrmrorprqrur�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��
__classcell__rrrYrrgs�














)r�rC�boto.connectionr�boto.fps.exceptionr�boto.fps.responserrP�__all__r	rr)r@rErTrrrrr�<module>s


https://t.me/RX1948 - 2025