ClockNext: update unit
clocknext_update_unitReplace a billing unit with a complete new definition, clearing any omitted fields. Use for full updates to a unit's pricing, tiers, and settings.
Instructions
Replace a unit by id with its COMPLETE new definition — a full rewrite, NOT a partial patch: any optional field you omit (description, tiers, flatPrice) is CLEARED, not left as-is. Read the current unit with clocknext_get_unit first, edit, then send the whole object back. Changing agentKey re-points which runtime signals map here — do it deliberately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The unit id to update. | |
| name | Yes | Unit name. | |
| tiers | No | SLAB/VOLUME only: 1–50 tiers, ordered; only the last may have upTo:null. | |
| agentKey | Yes | Lowercased stable key consumption is reported against (sent as `agentKey` when recording unit usage). The unit's durable identity — unique org-wide, chars [a-z0-9._-]; a rename never changes it. | |
| isActive | No | Whether the unit is active/sellable. | |
| flatPrice | No | FLAT only: price per event. Defaults to 0. | |
| description | No | Optional human-readable description. | |
| pricingType | Yes | FLAT = a single per-event price; SLAB/VOLUME = tiered pricing. |