Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

control: support division transform #268

Merged
merged 1 commit into from
Mar 2, 2023
Merged

control: support division transform #268

merged 1 commit into from
Mar 2, 2023

Conversation

bmizerany
Copy link
Contributor

@bmizerany bmizerany commented Mar 2, 2023

This commit adds support for transforming the quantities of per unit
prices using division and rounding.

A new 'divide' field and object is ready for use in pricing.json, like:

plans["plan:pro@0"].features["feature:builds"].divide.by = 100

Rounding down is the default rounding behavior. To override, use:

plans["plan:pro@0"].features["feature:builds"].divide.rounding = "up"

This commit adds support for transforming the quantities of per unit
prices using division and rounding.

A new 'divide' field and object is ready for use in pricing.json, like:

  plans["plan:pro@0"].features["feature:builds"].divide.by = 100

Rounding down is the default rounding behavior. To override, use:

  plans["plan:pro@0"].features["feature:builds"].divide.rounding = "up"
@bmizerany bmizerany marked this pull request as ready for review March 2, 2023 05:11
@bmizerany bmizerany merged commit f366a46 into main Mar 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant