Price a Usage change before applying it
quote_usage_changeCalculate the cost of a planned usage change without applying it: checks it's allowed and returns the charge now plus next-term recurring cost for customer confirmation.
Instructions
Prices an intended Usage change without applying it, and checks that it is allowed: what the customer would be charged now, and, with next_term, what their recurring cost would become. Read-only -- nothing is written. Call it before push_usage_increment, push_usage_quantity or push_usage_enabling whenever the change is billable, and show the amount to the end customer for confirmation before the write. Pass exactly one of increment, quantity_current or is_enabled, matching the Feature's type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| increment | No | Quantity that would be added, for a Consumption or Limitation Feature. | |
| next_term | No | Also return the estimated recurring cost for the next billing period. | |
| date_stamp | No | When the change happened, ISO 8601 in UTC. Defaults to now. A future date is not supported. | |
| is_enabled | No | State it would be set to, for an OnOff Feature. | |
| feature_ref | Yes | Shared reference of the Feature (ReferenceFeature). | |
| customer_ref | Yes | Shared reference of the customer. | |
| subscription_id | No | Which subscription the Usage belongs to. Needed when the customer has several running. | |
| quantity_current | No | Absolute quantity it would be set to, for a Limitation Feature. |