Support VROOM 1.15 task and cost properties - #11
Merged
Conversation
Add setup_per_type and service_per_type to tasks, type to vehicles and per_task_hour to costs (plus the missing per_km from 1.14). Fix vehicle step type field which was serialized as "key". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the new input properties introduced in VROOM 1.15.0 so the client can model the latest API:
setup_per_typeShipmentStep::$setupPerTypeservice_per_typeShipmentStep::$servicePerTypetypeVehicle::$typeper_task_hourCosts::$perTaskHourThese cover the three 1.15 features: per-vehicle-type task times (#336) and task-time costs (#1130).
Jobinherits the per-type fields viaShipmentStep.Also includes two fixes found while auditing the resources against the full API spec:
Costs::$perKm—per_km(cost object, added in VROOM 1.14) was missing entirely.VehicleStepkey→type— the custom-route step field was serialized askey, but VROOM expectstype(start/job/pickup/delivery/break/end), so custom routes / plan mode could not work.Why
Keeps the OO client in sync with the VROOM 1.15 API and fixes a serialization bug that broke
vehicle.steps.Verification
type, cost fields and per-type task durations.phpstanclean,phpunitgreen (5 tests).