Promotions and Vouchers

Promotions


PromotionResponse

Declared In

lib/classes/models/Promotions/PromotionResponse.js

Promotion

Inherits From

BaseModel

Declaration

class PromotionResponse extends BaseModel

Properties

Property Type Optional Description
totalCount number no Total count of promotions
totalPages number no Total count of pages
page number no Current page
limit number no Limit of promotions per page
code number no HTTP code of the response
items Array<Promotion> no List of promotion items


Promotion

Declared In

lib/classes/models/Promotions/Promotion.js

PromotionResponse
PromotionStatus
PromotionType PromotionDiscountType

Inherits From

BaseModel

Declaration

class Promotion extends BaseModel

Properties

Property Type Optional Description
uuid string no Promotion’s UUID
code string no Promotion’s code
status PromotionStatus yes Promotion’s status
type PromotionType yes Promotion’s type
details PromotionDetails yes Promotion’s details
redeemLimitPerClient number yes Redemption limit per client
redeemQuantityPerActivation number yes Redemption quantity per activation
currentRedeemedQuantity number no Current redemption quantity
currentRedeemLimit number no Current redemption limit
activationCounter number no Promotion’s activation counter
possibleRedeems number no Maximum number of promotion redemptions
requireRedeemedPoints number yes Required redeemed points
discountType PromotionDiscountType yes Discount type
discountValue number no Discount value
discountMode PromotionDiscountMode no Discount mode
discountModeDetails PromotionDiscountModeDetails yes Discount mode details
priority number no Promotion’s priority
price number no Item price
itemScope PromotionItemScope no Promotion’s item scope
minBasketValue number yes Minimum basket value
maxBasketValue number yes Maximum basket value
name string no Promotion’s name
headline string yes Promotion’s headline
descriptionText string yes Promotion’s description
images [Array<PromotionImage> yes List of promotion images
startAt Date yes Start time of a promotion
expireAt Date yes Expiration time of the promotion
lastingAt Date yes How long the promotion lasts
lastingTime number yes Duration of the promotion in seconds
displayFrom string yes Date as string when the promotion starts being displayed
displayTo string yes Date as string when the promotions ends being displayed
catalogIndexItems Array<string> yes List of item indexes
params object yes Promotion’s custom parameters
tags Array<object> yes Promotion’s custom tags


PromotionIdentifier

Declared In

lib/classes/models/Promotions/PromotionIdentifier.js

Declaration

class PromotionIdentifier {
  key: string;
  value: string;
}

Properties

Property Type Optional Default Description
key string yes Promotion identifier type (see PromotionIdentifierKey enum)
value string yes Promotion identifier value

Initializers

constructor(key: PromotionIdentifierKey, value: string)


PromotionStatus

Declared In

lib/classes/models/Promotions/PromotionStatus.js

Promotion

Declaration

enum PromotionStatus {
  None = 'NONE',
  Active = 'ACTIVE',
  Assigned = 'ASSIGNED',
  Redeemed = 'REDEEMED',
}

Functions

Converts from PromotionStatus to string.

function PromotionStatusToString(promotionStatus: PromotionStatus): string


Converts from string to PromotionStatus.

function PromotionStatusFromString(string: string): PromotionStatus



PromotionType

Declared In

lib/classes/models/Promotions/PromotionType.js

Promotion

Declaration

enum PromotionType {
  Unknown = 'UNKNOWN',
  MembersOnly = 'MEMBERS_ONLY',
  Custom = 'CUSTOM',
  General = 'GENERAL',
}

Functions

Converts from PromotionType to string.

function PromotionTypeToString(promotionType: PromotionType): string


Converts from string to PromotionType.

function PromotionTypeFromString(string: string): PromotionType



PromotionDiscountType

Declared In

lib/classes/models/Promotions/PromotionDiscountType.js

Promotion

Declaration

enum PromotionDiscountType {
  None = 'NONE',
  Percent = 'PERCENT',
  Amount = 'AMOUNT',
  TwoForOne = '2_FOR_1',
  Points = 'POINTS',
  Multibuy = 'MULTIBUY',
}

Functions

Converts from PromotionDiscountType to string.

function PromotionDiscountTypeToString(promotionDiscountType: PromotionDiscountType): string


Converts from string to PromotionDiscountType.

function PromotionDiscountTypeFromString(string: string): PromotionDiscountType



PromotionsApiQuery

The object to set parameters easily for fetching promotions from API.

Declared In

SNRPromotionsApiQuery.h

PromotionResponse
Promotion

Inherits From

NSObject

Declaration

class PromotionsApiQuery: NSObject

Properties

Property Type Optional Default Description
statuses [SNRPromotionStatusString] no [] List of promotion statuses for query
types [SNRPromotionTypeString] no [] List of promotion types for query
sorting [[SNRPromotionSortingKey: SNRApiQuerySortingOrderString]] yes [] Specifies sorting rules for items in the response
limit Int no 100 Limit of items per page in the response
page Int no 1 Page number
includeMeta Bool no false Specifies if meta data should be included in the response
Note:

Initializers

init()


PromotionIdentifierKey

Declared In

lib/classes/models/Promotions/PromotionIdentifierKey.js

Declaration

enum PromotionIdentifierKey {
  Uuid = 'UUID',
  Code = 'CODE',
}


Vouchers


AssignVoucherResponse

Declared In

lib/classes/models/Vouchers/AssignVoucherResponse.js

AssignVoucherData

Inherits From

BaseModel

Declaration

class AssignVoucherResponse extends BaseModel

Properties

Property Type Optional Description
message string no Message from Voucher assignment response
assignVoucherData AssignVoucherData yes List of voucher data items


VoucherCodesResponse

Declared In

lib/classes/models/Vouchers/VoucherCodesResponse.js

VoucherCodesData

Inherits From

BaseModel

Declaration

class VoucherCodesResponse extends BaseModel

Properties

Property Type Optional Description
items [VoucherCodesData] no List of voucher items


AssignVoucherData

Declared In

lib/classes/models/Vouchers/AssignVoucherData.js

AssignVoucherResponse

Inherits From

BaseModel

Declaration

class AssignVoucherData extends BaseModel

Properties

Property Type Optional Description
code string no Voucher’s code
expireIn Date yes Voucher’s expiration date
redeemAt Date yes Voucher’s redeem date
assignedAt Date yes Voucher’s assignment date
createdAt Date no Voucher’s creation date
updatedAt Date no Voucher’s update date


VoucherCodesData

Declared In

lib/classes/models/Vouchers/VoucherCodesData.js

Inherits From

BaseModel

Declaration

class VoucherCodesData extends BaseModel

Properties

Property Type Optional Description
code string no Voucher’s code
status VoucherCodeStatus no Voucher’s status
clientId string no Voucher’s client ID
clientUuid string no Voucher’s client UUID
poolUuid string no Voucher’s pool ID
expireIn string no Voucher’s expiration date
redeemAt Date no Voucher’s redemption date
assignedAt Date no Voucher’s assignment date
createdAt Date no Voucher’s creation date
updatedAt Date no Voucher’s update date


VoucherCodeStatus

Declared In

lib/classes/models/Vouchers/VoucherCodeStatus.js

Declaration

enum VoucherCodeStatus {
  Unassigned = 'UNASSIGNED',
  Assigned = 'ASSIGNED',
  Redeemed = 'REDEEMED',
  Canceled = 'CANCELED',
}

Functions

Converts from VoucherCodeStatus to string.

function VoucherCodeStatusToString(voucherCodeStatus: VoucherCodeStatus): string


Converts from string to VoucherCodeStatus.

function VoucherCodeStatusFromString(string: string): VoucherCodeStatus

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker