示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Category1" /> class.
 /// </summary>
 /// <param name="customUrl">customUrl.</param>
 /// <param name="defaultProductSort">Determines how the products are sorted on category page load. .</param>
 /// <param name="description">The product description, which can include HTML formatting. .</param>
 /// <param name="id">Unique ID of the *Category*. Increments sequentially. Read-Only..</param>
 /// <param name="imageUrl">Image URL used for this category on the storefront. Images can be uploaded via form file post to &#x60;/categories/{categoryId}/image&#x60;, or by providing a publicly accessible URL in this field. .</param>
 /// <param name="isVisible">Flag to determine whether the product should be displayed to customers browsing the store. If &#x60;true&#x60;, the category will be displayed. If &#x60;false&#x60;, the category will be hidden from view. .</param>
 /// <param name="layoutFile">A valid layout file. (Please refer to [this article](https://support.bigcommerce.com/articles/Public/Creating-Custom-Template-Files/) on creating category files.) This field is writable only for stores with a Blueprint theme applied. .</param>
 /// <param name="metaDescription">Custom meta description for the category page. If not defined, the store&#x27;s default meta description will be used. .</param>
 /// <param name="metaKeywords">Custom meta keywords for the category page. If not defined, the store&#x27;s default keywords will be used. Must post as an array like: [\&quot;awesome\&quot;,\&quot;sauce\&quot;]. .</param>
 /// <param name="name">The name displayed for the category. Name is unique with respect to the category&#x27;s siblings. Required in a POST. (required).</param>
 /// <param name="pageTitle">Custom title for the category page. If not defined, the category name will be used as the meta title. .</param>
 /// <param name="parentId">The unique numeric ID of the category&#x27;s parent. This field controls where the category sits in the tree of categories that organize the catalog. Required in a POST if creating a child category. (required).</param>
 /// <param name="searchKeywords">A comma-separated list of keywords that can be used to locate the category when searching the store. .</param>
 /// <param name="sortOrder">Priority this category will be given when included in the menu and category pages. The lower the number, the closer to the top of the results the category will be. .</param>
 /// <param name="views">Number of views the category has on the storefront. .</param>
 public Category1(CustomUrlCategory customUrl = default(CustomUrlCategory), DefaultProductSortEnum?defaultProductSort = default(DefaultProductSortEnum?), string description = default(string), int?id = default(int?), string imageUrl = default(string), bool?isVisible = default(bool?), string layoutFile = default(string), string metaDescription = default(string), List <string> metaKeywords = default(List <string>), string name = default(string), string pageTitle = default(string), int?parentId = default(int?), string searchKeywords = default(string), int?sortOrder = default(int?), int?views = default(int?))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for Category1 and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "parentId" is required (not null)
     if (parentId == null)
     {
         throw new InvalidDataException("parentId is a required property for Category1 and cannot be null");
     }
     else
     {
         this.ParentId = parentId;
     }
     this.CustomUrl          = customUrl;
     this.DefaultProductSort = defaultProductSort;
     this.Description        = description;
     this.Id              = id;
     this.ImageUrl        = imageUrl;
     this.IsVisible       = isVisible;
     this.LayoutFile      = layoutFile;
     this.MetaDescription = metaDescription;
     this.MetaKeywords    = metaKeywords;
     this.PageTitle       = pageTitle;
     this.SearchKeywords  = searchKeywords;
     this.SortOrder       = sortOrder;
     this.Views           = views;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BrandFull1" /> class.
 /// </summary>
 /// <param name="customUrl">customUrl.</param>
 /// <param name="id">Unique ID of the *Brand*. Read-Only..</param>
 /// <param name="imageUrl">Image URL used for this category on the storefront. Images can be uploaded via form file post to &#x60;/brands/{brandId}/image&#x60;, or by providing a publicly accessible URL in this field. .</param>
 /// <param name="metaDescription">A meta description to include. .</param>
 /// <param name="metaKeywords">Comma-separated list of meta keywords to include in the HTML. .</param>
 /// <param name="name">The name of the brand. Must be unique. Required in POST. (required).</param>
 /// <param name="pageTitle">The title shown in the browser while viewing the brand. .</param>
 /// <param name="searchKeywords">A comma-separated list of keywords that can be used to locate this brand. .</param>
 public BrandFull1(CustomUrlCategory customUrl = default(CustomUrlCategory), int?id = default(int?), string imageUrl = default(string), string metaDescription = default(string), List <string> metaKeywords = default(List <string>), string name = default(string), string pageTitle = default(string), string searchKeywords = default(string))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for BrandFull1 and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     this.CustomUrl       = customUrl;
     this.Id              = id;
     this.ImageUrl        = imageUrl;
     this.MetaDescription = metaDescription;
     this.MetaKeywords    = metaKeywords;
     this.PageTitle       = pageTitle;
     this.SearchKeywords  = searchKeywords;
 }