@geoapify/route-planner-sdk
Version:
TypeScript SDK for the Geoapify Route Planner API. Supports route optimization, delivery planning, and timeline visualization in browser and Node.js
28 lines (27 loc) • 528 B
JavaScript
export class Break {
constructor(raw) {
if (raw) {
this.raw = raw;
}
else {
this.raw = {
time_windows: []
};
}
}
getRaw() {
return this.raw;
}
setRaw(value) {
this.raw = value;
return this;
}
addTimeWindow(start, end) {
this.raw.time_windows.push([start, end]);
return this;
}
setDuration(duration) {
this.raw.duration = duration;
return this;
}
}