Class MarketingConsentSubscription
Represents a marketing consent subscription for a shopper.
A marketing consent subscription defines a communication preference category (e.g., “Newsletter”, “Product Updates”) with associated channels (EMAIL, SMS, WHATSAPP) through which the shopper can receive marketing communications.
Example usage:
| Property | Description |
|---|---|
channels: String[] (read-only) | Returns the available channels for this subscription. |
consentRequired: Boolean (read-only) | Returns whether consent is required for this subscription. |
consentStatus: Collection (read-only) | Returns the consent status entries for this subscription. |
consentType: String (read-only) | Returns the consent type for this subscription. |
defaultStatus: String (read-only) | Returns the default consent status for this subscription. |
subscriptionId: String (read-only) | Returns the unique identifier for this subscription. |
subtitle: String (read-only) | Returns the localized subtitle of this subscription. |
tags: String[] (read-only) | Returns the tags associated with this subscription. |
title: String (read-only) | Returns the localized title of this subscription. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| getChannels() | Returns the available channels for this subscription. |
| getConsentRequired() | Returns whether consent is required for this subscription. |
| getConsentStatus() | Returns the consent status entries for this subscription. |
| getConsentType() | Returns the consent type for this subscription. |
| getDefaultStatus() | Returns the default consent status for this subscription. |
| getSubscriptionId() | Returns the unique identifier for this subscription. |
| getSubtitle() | Returns the localized subtitle of this subscription. |
| getTags() | Returns the tags associated with this subscription. |
| getTitle() | Returns the localized title of this subscription. |
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
- channels: String[]
(read-only) Returns the available channels for this subscription.
Channels represent the communication methods (EMAIL, SMS, WHATSAPP) available for this subscription.
- consentRequired: Boolean
(read-only) Returns whether consent is required for this subscription.
- consentStatus: Collection
(read-only) Returns the consent status entries for this subscription.
This is only populated when the 'includeConsentStatus' parameter is true in the getSubscriptions call, and the customer is authenticated.
- consentType: String
(read-only) Returns the consent type for this subscription.
- defaultStatus: String
(read-only) Returns the default consent status for this subscription.
- subscriptionId: String
(read-only) Returns the unique identifier for this subscription.
- subtitle: String
(read-only) Returns the localized subtitle of this subscription.
- tags: String[]
(read-only) Returns the tags associated with this subscription.
Tags can be used to categorize and filter subscriptions.
- title: String
(read-only) Returns the localized title of this subscription.
- getChannels(): String[]
Returns the available channels for this subscription.
Channels represent the communication methods (EMAIL, SMS, WHATSAPP) available for this subscription.
Returns:
- A list of channel strings (lowercase).
- getConsentRequired(): Boolean
Returns whether consent is required for this subscription.
Returns:
- True if consent is required, false otherwise.
- getConsentStatus(): Collection
Returns the consent status entries for this subscription.
This is only populated when the 'includeConsentStatus' parameter is true in the getSubscriptions call, and the customer is authenticated.
Returns:
- A collection of ConsentStatusEntry objects, or null if not requested.
- getConsentType(): String
Returns the consent type for this subscription.
Returns:
- The consent type (e.g., "SINGLE_OPT_IN", "DOUBLE_OPT_IN").
- getDefaultStatus(): String
Returns the default consent status for this subscription.
Returns:
- The default status (e.g., "OPT_IN", "OPT_OUT").
- getSubscriptionId(): String
Returns the unique identifier for this subscription.
Returns:
- The subscription ID.
- getSubtitle(): String
Returns the localized subtitle of this subscription.
Returns:
- The subscription subtitle.
- getTags(): String[]
Returns the tags associated with this subscription.
Tags can be used to categorize and filter subscriptions.
Returns:
- A list of tag strings.
- getTitle(): String
Returns the localized title of this subscription.
Returns:
- The subscription title.