/// <summary>
 /// Adds a new Product Family
 /// </summary>
 /// <param name="newProductFamily"> A ProductFamilyRequest object containing the data for the Product Family to be created </param>
 /// <param name="format"> The format used for the data transfer (XML or JSON) </param>
 /// <returns> A ProductFamilyResponse object corresponding to the newly-added ProductFamily record </returns>
 public ProductFamilyResponse AddProductFamily(ProductFamilyRequest newProductFamily, string format = ContentFormat.XML)
 {
     return _service.Post<ProductFamilyRequest, ProductFamilyResponse>(string.Format("{0}/{1}", _gatewayURL, format), newProductFamily);
 }
 /// <summary>
 /// Updates a Product Family
 /// </summary>
 /// <param name="updatedFamily"> A ProductFamilyRequest object containing the updated Product Family record </param>
 /// <param name="productFamilyId"> The Id of the Product Family to be updated </param>
 /// <param name="format"> The format used for the data transfer (XML or JSON) </param>
 /// <returns> A ProductFamilyResponse object corresponding to the updated ProductFamily record </returns>
 public ProductFamilyResponse UpdateProductFamily(ProductFamilyRequest updatedFamily, string productFamilyId, string format = ContentFormat.XML)
 {
     return _service.Put<ProductFamilyRequest, ProductFamilyResponse>(string.Format("{0}/{1}.{2}", _gatewayURL, productFamilyId, format), updatedFamily);
 }
Ejemplo n.º 3
0
 public ProductFamilyResponse AddProductFamily(int siteId)
 {
     var prodFamily = new ProductFamilyRequest
     {
         SiteId = siteId,
         Name = "StarterKit v1.0 " + Guid.NewGuid().ToString("N"),
         Description = "Description",
     };
     return _gateway.ProductFamilies.AddProductFamily(prodFamily);
 }