CUB-40: Add cost summary API endpoint #15

Merged
overseer merged 2 commits from agent/dex/CUB-40-cost-summary-api into dev 2026-04-27 14:17:31 -04:00
Owner

What

Adds a GET endpoint /api/printjobs/{id}/cost-summary that returns material cost data for a print job.

Changes

  • New CostSummaryResponse DTO with cost breakdown fields and warnings
  • New GetCostSummary action on PrintJobsController
  • Calculates price-per-gram from spool purchase price / total weight
  • Calculates total material cost from grams derived × price-per-gram
  • Returns warnings instead of throwing when cost data is missing

Validation

  • dotnet build passes with 0 errors

Linear

Closes CUB-40

## What Adds a GET endpoint `/api/printjobs/{id}/cost-summary` that returns material cost data for a print job. ### Changes - New `CostSummaryResponse` DTO with cost breakdown fields and warnings - New `GetCostSummary` action on `PrintJobsController` - Calculates price-per-gram from spool purchase price / total weight - Calculates total material cost from grams derived × price-per-gram - Returns warnings instead of throwing when cost data is missing ### Validation - `dotnet build` passes with 0 errors ## Linear Closes CUB-40
Dex added 1 commit 2026-04-27 13:11:52 -04:00
feat(CUB-40): [Extrudex] Add cost summary API endpoint
Some checks failed
Dev Build / build-test (pull_request) Failing after 47s
Dev Build / deploy-dev (pull_request) Has been skipped
Dev Build / notify-success (pull_request) Has been skipped
Dev Build / notify-failure (pull_request) Successful in 3s
c1a115c938
overseer added 1 commit 2026-04-27 14:14:16 -04:00
Merge branch 'dev' into agent/dex/CUB-40-cost-summary-api
Some checks failed
Dev Build / build-test (pull_request) Failing after 52s
Dev Build / deploy-dev (pull_request) Has been skipped
Dev Build / notify-success (pull_request) Has been skipped
Dev Build / notify-failure (pull_request) Successful in 3s
b43edad5f0
overseer scheduled this pull request to auto merge when all checks succeed 2026-04-27 14:15:07 -04:00
overseer merged commit 8a2f97d2cd into dev 2026-04-27 14:17:31 -04:00
overseer deleted branch agent/dex/CUB-40-cost-summary-api 2026-04-27 14:17:35 -04:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CubeCraft-Creations/Extrudex#15