コード例 #1
0
 /// <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 &#x60;option_value&#x60;..</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: &#x60;radio_buttons&#x60;, &#x60;rectangles&#x60;, &#x60;dropdown&#x60;, &#x60;product_list&#x60;, &#x60;product_list_with_images&#x60;, &#x60;swatch&#x60;. For reference, the former v2 API values are: RB &#x3D; radio_buttons, RT &#x3D; rectangles, S &#x3D; dropdown, P &#x3D; product_list, PI &#x3D; product_list_with_images, CS &#x3D; 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;
 }
コード例 #2
0
 /// <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: &#x60;date&#x60;, &#x60;checkbox&#x60;, &#x60;file&#x60;, &#x60;text&#x60;, &#x60;multi_line_text&#x60;, &#x60;numbers_only_text&#x60;, &#x60;radio_buttons&#x60;, &#x60;rectangles&#x60;, &#x60;dropdown&#x60;, &#x60;product_list&#x60;, &#x60;product_list_with_images&#x60;, &#x60;swatch&#x60;. 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;
 }