ProductOptionConfig
Product option config.
interface ProductOptionConfig {
checkbox_label: string;
checked_by_default: boolean;
date_earliest_value: string;
date_latest_value: string;
date_limit_mode: DateLimitMode;
date_limited: boolean;
default_value: string;
file_max_size: number;
file_types_mode: FileTypesMode;
file_types_other: string[];
file_types_supported: SupportedFileType[];
number_highest_value?: number;
number_integers_only?: boolean;
number_limit_mode?: NumberLimitMode;
number_limited?: boolean;
number_lowest_value?: number;
product_list_adjusts_inventory?: boolean;
product_list_adjusts_pricing?: boolean;
product_list_shipping_calc?: ProductListShippingCalc;
text_characters_limited: boolean;
text_lines_limited: boolean;
text_max_length: number;
text_max_lines: number;
text_min_length: number;
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
checkbox_label | Required | string | (checkbox) Label displayed for the checkbox option. |
checked_by_default | Required | boolean | (checkbox) Flag for setting the checkbox to be checked by default. |
date_earliest_value | Required | string | (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string. |
date_latest_value | Required | string | (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string. |
date_limit_mode | Required | DateLimitMode | (date) The type of limit that is allowed to be entered on a date option. |
date_limited | Required | boolean | (date) Flag to limit the dates allowed to be entered on a date option. |
default_value | Required | string | (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. |
file_max_size | Required | number | (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server. |
file_types_mode | Required | FileTypesMode | (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: * specific - restricts uploads to particular file types; * all - allows all file types. |
file_types_other | Required | string[] | (file) A list of other file types allowed with the file upload option. |
file_types_supported | Required | SupportedFileType[] | (file) The type of files allowed to be uploaded if the file_type_option is set to specific. Values: * images - Allows upload of image MIME types (bmp, gif, jpg, jpeg, jpe, jif, jfif, jfi, png, wbmp, xbm, tiff). * documents - Allows upload of document MIME types (txt, pdf, rtf, doc, docx, xls, xlsx, accdb, mdb, one, pps, ppsx, ppt, pptx, pub, odt, ods, odp, odg, odf). * other - Allows file types defined in the file_types_other array. |
number_highest_value | Optional | number | (numbers_only_text) The highest allowed value for a number option if number_limited is true. |
number_integers_only | Optional | boolean | (numbers_only_text) The highest allowed value for a number option if number_limited is true. |
number_limit_mode | Optional | NumberLimitMode | (numbers_only_text) The type of limit on values entered for a number option. |
number_limited | Optional | boolean | (numbers_only_text) Flag to limit the value of a number option. |
number_lowest_value | Optional | number | (numbers_only_text) The lowest allowed value for a number option if number_limited is true. |
product_list_adjusts_inventory | Optional | boolean | (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list. |
product_list_adjusts_pricing | Optional | boolean | (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price. |
product_list_shipping_calc | Optional | ProductListShippingCalc | (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: * none - don't adjust; * weight - use shipping weight only; * package - use weight and dimensions. |
text_characters_limited | Required | boolean | (text, multi_line_text) Flag to validate the length of a text or multi-line text input. |
text_lines_limited | Required | boolean | (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input. |
text_max_length | Required | number | (text, multi_line_text) The maximum length allowed for a text or multi line text option. |
text_max_lines | Required | number | (multi_line_text) The maximum number of lines allowed on a multi-line text input. |
text_min_length | Required | number | (text, multi_line_text) The minimum length allowed for a text or multi-line text option. |