o
    tBh0                     @   s(   d dl Z ddlmZ G dd deZdS )    N   )ShopifyResourcec                   @   s   e Zd ZdZedddZdS )Refundz/orders/$order_id/Nc                 C   sX   i }|r||d< |pg |d< d|i}| j d|t| d}| | j|jd|idS )a  
        Calculates refund transactions based on line items and shipping.
        When you want to create a refund, you should first use the calculate
        endpoint to generate accurate refund transactions.

        Args:
           order_id: Order ID for which the Refund has to created.
           shipping: Specify how much shipping to refund.
           refund_line_items: A list of line item IDs and quantities to refund.
        Returns:
           Unsaved refund record
        shippingrefund_line_itemsrefund	calculate)order_idbodyr	   )prefix_options)postjsondumpsencodeformatdecoder
   )clsr	   r   r   datar
   resource r   o/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/shopify/resources/refund.pyr   	   s   zRefund.calculate)NN)__name__
__module____qualname___prefix_sourceclassmethodr   r   r   r   r   r      s    r   )r   baser   r   r   r   r   r   <module>   s    