Click or drag to resize

LoyaltyProductClientInsertProductGalleryImage Method

Syntax
C#
public Result InsertProductGalleryImage(
	ManagementGroupRequestOfGalleryImage request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfGalleryImage

Return Value

Type: Result
Examples
C#
using (var svc = new LoyaltyService.LoyaltyProductClient())
{
  var request = new LoyaltyService.ManagementGroupRequestOfGalleryImage();
  request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin
  request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin

  var image = new LoyaltyService.GalleryImage();
  image.RSN = Guid.NewGuid();//Optional - Will be generated if not supplied
  image.DisplayValue = "red_bag.jpg";//Required
  image.Entity_RSN = Guid.NewGuid();//Required - RSN of product
  image.PrimaryImage_RSN = new Guid("8f627427-a431-42ba-9b05-6567923e4b68");;//Required
  image.SourceImage_RSN = new Guid("66e57486-c335-46c9-acd9-6b1a58be3504");;//Required
  image.ThumbnailImage_RSN = new Guid("9df05b29-9a32-4113-8181-8bc81a1ddd5f");;//Required
  image.FeaturedImage = false; //Optional
  image.DisplayOrder = 1;//Optional

  request.Value = image;//Required

  LoyaltyService.Result result = svc.InsertProductGalleryImage(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also