o
    Q?h                     @   s<   d dl mZ d dlmZ d dlmZ d dlmZ dd ZdS )    )Client)SERVER_TIMESTAMP)	API_Error)saveShopc           	      C   s   |  d}| d}| d}|  d}t|d}|jjdd}| rJ|j d}t|| d	d
| |td
d| dt| d||  dd}|S | rTt	|j
dd S )NcurrentUseruidenterpriseIdaccess_token)r	   me)merchant_idmerchantbusiness_name4Squareidbusiness_urlrefresh_token)r   nameappIdr   	createdAt
platformIdplatformNameplatformShopId	updatedAturlaccessTokenrefreshTokeni  )getr   	merchantsretrieve_merchant
is_successbodyr   r   is_errorr   errors)	datar   r   r   r	   clientresultr   shop r(   K/var/www/html/riverr-enterprise-integrations-main/functions/Square/Shops.pygetSquareMerchants   s8   




r*   N)	square.clientr   configs.firebaser   functions.Responser   functions.Shopsr   r*   r(   r(   r(   r)   <module>   s
    