@onfleet/node-onfleet
Version:
Onfleet's Node.js API Wrapper Package
37 lines (34 loc) • 790 B
JavaScript
import Resource from '../Resource.js';
/**
* @desc this class holds the CRUD methods allowed on the Route Plan endpoint
*/
export default class Routeplan extends Resource {
constructor(api) {
super(api);
this.defineTimeout();
this.endpoints({
create: {
path: '/routePlans',
method: 'POST',
},
get: {
path: '/routePlans/:routePlanId',
altPath: '/routePlans',
method: 'GET',
queryParams: true,
},
update: {
path: '/routePlans/:routePlanId',
method: 'PUT',
},
addTasksToRoutePlan:{
path:'/routePlans/:routePlanId/tasks',
method:'PUT',
},
deleteOne: {
path: '/routePlans/:routePlanId',
method: 'DELETE',
}
});
}
}