o
    ˷e                     @   sX   d dl mZmZ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 )	    )absolute_importdivisionprint_function)util)APIResource)Customer)
quote_plusc                   @   s*   e Zd ZdZdZdd ZedddZdS )	CustomerBalanceTransactionaF  
    Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value,
    which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
    You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),
    or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.

    Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more.
    customer_balance_transactionc                 C   s>   t | j}t | j}t }t|}t|}d|||f S )Nz%s/%s/balance_transactions/%s)r   utf8idcustomerr   	class_urlr   )selftokenr   base	cust_extnextn r   h/var/www/ideatree/venv/lib/python3.10/site-packages/stripe/api_resources/customer_balance_transaction.pyinstance_url   s   z'CustomerBalanceTransaction.instance_urlNc                 K   s   t d)NzCan't retrieve a Customer Balance Transaction without a Customer ID. Use Customer.retrieve_customer_balance_transaction('cus_123', 'cbtxn_123'))NotImplementedError)clsr   api_keyparamsr   r   r   retrieve   s   z#CustomerBalanceTransaction.retrieve)N)__name__
__module____qualname____doc__OBJECT_NAMEr   classmethodr   r   r   r   r   r	   
   s    	r	   N)
__future__r   r   r   striper   stripe.api_resources.abstractr   stripe.api_resources.customerr   stripe.six.moves.urllib.parser   r	   r   r   r   r   <module>   s   