Files
cfw-autumn/others/python-sdk/docs/models/balancefeature.md
2026-02-19 14:14:12 +00:00

17 lines
5.2 KiB
Markdown

# BalanceFeature
The full feature object if expanded.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | The unique identifier for this feature, used in /check and /track calls. |
| `name` | *str* | :heavy_check_mark: | Human-readable name displayed in the dashboard and billing UI. |
| `type` | [models.BalanceType](../models/balancetype.md) | :heavy_check_mark: | Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools. |
| `consumable` | *bool* | :heavy_check_mark: | For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage). |
| `event_names` | List[*str*] | :heavy_minus_sign: | Event names that trigger this feature's balance. Allows multiple features to respond to a single event. |
| `credit_schema` | List[[models.BalanceCreditSchema](../models/balancecreditschema.md)] | :heavy_minus_sign: | For credit_system features: maps metered features to their credit costs. |
| `display` | [Optional[models.BalanceDisplay]](../models/balancedisplay.md) | :heavy_minus_sign: | Display names for the feature in billing UI and customer-facing components. |
| `archived` | *bool* | :heavy_check_mark: | Whether the feature is archived and hidden from the dashboard. |