/// <summary> /// Initializes a new instance of the <see cref="ProductOptionBase1" /> class. /// </summary> /// <param name="config">config.</param> /// <param name="displayName">The name of the option shown on the storefront. .</param> /// <param name="id">The unique numerical ID of the option, increments sequentially. .</param> /// <param name="optionValues">Product Option `option_value`..</param> /// <param name="productId">The unique numerical ID of the product to which the option belongs. .</param> /// <param name="sortOrder">Order in which the option is displayed on the storefront. .</param> /// <param name="type">The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch. .</param> public ProductOptionBase1(OptionConfig config = default(OptionConfig), string displayName = default(string), int?id = default(int?), AllOfproductOptionBase1OptionValues optionValues = default(AllOfproductOptionBase1OptionValues), int?productId = default(int?), int?sortOrder = default(int?), TypeEnum?type = default(TypeEnum?)) { this.Config = config; this.DisplayName = displayName; this.Id = id; this.OptionValues = optionValues; this.ProductId = productId; this.SortOrder = sortOrder; this.Type = type; }
/// <summary> /// Initializes a new instance of the <see cref="ProductModifierBase" /> class. /// </summary> /// <param name="config">config.</param> /// <param name="displayName">The name of the option shown on the storefront..</param> /// <param name="required">Whether or not this modifer is required or not at checkout. Required in a /POST. (required).</param> /// <param name="sortOrder">The order the modifiers display on the product detail page..</param> /// <param name="type">BigCommerce API, which determines how it will display on the storefront. Acceptable values: `date`, `checkbox`, `file`, `text`, `multi_line_text`, `numbers_only_text`, `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. Required in a /POST. (required).</param> public ProductModifierBase(OptionConfig config = default(OptionConfig), string displayName = default(string), bool?required = default(bool?), int?sortOrder = default(int?), TypeEnum type = default(TypeEnum)) { // to ensure "required" is required (not null) if (required == null) { throw new InvalidDataException("required is a required property for ProductModifierBase and cannot be null"); } else { this.Required = required; } // to ensure "type" is required (not null) if (type == null) { throw new InvalidDataException("type is a required property for ProductModifierBase and cannot be null"); } else { this.Type = type; } this.Config = config; this.DisplayName = displayName; this.SortOrder = sortOrder; }