Promotions and Vouchers

Promotions


PromotionResponse

Declared In

SNRPromotionResponse.h

PromotionResponseMetadata Promotion

Inherits From

BaseModel

Declaration

class PromotionResponse: BaseModel

Properties

Property Type Optional Description
metadata PromotionResponseMetadata yes Metadata of the promotion response
items [Promotion] no List of promotion items
Important: All properties are read-only.


PromotionResponseMetadata

Declared In

SNRPromotionResponseMetadata.h

PromotionResponse

Inherits From

BaseModel

Declaration

class PromotionResponseMetadata: BaseModel

Properties

Property Type Optional Description
totalCount Int no Total count of promotions
totalPages Int no Total count of pages
page Int no Current page
limit Int no Limit of promotions per page
code Int no HTTP code of the response
Important: All properties are read-only.


Promotion

Declared In

SNRPromotion.h

PromotionResponse
PromotionStatus
PromotionType PromotionDiscountType

Inherits From

BaseModel

Declaration

class Promotion: BaseModel

Properties

Property Type Optional Description
uuid String no Promotion’s UUID
code String no Promotion’s code
status PromotionStatus no Promotion’s status
type PromotionType no Promotion’s type
details PromotionDetails yes Promotion’s details
redeemLimitPerClient NSNumber yes Redemption limit per client
redeemQuantityPerActivation NSNumber yes Redemption quantity per activation
currentRedeemedQuantity NSNumber no Current redemption quantity
currentRedeemLimit NSNumber no Current redemption limit
activationCounter NSNumber no Promotion’s activation counter
possibleRedeems NSNumber no Maximum number of promotion redemptions
requireRedeemedPoints NSNumber yes Required redeemed points
discountType PromotionDiscountType no Discount type
discountValue NSNumber no Discount value
discountMode PromotionDiscountMode no Discount mode
discountModeDetails PromotionDiscountModeDetails yes Discount mode details
priority NSNumber no Promotion’s priority
price NSNumber no Item price
itemScope PromotionItemScope no Promotion’s item scope
minBasketValue NSNumber yes Minimum basket value
maxBasketValue NSNumber yes Maximum basket value
name String no Promotion’s name
headline String yes Promotion’s headline
descriptionText String yes Promotion’s description
images [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 NSNumber 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 [String] yes List of item indexes
params [AnyHashable: Any] yes Promotion’s custom parameters
tags [AnyObject] yes Promotion’s custom tags
Important: All properties are read-only.


PromotionIdentifier

Declared In

SNRPromotionIdentifier.h

Inherits From

BaseModel

Declaration

class PromotionIdentifier: BaseModel

Initializers

init(uuid: String)
init(code: String)


PromotionStatus

Declared In

SNRPromotionStatus.h

Promotion

Declaration

enum PromotionStatus: Int {
	none,
	active,
	assigned,
	redeemed
}

Functions

Converts from PromotionStatus to String.

func SNR_PromotionStatusToString(_: PromotionStatus) -> String


Converts from String to PromotionStatus.

func SNR_StringToPromotionStatus(_: String) -> PromotionStatus

Note

The following string constants can be used in PromotionsApiQuery object:

  • SNR_PROMOTION_STATUS_NONE
  • SNR_PROMOTION_STATUS_ACTIVE
  • SNR_PROMOTION_STATUS_ASSIGNED
  • SNR_PROMOTION_STATUS_REDEEMED


PromotionType

Declared In

SNRPromotionType.h

Promotion

Declaration

enum PromotionType: Int {
	unknown,
	membersOnly,
	custom,
	general,
	handbill
}

Functions

Converts from PromotionType to String.

func SNR_PromotionTypeToString(_: PromotionType) -> String


Converts from String to PromotionType.

func SNR_StringToPromotionType(_: String) -> PromotionType

Note

The following string constants can be used in PromotionsApiQuery object:

  • SNR_PROMOTION_TYPE_UNKNOWN
  • SNR_PROMOTION_TYPE_MEMBERS_ONLY
  • SNR_PROMOTION_TYPE_CUSTOM
  • SNR_PROMOTION_TYPE_GENERAL


PromotionItemScope

Declared In

SNRPromotionItemScope.h

Promotion

Declaration

enum PromotionItemScope: Int {
	lineItem,
	basket
}

Functions

Converts from PromotionItemScope to String.

func SNR_PromotionItemScopeToString(_: PromotionItemScope) -> String


Converts from String to PromotionItemScope.

func SNR_StringToPromotionItemScope(_: String) -> PromotionItemScope



PromotionDetails

Declared In

SNRPromotionDetails.h

Promotion
PromotionDiscountTypeDetails

Inherits From

BaseModel

Declaration

class PromotionDetails: BaseModel

Properties

Property Type Optional Description
discountType PromotionDiscountTypeDetails no Discount details
Important: All properties are read-only.


PromotionDiscountTypeDetails

Declared In

SNRPromotionDiscountTypeDetails.h

PromotionDetails

Inherits From

BaseModel

Declaration

class PromotionDiscountTypeDetails: BaseModel

Properties

Property Type Optional Description
name String no Discount’s name
outerScope Bool no Outer scope
requiredItemsCount Int no Number of required items to meet the discount
discountedItemsCount Int no Number of discounted items
Important: All properties are read-only.


PromotionDiscountMode

Declared In

SNRPromotionDiscountType.h

Promotion

Declaration

enum PromotionDiscountMode: Int {
	static,
	step
}

Functions

Converts from PromotionDiscountMode to String.

func SNR_PromotionDiscountModeToString(_: PromotionDiscountMode) -> String


Converts from String to PromotionDiscountMode.

func SNR_StringToPromotionDiscountMode(_: String) -> PromotionDiscountMode



PromotionDiscountModeDetails

Declared In

SNRPromotionDiscountModeDetails.h

Promotion
PromotionDiscountStep

Inherits From

BaseModel

Declaration

class PromotionDiscountModeDetails: BaseModel

Properties

Property Type Optional Description
discountSteps [SNRPromotionDiscountStep] no List of discount steps
discountUsageTrigger PromotionDiscountUsageTrigger no Usage trigger for discount
Important: All properties are read-only.


PromotionDiscountStep

Declared In

SNRPromotionDiscountStep.h

PromotionDiscountModeDetails

Inherits From

BaseModel

Declaration

class PromotionDiscountStep: BaseModel

Properties

Property Type Optional Description
discountValue NSNumber no Value of discount
usageThreshold [NSNumber] no Usage threshold
Important: All properties are read-only.


PromotionDiscountUsageTrigger

Declared In

SNRPromotionDiscountUsageTrigger.h

PromotionDiscountModeDetails

Declaration

enum PromotionDiscountUsageTrigger: Int {
	transaction,
	redeem
}

Functions

Converts from PromotionDiscountUsageTrigger to String.

func SNR_PromotionDiscountUsageTriggerToString(_: PromotionDiscountUsageTrigger) -> String


Converts from String to PromotionDiscountUsageTrigger.

func SNR_StringToPromotionDiscountUsageTrigger(_: String) -> PromotionDiscountUsageTrigger



PromotionImage

Declared In

SNRPromotion.h

Promotion
PromotionImageType

Inherits From

BaseModel

Declaration

class PromotionImage: BaseModel

Properties

Property Type Optional Description
url String no Image’s URL
type PromotionImageType no Image type
Important: All properties are read-only.


PromotionImageType

Declared In

SNRPromotionImageType.h

Promotion

Declaration

enum PromotionImageType: Int {
	image,
	thumbnail
}

Functions

Converts from PromotionImageType to String.

func SNR_PromotionImageTypeToString(_: PromotionImageType) -> String


Converts from String to PromotionImageType.

func SNR_StringToPromotionImageType(_: String) -> PromotionImageType



PromotionDiscountType

Declared In

SNRPromotionDiscountType.h

Promotion

Declaration

enum PromotionDiscountType: Int {
	none,
	percent,
	amount,
	2For1,
	points,
	multibuy,
	exactPrice
}

Functions

Converts from PromotionDiscountType to String.

func SNR_PromotionDiscountTypeToString(_: PromotionDiscountType) -> String


Converts from String to PromotionDiscountType.

func SNR_StringToPromotionDiscountType(_: 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()


Vouchers


AssignVoucherResponse

Declared In

SNRAssignVoucherResponse.h

AssignVoucherData

Inherits From

BaseModel

Declaration

class AssignVoucherResponse: BaseModel

Properties

Property Type Optional Description
message String no Message from Voucher assignment response
assignVoucherData AssignVoucherData yes List of voucher data items
Important: All properties are read-only.


VoucherCodesResponse

Declared In

SNRVoucherCodesResponse.h

SNRVoucherCodesData

Inherits From

BaseModel

Declaration

class VoucherCodesResponse: BaseModel

Properties

Property Type Optional Description
items [VoucherCodesData] no List of voucher items
Important: All properties are read-only.


AssignVoucherData

Declared In

SNRAssignVoucherData.h

AssignVoucherResponse

Inherits From

BaseModel

Declaration

class AssignVoucherData: 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
Important: All properties are read-only.


VoucherCodesData

Declared In

SNRVoucherCodesData.h

Inherits From

BaseModel

Declaration

class VoucherCodesData: BaseModel

Properties

Property Type Optional Description
code String no Voucher’s code
status VoucherStatus 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 Date 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
Important: All properties are read-only.


VoucherStatus

Declared In

SNRVoucherStatus.h

Declaration

enum VoucherStatus: Int {
	unassigned,
	assigned,
	redeemed,
	canceled
}

Functions

Converts from VoucherStatus to String.

func SNR_VoucherStatusToString(_: VoucherStatus) -> String


Converts from String to VoucherStatus.

func SNR_StringToVoucherStatus(_: String) -> VoucherStatus

😕

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