getRecommendedOffers

The getRecommendedOffers method returns an array of Offer objects requested by the getOffers method.

getRecommendedOffers()

If the response to getRecommendedOffer is empty, the touchpoint should present the result of getDefaultString.

Return value

The getRecommendedOffers method returns an Offer object.

Example

The following example processes the OfferList object, and prints the offer name for all the recommended offers.

OfferList offerList=response.getOfferList();
if(offerList.getRecommendedOffers() != null)
{
    for(Offer offer : offerList.getRecommendedOffers())
    {
        // print offer
        System.out.println("Offer Name:"+offer.getOfferName());
    }
}
else // count on the default Offer String
System.out.println("Default offer:"+offerList.getDefaultString());