Skip to content

Support VROOM 1.15 task and cost properties - #11

Merged
mwansinck merged 1 commit into
3.0from
vroom-1.15-props
Jun 22, 2026
Merged

Support VROOM 1.15 task and cost properties#11
mwansinck merged 1 commit into
3.0from
vroom-1.15-props

Conversation

@mwansinck

Copy link
Copy Markdown
Contributor

What

Adds the new input properties introduced in VROOM 1.15.0 so the client can model the latest API:

API field Resource PHP property
setup_per_type job / shipment_step ShipmentStep::$setupPerType
service_per_type job / shipment_step ShipmentStep::$servicePerType
type vehicle Vehicle::$type
per_task_hour cost Costs::$perTaskHour

These cover the three 1.15 features: per-vehicle-type task times (#336) and task-time costs (#1130). Job inherits the per-type fields via ShipmentStep.

Also includes two fixes found while auditing the resources against the full API spec:

  • Costs::$perKmper_km (cost object, added in VROOM 1.14) was missing entirely.
  • VehicleStep keytype — the custom-route step field was serialized as key, but VROOM expects type (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

  • Added serializer tests for the new vehicle type, cost fields and per-type task durations.
  • Full audit confirms all 1.15 properties are present and no bogus fields remain.
  • phpstan clean, phpunit green (5 tests).

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>
@mwansinck
mwansinck requested a review from rvmourik June 22, 2026 20:29
@mwansinck
mwansinck merged commit 45485b0 into 3.0 Jun 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant