class CheckboxGroupOptionBuilder
implements
JSONEncodable<APICheckboxGroupOption>declare class CheckboxGroupOptionBuilder implements JSONEncodable<APICheckboxGroupOption>A builder that creates API-compatible JSON data for checkbox group options.
Constructors
constructor(data?: Partial<APICheckboxGroupOption>)
data?: Partial<APICheckboxGroupOption>
Creates a new checkbox group option from API data.
Examples:Creating a checkbox group option from an API data object:Creating a checkbox group option using setters and API data:
const option = new CheckboxGroupOptionBuilder({
label: 'Option 1',
value: 'option_1',
});const option = new CheckboxGroupOptionBuilder()
.setLabel('Option 2')
.setValue('option_2');data : Partial<APICheckboxGroupOption>
setDefault(isDefault: boolean) : this
isDefault: boolean
Sets whether this option is selected by default.
setDescription(description: string) : this
description: string
Sets the description for this option.
setLabel(label: string) : this
label: string
Sets the label for this option.
setValue(value: string) : this
value: string
Sets the value for this option.
toJSON() : APICheckboxGroupOption
Serializes this builder to API-compatible JSON data.