methods/remove.js

  1. /**
  2. * @method
  3. * @memberof EcomApps
  4. * @name remove
  5. * @description Delete application from
  6. * [Store API]{@link https://developers.e-com.plus/docs/api/#/store/applications/specific-application}.
  7. *
  8. * @param {number} applicationId - Object ID (`_id`) of application in Store API
  9. *
  10. * @returns {Promise<data|error>}
  11. *
  12. * @example
  13. ecomApps.remove('5dc2023456cc4e057cfe8e94')
  14. .then(result => console.log(result))
  15. .catch(e => console.log(e))
  16. */
  17. export default (self, _id) => self.ecomAuth.requestApi(`/applications/${_id}.json`, 'delete')