Class: subscriptions

subscriptions(domainOrOptionsopt)

new subscriptions(domainOrOptionsopt)

Parameters:
Name Type Attributes Description
domainOrOptions string | object <optional>
The project domain or options object. If object, see the object's optional properties.
Properties
Name Type Attributes Description
domain string <optional>
The project domain
token object <optional>
auth token - object with value property and optional headerOrQueryName and isQuery properties
Source:

Methods

cancel(xShopperId, subscriptionId)

Cancel the specified Subscription
Parameters:
Name Type Description
xShopperId string Shopper ID to cancel subscriptions for when not using JWT
subscriptionId string Unique identifier of the Subscription to cancel
Source:

get(xShopperId, xMarketId, subscriptionId)

Retrieve details for the specified Subscription
Parameters:
Name Type Description
xShopperId string Shopper ID to be operated on, if different from JWT
xMarketId string Unique identifier of the Market in which the request is happening
subscriptionId string Unique identifier of the Subscription to retrieve
Source:

list(xShopperId, xMarketId, productGroupKeys, includes, offset, limit, sort)

Retrieve a list of Subscriptions for the specified Shopper
Parameters:
Name Type Description
xShopperId string Shopper ID to return subscriptions for when not using JWT
xMarketId string The market that the response should be formatted for
productGroupKeys array Only return Subscriptions with the specified product groups
includes array Optional details to be included in the response
offset integer Number of Subscriptions to skip before starting to return paged results (must be a multiple of the limit)
limit integer Number of Subscriptions to retrieve in this page, starting after offset
sort string Property name that will be used to sort results. "-" indicates descending
Source:

productGroups(xShopperId, xMarketId)

Retrieve a list of ProductGroups for the specified Shopper
Parameters:
Name Type Description
xShopperId string Shopper ID to return data for when not using JWT
xMarketId string The market that the response should be formatted for
Source:

setToken(value, headerOrQueryName, isQuery)

Set Token
Parameters:
Name Type Description
value string token's value
headerOrQueryName string the header or query name to send the token at
isQuery boolean true if send the token as query param, otherwise, send as header param
Source:

update(subscriptionId, subscription)

Update details for the specified Subscription
Parameters:
Name Type Description
subscriptionId string Unique identifier of the Subscription to update
subscription SubscriptionUpdate Details of the Subscription to change
Source: