Promotions and Vouchers

Promotions


PromotionResponse

Declared In:
Headers/SNRPromotionResponse.h

Related To:
PromotionResponseMetadata
Promotion

Inherits From:
BaseModel

Declaration:

class PromotionResponse: BaseModel
@interface SNRPromotionResponse : SNRBaseModel

Properties:

Property Type Optional Description
metadata PromotionResponseMetadata yes Metadata of the promotion response
items [Promotion] no List of promotion items

All properties are read-only.



PromotionResponseMetadata

Declared In:
Headers/SNRPromotionResponseMetadata.h

Related To:
PromotionResponse

Inherits From:
BaseModel

Declaration:

class PromotionResponseMetadata: BaseModel
@interface SNRPromotionResponseMetadata : SNRBaseModel

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

All properties are read-only.



Promotion

Declared In:
Headers/SNRPromotion.h

Related To:
PromotionResponse
PromotionStatus
PromotionType
PromotionDetails
PromotionItemScope PromotionDiscountType
PromotionDiscountMode
PromotionDiscountModeDetails
PromotionImage

Inherits From:
BaseModel

Declaration:

class Promotion: BaseModel
@interface SNRPromotion : SNRBaseModel

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 customer
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 Date when the promotion expires for the current profile
lastingTime NSNumber yes Duration of the promotion in seconds
displayFrom String yes Date as a string when the promotion starts being displayed
displayTo String yes Date as a 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

All properties are read-only.



PromotionStatus

Declared In:
Headers/SNRPromotionStatus.h

Related To:
Promotion

Declaration:

enum PromotionStatus: Int {
    none,
    active,
    assigned,
    redeemed
}
typedef NS_ENUM(NSUInteger, SNRPromotionStatus) {
    SNRPromotionStatusNone = 0,
    SNRPromotionStatusActive,
    SNRPromotionStatusAssigned,
    SNRPromotionStatusRedeemed
}

Functions: Converts from PromotionStatus to String.

func SNR_PromotionStatusToString(_: PromotionStatus) -> String
NSString * SNR_PromotionStatusToString(SNRPromotionStatus type)

Converts from String to PromotionStatus.

func SNR_StringToPromotionStatus(_: String) -> PromotionStatus
SNRPromotionStatus SNR_StringToPromotionStatus(NSString * _Nullable string)

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:
Headers/SNRPromotionType.h

Related To:
Promotion

Declaration:

enum PromotionType: Int {
    unknown,
    membersOnly,
    custom,
    general,
    handbill
}
typedef NS_ENUM(NSUInteger, SNRPromotionType) {
    SNRPromotionTypeUnknown = 0,
    SNRPromotionTypeMembersOnly,
    SNRPromotionTypeCustom,
    SNRPromotionTypeGeneral,
    SNRPromotionTypeHandbill
}

Functions: Converts from PromotionType to String.

func SNR_PromotionTypeToString(_: PromotionType) -> String
NSString * SNR_PromotionTypeToString(SNRPromotionType type)

Converts from String to PromotionType.

func SNR_StringToPromotionType(_: String) -> PromotionType
SNRPromotionType SNR_StringToPromotionType(NSString * _Nullable string)

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:
Headers/SNRPromotionItemScope.h

Related To:
Promotion

Declaration:

enum PromotionItemScope: Int {
    lineItem,
    basket
}
typedef NS_ENUM(NSUInteger, SNRPromotionItemScope) {
    SNRPromotionItemScopeLineItem = 0,
    SNRPromotionItemScopeBasket
}

Functions: Converts from PromotionItemScope to String.

func SNR_PromotionItemScopeToString(_: PromotionItemScope) -> String
NSString * SNR_PromotionItemScopeToString(SNRPromotionItemScope scope)

Converts from String to PromotionItemScope.

func SNR_StringToPromotionItemScope(_: String) -> PromotionItemScope
SNRPromotionItemScope SNR_StringToPromotionItemScope(NSString * _Nullable string)


PromotionDetails

Declared In:
Headers/SNRPromotionDetails.h

Related To:
Promotion
PromotionDiscountTypeDetails

Inherits From:
BaseModel

Declaration:

class PromotionDetails: BaseModel
@interface SNRPromotionDetails : SNRBaseModel

Properties:

Property Type Optional Description
discountType PromotionDiscountTypeDetails no Discount details

All properties are read-only.



PromotionDiscountTypeDetails

Declared In:
Headers/SNRPromotionDiscountTypeDetails.h

Related To:
PromotionDetails

Inherits From:
BaseModel

Declaration:

class PromotionDiscountTypeDetails: BaseModel
@interface SNRPromotionDiscountTypeDetails : SNRBaseModel

Properties:

Property Type Optional Description
name String no Discount's name
outerScope Bool no When true, the items required to trigger the promotion are different than the items included in that promotion.
requiredItemsCount Int no Number of items required to qualify for the discount
discountedItemsCount Int no Number of discounted items

All properties are read-only.



PromotionDiscountMode

Declared In:
Headers/SNRPromotionDiscountType.h

Related To:
Promotion

Declaration:

enum PromotionDiscountMode: Int {
    static,
    step
}
typedef NS_ENUM(NSUInteger, SNRPromotionDiscountMode) {
    SNRPromotionDiscountModeStatic = 0,
    SNRPromotionDiscountModeStep
}

Functions: Converts from PromotionDiscountMode to String.

func SNR_PromotionDiscountModeToString(_: PromotionDiscountMode) -> String
NSString * SNR_PromotionDiscountModeToString(SNRPromotionDiscountMode mode)

Converts from String to PromotionDiscountMode.

func SNR_StringToPromotionDiscountMode(_: String) -> PromotionDiscountMode
SNRPromotionDiscountMode SNR_StringToPromotionDiscountMode(NSString * _Nullable string)


PromotionDiscountModeDetails

Declared In:
Headers/SNRPromotionDiscountModeDetails.h

Related To:
Promotion
PromotionDiscountStep

Inherits From:
BaseModel

Declaration:

class PromotionDiscountModeDetails: BaseModel
@interface SNRPromotionDiscountModeDetails : SNRBaseModel

Properties:

Property Type Optional Description
discountSteps [SNRPromotionDiscountStep] no List of discount steps
discountUsageTrigger PromotionDiscountUsageTrigger no Usage trigger for the discount

All properties are read-only.



PromotionDiscountStep

Declared In:
Headers/SNRPromotionDiscountStep.h

Related To:
PromotionDiscountModeDetails

Inherits From:
BaseModel

Declaration:

class PromotionDiscountStep: BaseModel
@interface SNRPromotionDiscountStep : SNRBaseModel

Properties:

Property Type Optional Description
discountValue NSNumber no Value of the discount
usageThreshold NSNumber no Usage threshold

All properties are read-only.



PromotionDiscountUsageTrigger

Declared In:
Headers/SNRPromotionDiscountUsageTrigger.h

Related To:
PromotionDiscountModeDetails

Declaration:

enum PromotionDiscountUsageTrigger: Int {
    transaction,
    redeem
}
typedef NS_ENUM(NSUInteger, SNRPromotionDiscountUsageTrigger) {
SNRPromotionDiscountUsageTriggerTransaction = 0,
SNRPromotionDiscountUsageTriggerRedeem
}

Functions: Converts from PromotionDiscountUsageTrigger to String.

func SNR_PromotionDiscountUsageTriggerToString(_: PromotionDiscountUsageTrigger) -> String
NSString * SNR_PromotionDiscountUsageTriggerToString(SNRPromotionDiscountUsageTrigger trigger)

Converts from String to PromotionDiscountUsageTrigger.

func SNR_StringToPromotionDiscountUsageTrigger(_: String) -> PromotionDiscountUsageTrigger
SNRPromotionDiscountUsageTrigger SNR_StringToPromotionDiscountUsageTrigger(NSString * _Nullable string)


PromotionImage

Declared In:
Headers/SNRPromotion.h

Related To:
Promotion
PromotionImageType

Inherits From:
BaseModel

Declaration:

class PromotionImage: BaseModel
@interface SNRPromotionImage : SNRBaseModel

Properties:

Property Type Optional Description
url String no Image's URL
type PromotionImageType no Image type

All properties are read-only.



PromotionImageType

Declared In:
Headers/SNRPromotionImageType.h

Related To:
Promotion

Declaration:

enum PromotionImageType: Int {
    image,
    thumbnail
}
typedef NS_ENUM(NSUInteger, SNRPromotionImageType) {
    SNRPromotionImageTypeImage = 0,
    SNRPromotionImageTypeThumbnail
}

Functions: Converts from PromotionImageType to String.

func SNR_PromotionImageTypeToString(_: PromotionImageType) -> String
NSString * SNR_PromotionImageTypeToString(SNRPromotionImageType type)

Converts from String to PromotionImageType.

func SNR_StringToPromotionImageType(_: String) -> PromotionImageType
SNRPromotionImageType SNR_StringToPromotionImageType(NSString * _Nullable string)


PromotionDiscountType

Declared In:
Headers/SNRPromotionDiscountType.h

Related To:
Promotion

Declaration:

enum PromotionDiscountType: Int {
    none,
    percent,
    amount,
    2For1,
    points,
    multibuy,
    exactPrice
}
typedef NS_ENUM(NSUInteger, SNRPromotionDiscountType) {
    SNRPromotionDiscountTypeNone = 0,
    SNRPromotionDiscountTypePercent,
    SNRPromotionDiscountTypeAmount,
    SNRPromotionDiscountType2For1,
    SNRPromotionDiscountTypePoints,
    SNRPromotionDiscountTypeMultibuy,
    SNRPromotionDiscountTypeExactPrice
}

Functions: Converts from PromotionDiscountType to String.

func SNR_PromotionDiscountTypeToString(_: PromotionDiscountType) -> String
NSString * SNR_PromotionDiscountTypeToString(SNRPromotionDiscountType type)

Converts from String to PromotionDiscountType.

func SNR_StringToPromotionDiscountType(_: String) -> PromotionDiscountType
SNRPromotionDiscountType SNR_StringToPromotionDiscountType(NSString * _Nullable string)


PromotionIdentifier

Declared In:
Headers/SNRPromotionIdentifier.h

Inherits From:
BaseModel

Declaration:

class PromotionIdentifier: BaseModel
@interface SNRPromotionIdentifier : SNRBaseModel

Initializers:

init(uuid: String)
- (instancetype)initWithUUID:(NSString *)UUID

init(code: String)
- (instancetype)initWithCode:(NSString *)code


PromotionsApiQuery

Object for setting parameters to facilitate fetching promotions from the API.

Declared In:
Headers/SNRPromotionsApiQuery.h

Related To:
PromotionResponse
Promotion
ApiQuerySortingOrderString

Inherits From:
NSObject

Declaration:

class PromotionsApiQuery: NSObject
@interface SNRPromotionsApiQuery : 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

Initializers:

init()
- (instancetype)init


Vouchers


AssignVoucherResponse

Declared In:
Headers/SNRAssignVoucherResponse.h

Related To:
AssignVoucherData

Inherits From:
BaseModel

Declaration:

class AssignVoucherResponse: BaseModel
@interface SNRAssignVoucherResponse : SNRBaseModel

Properties:

Property Type Optional Description
message String no Message from the Voucher assignment response
assignVoucherData AssignVoucherData yes List of vouchers in a pool

All properties are read-only.



VoucherCodesResponse

Declared In:
Headers/SNRVoucherCodesResponse.h

Related To:
SNRVoucherCodesData

Inherits From:
BaseModel

Declaration:

class VoucherCodesResponse: BaseModel
@interface SNRVoucherCodesResponse : SNRBaseModel

Properties:

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

All properties are read-only.



AssignVoucherData

Declared In:
Headers/SNRAssignVoucherData.h

Related To:
AssignVoucherResponse

Inherits From:
BaseModel

Declaration:

class AssignVoucherData: BaseModel
@interface SNRAssignVoucherData : SNRBaseModel

Properties:

Property Type Optional Description
code String no Voucher's code
expireIn Date yes Voucher's expiration date
redeemAt Date yes Voucher's redemption date
assignedAt Date yes Voucher's assignment date
createdAt Date no Voucher's creation date
updatedAt Date no Voucher's update date

All properties are read-only.



VoucherCodesData

Declared In:
Headers/SNRVoucherCodesData.h

Inherits From:
BaseModel

Declaration:

class VoucherCodesData: BaseModel
@interface SNRVoucherCodesData : SNRBaseModel

Properties:

Property Type Optional Description
code String no Voucher's code
status VoucherStatus no Voucher's status
clientId String no ID of the customer to whom the voucher is assigned
clientUuid String no UUID of the customer to whom the voucher is assigned
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

All properties are read-only.



VoucherStatus

Declared In:
Headers/SNRVoucherStatus.h

Declaration:

enum VoucherStatus: Int {
    unassigned,
    assigned,
    redeemed,
    canceled
}
typedef NS_ENUM(NSUInteger, SNRVoucherStatus) {
    SNRVoucherStatusUnassigned = 0,
    SNRVoucherStatusAssigned,
    SNRVoucherStatusRedeemed,
    SNRVoucherStatusCanceled
}

Functions:
Converts from VoucherStatus to String.

func SNR_VoucherStatusToString(_: VoucherStatus) -> String
NSString * SNR_VoucherStatusToString(SNRVoucherStatus type)

Converts from String to VoucherStatus.

func SNR_StringToVoucherStatus(_: String) -> VoucherStatus
SNRVoucherStatus SNR_StringToVoucherStatus(NSString * _Nullable string)

Canonical URL: https://hub.synerise.com/developers/mobile-sdk/class-reference/ios/promotions-and-vouchers