o
    ÖtBhé  ã                   @   s0   d dl mZ ddlmZ G dd„ deejƒZdS )é   )ÚShopifyResourceé    )Úmixinsc                       s0   e Zd ZdZei fdd„ƒZ‡ fdd„Z‡  ZS )ÚVariantz/products/$product_id/c                 C   s"   |  d¡}|rd| j|f S | jS )NÚ
product_idz%s/products/%s)ÚgetÚsite)ÚclsÚoptionsr   © r   úp/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/shopify/resources/variant.pyÚ_prefix   s   
zVariant._prefixc                    sl   d| j vr| j| j d< d}tj}|r/| d¡|kr/|dkr/d| jv r&| jd= d| jv r/| jd= tt| ƒ ¡ S )Nr   Ú201910ú-ÚunstableÚinventory_quantityÚold_inventory_quantity)Ú_prefix_optionsr   r   ÚversionÚstripÚ
attributesÚsuperÚsave)ÚselfÚstart_api_versionÚapi_version©Ú	__class__r   r   r      s   


zVariant.save)Ú__name__Ú
__module__Ú__qualname__Ú_prefix_sourceÚclassmethodr   r   Ú__classcell__r   r   r   r   r      s
    r   N)Úbaser   Úshopifyr   Ú
Metafieldsr   r   r   r   r   Ú<module>   s    