Add a new rate
Field | Type | Required | Description | Example |
---|---|---|---|---|
RateCardID |
string | ✔️ | ID of the rate card to update | |
ProductID |
string | ✔️ | ID of the product to add a rate for | |
PricingGroupValues |
map[string]string | ➖ | Optional. List of pricing group key value pairs which will be used to calculate the price. | |
StartingAt |
time.Time | ✔️ | inclusive effective date | |
EndingBefore |
*time.Time | ➖ | exclusive end date | |
Entitled |
bool | ✔️ | N/A | |
RateType |
operations.RateType | ✔️ | N/A | |
Price |
*float64 | ➖ | Default price. For FLAT and SUBSCRIPTION rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1. | |
CreditTypeID |
*string | ➖ | "The Metronome ID of the credit type to associate with price, defaults to USD (cents) if not passed. Used by all rate_types except type PERCENTAGE. PERCENTAGE rates use the credit type of associated rates." | 2714e483-4ff1-48e4-9e25-ac732e8f24f2 |
Quantity |
*float64 | ➖ | Default quantity. For SUBSCRIPTION rate_type, this must be >=0. | |
IsProrated |
*bool | ➖ | Default proration configuration. Only valid for SUBSCRIPTION rate_type. | |
UseListPrices |
*bool | ➖ | Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed using list prices rather than the standard rates for this product on the contract. | |
Tiers |
[]operations.Tiers | ➖ | Only set for TIERED rate_type. | |
CustomRate |
map[string]any | ➖ | Only set for CUSTOM rate_type. This field is interpreted by custom rate processors. |