SDK Example: Get List of Promotions or Promotions associated with a Product (Winter '20)

Use the example SDK code in this topic to retrieve all promotions or promotions that are associated with a product.

Possible error conditions:

"GetCatalogOffersInput::getAPIPath() must have catalogCode."

"GetCatalogOffersInput::getAnonymousRestUrl() must have anonymousSiteUrl."

"GetCatalogOffersContainsInput::getAPIPath() should not have both sortBy and contains.

"GetCatalogOffersContainsInput::getAnonymousRestUrl() should not have both sortBy and contains."