Skip to content

Define pricing behavior for orders below all configured desi ranges #3

Description

@mkarson1997

Problem

GetClosestConfigAsync orders configurations by absolute distance from CarrierMaxDesi, and the fallback pricing path also uses an absolute desi difference. For an order that is below every configured range, this can apply an extra-desi surcharge even though the order is smaller than the chosen range.

Decision needed

Define the business rule for values below all configured ranges and for gaps between configured ranges.

Possible policies include:

  • Use the nearest eligible range price with no surcharge when order desi is below the range.
  • Use the nearest lower maximum only and fail when no lower range exists.
  • Explicitly model gap pricing as a separate rule.

Acceptance criteria

  • The expected rule is documented with examples.
  • Unit tests cover below-minimum, above-maximum and gap cases.
  • Repository query and pricing calculation implement the same documented rule.
  • README business-rule section is updated.

No production behavior should be changed until the rule is explicit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions