Gift cards service provider

Version: 10.3

Service providers are wrapper objects designed to make it easier to interact with Connect pipelines. The providers implement no logic other than calling Connect pipelines. All of the business logic is implemented in the pipeline processors.

For each method in the provider there is a corresponding Request and Result object used, for example, the GetCarts method takes a GetCartsRequest object and returns a GetCartsResult object. In some cases, the response objects are re-used when returning the same data.

Customized versions of the default request and result arguments can be used by calling the overloaded generics based versions of the methods.

The Gift card provider contains the following method for interacting with gift card data.

GetGiftCard method

The GetGiftCard method is used to query the external commerce system to get details for a specific gift card.

Name:

GetGiftCard

Description:

Gets the gift card that matches the specified criteria. Calls the commerce.giftCards.getGiftCard pipeline

Usage:

Called when full details of a gift card are required.

Examples include:

  • Checking the gift card balance.

Signature:

GetGiftCardResult GetGiftCard([NotNull]GetGiftCardRequest request)

Input:

GiftCardId - The IDs of the gift card to request.

ShopName – Name of shop to search for the gift card in.

Output:

GiftCard A single gift card entity representing the requested card.

SystemMessages - Collection of messages from the external system.

Usage example:

RequestResponse
var provider = new GiftCardServiceProvider();
var request = new GetGiftCardRequest("1", "StarterKit");
var result = provider.GetGiftCard(request);
var card = result.GiftCard;

Do you have some feedback for us?

If you have suggestions for improving this article,