Click or drag to resize

LoyaltyCampaignOfferClientSelectCampaignOfferList Method

Syntax
C#
public ResultOfPagedCollectionOfCampaignOffer SelectCampaignOfferList(
	ManagementGroupRequestOfCampaignOfferSearch request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfCampaignOfferSearch

Return Value

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

  var search = new LoyaltyService.CampaignOfferSearch();
  search.PageNumber = 1;//Optional - defaults to 1 if not supplied
  search.PageSize = 100;//Optional - default to 100 if not supplied
  search.Category = "Bags";//Optional
  search.Location = "";//Optional
  search.OfferCode = "OFFER_BAGS10";//Optional
  search.PartnerRSN = new Guid("bc95a426-5c67-4f4f-aea3-7219d5a260fb");;//Optional - RSN of partner
  search.Active = true;//Optional - true: active only. false: inactive only. null: both active and inactive
  search.OfferName = "10% off all bags";//Optional
  search.Visible = null;//Optional - true: visible only. false: not visible only. null: both visible and not visible

  //add search to request
  request.Value = search;

  LoyaltyService.ResultOfPagedCollectionOfCampaignOffer result = svc.SelectCampaignOfferList(request);

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