UNPKG

@taurgis/sfccdx

Version:

SFCCDX is a command line interface (CLI) for Salesforce Commerce Cloud. It can be used to easily manage (meta)data (import/export) in relation to your project.

20 lines (16 loc) 380 B
class OCAPIResponse { constructor(response) { this.status = response.status; this.data = response.data; } isSuccess() { return this.status <= 204; } getFaultMessage() { if (this.status > 204) { return this.data?.fault?.message; } return 'No Fault Message.' } } module.exports = OCAPIResponse;