UNPKG

@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

48 lines (47 loc) 947 B
export class Shipment { constructor(raw) { if (raw) { this.raw = raw; } else { this.raw = { requirements: [] }; } } getRaw() { return this.raw; } setRaw(value) { this.raw = value; return this; } setId(id) { this.raw.id = id; return this; } setPickup(value) { this.raw.pickup = value.getRaw(); return this; } setDelivery(value) { this.raw.delivery = value.getRaw(); return this; } addRequirement(value) { this.raw.requirements.push(value); return this; } setPriority(value) { this.raw.priority = value; return this; } setDescription(value) { this.raw.description = value; return this; } setAmount(value) { this.raw.amount = value; return this; } }