Skip to content

feat: implement area-based pricing engine#11

Merged
lukTS merged 2 commits into
mainfrom
feat/pricing-engine
May 19, 2026
Merged

feat: implement area-based pricing engine#11
lukTS merged 2 commits into
mainfrom
feat/pricing-engine

Conversation

@lukTS
Copy link
Copy Markdown
Owner

@lukTS lukTS commented May 19, 2026

What

Implement PricingEngine class with area-based calculation logic.

Changes

  • PricingEngine class with calculate() method
  • Looks up rule by name, computes area × unitPrice × quantity
  • Throws on unknown rule name
  • 5 unit tests covering calculation and error handling
  • Re-exported from package entry point

Closes #5

lukTS added 2 commits May 18, 2026 18:09
- calculate() method with area-based pricing
- Throws on unknown rule name
- Re-exported from index

#5
- area calculation
- subtotal (area × unitPrice)
- total (subtotal × quantity)
- full result shape
- throws on unknown rule

#5
@lukTS lukTS added this to the v0.1.0 milestone May 19, 2026
@lukTS lukTS added the enhancement New feature or request label May 19, 2026
@lukTS lukTS merged commit c467c31 into main May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: implement area-based pricing engine

1 participant