Skip to content

Add UnitResource for project-scoped woningen endpoints - #7

Merged
jhhazelaar merged 1 commit into
mainfrom
f/jh/unit-resource
May 20, 2026
Merged

Add UnitResource for project-scoped woningen endpoints#7
jhhazelaar merged 1 commit into
mainfrom
f/jh/unit-resource

Conversation

@jhhazelaar

Copy link
Copy Markdown
Member

Summary

  • Adds GetUnitsRequest and GetUnitRequest wrapping /projects/:project_uuid/woningen/ and /projects/:project_uuid/woningen/:uuid/.
  • Adds UnitResource with list() and get() methods, mirroring the shape of UnitTypeResource.
  • Wires NieuwbouwOffice::units(string \$projectUuid): UnitResource on the connector.
  • Returns raw Saloon\\Http\\Response for now — a typed Unit DTO can follow in a separate PR once we have the woningen response shape, same staged approach we used for UnitType.

Test plan

  • vendor/bin/pest — full suite green locally (42 passed, 228 assertions; +10 new tests).
  • Hit a real endpoint via \$nbo->units('<project-uuid>')->list() and confirm a Response comes back with the expected data.objects shape.
  • Hit ->get('<unit-uuid>') and confirm a single-object response comes back.

Mirror the UnitTypeResource shape for the /projects/:uuid/woningen
list and detail endpoints so callers have a typed entry point for
individual units (woningen) alongside the existing unit-type
resource. Returns raw Saloon responses for now; a DTO layer can
follow once the response shape is captured.

Changelog: added
@jhhazelaar
jhhazelaar merged commit a60b417 into main May 20, 2026
18 checks passed
@jhhazelaar
jhhazelaar deleted the f/jh/unit-resource branch May 20, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant