import axios from 'axios';
export const threekitService = async (method = 'get', url, headers = '', body = '') => {
  var config = {
    method: method,
    url: url,
    headers: headers,
    body: body
  };
  return axios(config).then(res => {
    return res.data;
  }).catch(error => {
    return false;
  });
};
export const pricebookService = async (orgId, token, method = 'get', headers = '', body = '') => {
  var config = {
    method: method,
    url: `https://preview.threekit.com/api/orgs/${orgId}/pricebooks?all=true&bearer_token=${token}`,
    headers: headers,
    body: body
  };
  return axios(config).then(res => {
    return res.data;
  }).catch(error => {
    return false;
  });
};
export const getCatalogInfo = async (orgId, assetId, token, method = 'get', headers = '', body = '') => {
  var config = {
    method: method,
    url: `https://preview.threekit.com/api/assets/${assetId}?orgId=${orgId}&bearer_token=${token}`,
    headers: headers,
    body: body
  };
  return axios(config).then(res => {
    return res.data;
  }).catch(error => {
    return false;
  });
};