UNPKG

@userlist/push

Version:
24 lines (18 loc) 515 B
import Resource from './resource'; export default class Company extends Resource { static get endpoint() { return '/companies'; } constructor(attributes) { if (typeof attributes === 'string') { attributes = { identifier: attributes }; } if (attributes == null || typeof attributes !== 'object') { throw 'Missing required attributes object'; } if (attributes.identifier == null) { throw 'Missing required attribute identifier'; } super(attributes); } }