|
| 1 | +# BenefitFeatureFlag |
| 2 | + |
| 3 | +A benefit of type `feature_flag`. |
| 4 | + |
| 5 | +Use it to grant feature flags with key-value metadata |
| 6 | +that can be queried via the API and webhooks. |
| 7 | + |
| 8 | +## Example Usage |
| 9 | + |
| 10 | +```typescript |
| 11 | +import { BenefitFeatureFlag } from "@polar-sh/sdk/models/components/benefitfeatureflag.js"; |
| 12 | + |
| 13 | +let value: BenefitFeatureFlag = { |
| 14 | + id: "<value>", |
| 15 | + createdAt: new Date("2026-01-23T21:17:09.985Z"), |
| 16 | + modifiedAt: new Date("2026-03-18T19:56:22.426Z"), |
| 17 | + type: "feature_flag", |
| 18 | + description: "while dreary bestride revoke continually hm so terrible", |
| 19 | + selectable: true, |
| 20 | + deletable: true, |
| 21 | + organizationId: "<value>", |
| 22 | + metadata: {}, |
| 23 | + properties: {}, |
| 24 | +}; |
| 25 | +``` |
| 26 | + |
| 27 | +## Fields |
| 28 | + |
| 29 | +| Field | Type | Required | Description | |
| 30 | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | |
| 31 | +| `id` | *string* | :heavy_check_mark: | The ID of the benefit. | |
| 32 | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | |
| 33 | +| `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | |
| 34 | +| `type` | *"feature_flag"* | :heavy_check_mark: | N/A | |
| 35 | +| `description` | *string* | :heavy_check_mark: | The description of the benefit. | |
| 36 | +| `selectable` | *boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | |
| 37 | +| `deletable` | *boolean* | :heavy_check_mark: | Whether the benefit is deletable. | |
| 38 | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the benefit. | |
| 39 | +| `metadata` | Record<string, *components.MetadataOutputType*> | :heavy_check_mark: | N/A | |
| 40 | +| `properties` | [components.BenefitFeatureFlagProperties](../../models/components/benefitfeatureflagproperties.md) | :heavy_check_mark: | Properties for a benefit of type `feature_flag`. | |
0 commit comments