Skip to content

Apr.fs: add AprMethod.Disabled for non-APR products #33

@simontreanor

Description

@simontreanor

Add a new AprMethod.Disabled case to the AprMethod discriminated union in Apr.fs for products where APR is not applicable or not required.

Motivation: Zero-interest products (salary advances, BNPL) do not have a meaningful APR, but the current model requires one. Without this case, PR #29 (Salary Advance) and the planned BuyNowPayLater.fs module must use a placeholder APR method, which is misleading and could cause incorrect regulatory calculations.

Proposed change: Add | Disabled to AprMethod. Any code path that attempts to compute APR when AprMethod.Disabled is set should return a clearly typed result (e.g. None or a dedicated AprResult.NotApplicable case) rather than raising an exception or returning zero.

Prerequisite for: PR #29 (Salary Advance / EWA) and the planned BuyNowPayLater.fs module.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions