Responses
BaseModel
Declared In:
Headers/SNRBaseModel.h
Inherits From:
NSObject
Declaration:
class BaseModel: NSObject
ClientConditionalAuthResult
Declared In:
Headers/SNRClientConditionalAuthResult.h
Inherits From:
BaseModel
Declaration:
class ClientConditionalAuthResult: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
isSuccess | Bool | no | Result of authentication operation |
token | String | yes | Token as a raw string |
status | ClientConditionalAuthStatus | no | Status of the authentication |
conditions | [AnyObject] | yes | Authentication conditions |
ClientConditionalAuthStatus
Declared In:
Headers/SNRClientConditionalAuthStatus.h
Declaration:
enum ClientConditionalAuthStatus: Int {
success,
unauthorized,
activationRequired,
registrationRequired,
approvalRequired,
termsAcceptanceRequired,
mfaRequired,
unknown
}
Functions:
Converts from ClientConditionalAuthStatus to String.
func SNR_ClientConditionalAuthStatusToString(_: ClientConditionalAuthStatus) -> String
Converts from String to ClientConditionalAuthStatus.
func SNR_StringToClientConditionalAuthStatus(_: String) -> ClientConditionalAuthStatus
ClientSessionEndReason
Declared In:
Headers/SNRClientSessionEndReason.h
Declaration:
enum ClientSessionEndReason: Int {
userSignOut,
systemSignOut,
sessionExpiration,
securityException,
clientRejected,
userAccountDeleted
}
Token
Declared In:
Headers/SNRToken.h
Related To:
TokenOrigin
Inherits From:
BaseModel
Declaration:
class Token: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
tokenString | String | no | Token as a raw string |
expirationDate | String | yes | Token’s expiration time |
rlm | String | yes | Token’s RLM |
origin | TokenOrigin | no | Token’s origin |
customId | String | yes | Token’s RLM |
Methods: Checks if the token is near expiration.
func isNearExpiring() -> Bool
TokenOrigin
Declared In:
Headers/SNRTokenOrigin.h
Declaration:
enum TokenOrigin: Int {
unknown,
synerise,
facebook,
oauth,
apple
}
Functions: Converts from TokenOrigin to String.
func SNR_TokenOriginToString(_: TokenOrigin) -> String
Converts from String to TokenOrigin.
func SNR_StringToTokenOrigin(_: String) -> TokenOrigin
ClientAccountInformation
Declared In:
Headers/SNRClientAccountInformation.h
Related To:
ClientSex
ClientAgreements
Inherits From:
BaseModel
Conforms To:
NSSecureCoding
Declaration:
class ClientAccountInformation: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
clientId | Int | no | Customer’s ID |
String | no | Customer’s email | |
phone | String | yes | Customer’s phone |
customId | String | yes | Customer’s custom ID |
uuid | String | no | Customer’s UUID |
firstName | String | yes | Customer’s first name |
lastName | String | yes | Customer’s last name |
displayName | String | yes | Customer’s display name |
sex | ClientSex | no | Customer’s sex |
company | String | yes | Customer’s company |
address | String | yes | Customer’s address |
city | String | yes | Customer’s city |
province | String | yes | Customer’s province |
zipCode | String | yes | Customer’s ZIP code |
countryCode | String | yes | Customer’s country code |
birthDate | String | yes | Customer’s birthdate |
lastActivityDate | Date | no | Customer’s last activity date |
avatarUrl | String | yes | Customer’s avatar URL |
anonymous | Bool | no | Customer’s anonymous flag |
agreements | ClientAgreements | no | Customer’s agreements |
attributes | [AnyHashable: Any] | yes | Customer’s attributes |
tags | [String] | yes | Customer’s tags |
ClientSex
Declared In:
Headers/SNRClientSex.h
Declaration:
enum ClientSex: Int {
notSpecified,
male,
female,
other
}
Functions:
Converts from ClientSex to String.
func SNR_ClientSexToString(_: ClientSex) -> String
Converts from String to ClientSex.
func SNR_StringToClientSex(_: String) -> ClientSex
ClientAgreements
Declared In:
Headers/SNRClientAgreements.h
Inherits From:
BaseModel
Conforms To:
NSSecureCoding
NSCopying
Declaration:
class ClientAgreements: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
Bool | no | Email agreement | |
sms | Bool | no | SMS agreement |
push | Bool | no | Push notifications agreement |
bluetooth | Bool | no | Bluetooth agreement |
rfid | Bool | no | RFID agreement |
wifi | Bool | no | WIFI agreement |
Initializers:
init()
ClientEventData
Declared In:
Headers/SNRClientEventData.h
Related To:
Event
Inherits From:
BaseModel
Declaration:
class ClientEventData: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
time | String | no | Event’s time |
label | String | no | Event’s label |
action | String | no | Event’s action |
client | [AnyHashable: Any] | no | Event’s customer identification |
params | [AnyHashable: Any] | no | Event’s parameters |
Methods:
This method retrieves a customer ID.
func getClientID() -> Int
This method retrieves a customer UUID.
func getClientUUIDString() -> String?
This method retrieves a customer email.
func getClientEmail() -> String?
PromotionResponse
Declared In:
Headers/SNRPromotionResponse.h
Related To:
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 |
PromotionResponseMetadata
Declared In:
Headers/SNRPromotionResponseMetadata.h
Related To:
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 |
Promotion
Declared In:
Headers/SNRPromotion.h
Related To:
PromotionResponse
PromotionStatus
PromotionType
PromotionDetails
PromotionItemScope
PromotionDiscountType
PromotionDiscountMode
PromotionDiscountModeDetails
PromotionImage
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 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 | How long the promotion lasts |
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 |
PromotionStatus
Declared In:
Headers/SNRPromotionStatus.h
Related To:
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
PromotionItemScope
Declared In:
Headers/SNRPromotionItemScope.h
Related To:
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
PromotionType
Declared In:
Headers/SNRPromotionType.h
Related To:
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
PromotionDetails
Declared In:
Headers/SNRPromotionDetails.h
Related To:
Promotion
PromotionDiscountTypeDetails
Inherits From:
BaseModel
Declaration:
class PromotionDetails: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
discountType | PromotionDiscountTypeDetails | no | Discount details |
PromotionDiscountTypeDetails
Declared In:
Headers/SNRPromotionDiscountTypeDetails.h
Related To:
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 |
PromotionDiscountMode
Declared In:
Headers/SNRPromotionDiscountType.h
Related To:
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:
Headers/SNRPromotionDiscountModeDetails.h
Related To:
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 |
PromotionDiscountStep
Declared In:
Headers/SNRPromotionDiscountStep.h
Related To:
PromotionDiscountModeDetails
Inherits From:
BaseModel
Declaration:
class PromotionDiscountStep: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
discountValue | NSNumber | no | Value of discount |
usageThreshold | [NSNumber] | no | Usage threshold |
PromotionDiscountUsageTrigger
Declared In:
Headers/SNRPromotionDiscountUsageTrigger.h
Related To:
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:
Headers/SNRPromotion.h
Related To:
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 |
PromotionImageType
Declared In:
Headers/SNRPromotionImageType.h
Related To:
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:
Headers/SNRPromotionDiscountType.h
Related To:
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
AssignVoucherResponse
Declared In:
Headers/SNRAssignVoucherResponse.h
Related To:
AssignVoucherData
Inherits From:
BaseModel
Declaration:
class AssignVoucherResponse: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
message | String | no | Message from the Voucher assignment response |
assignVoucherData | AssignVoucherData | yes | List of vouchers in a pool |
AssignVoucherData
Declared In:
Headers/SNRAssignVoucherData.h
Related To:
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 |
VoucherCodesResponse
Declared In:
Headers/SNRVoucherCodesResponse.h
Related To:
SNRVoucherCodesData
Inherits From:
BaseModel
Declaration:
class VoucherCodesResponse: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
items | [VoucherCodesData] | no | List of voucher items |
VoucherCodesData
Declared In:
Headers/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 | 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 |
VoucherStatus
Declared In:
Headers/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
RecommendationResponse
Declared In:
Headers/SNRRecommendationResponse.h
Related To:
Recommendation
Inherits From:
BaseModel
Declaration:
class RecommendationResponse extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
name | String | no | Recommendation’s name |
campaignHash | String | no | Campaign hash |
campaignID | String | no | Campaign ID |
items | [Recommendation] | no | List of items in the recommendation |
Recommendation
Declared In:
Headers/SNRRecommendation.h
Related To:
RecommendationResponse
Inherits From:
BaseModel
Declaration:
class Recommendation extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
gtin | String | no | Product’s GTIN |
ScreenViewResponse
Declared In:
Headers/SNRScreenViewResponse.h
Related To:
ScreenViewAudience
Inherits From:
BaseModel
Declaration:
class ScreenViewResponse: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
audience | ScreenViewAudience | no | Audience of a screen view |
identifier | String | no | Screen view’s ID |
hashString | String | no | Screen view’s hash |
path | String | no | Screen view’s path |
name | String | no | Screen view’s name |
priority | NSNumber | no | Screen view’s priority |
descriptionText | String | yes | Screen view’s description |
data | AnyObject | no | Screen view’s data |
version | String | no | Version of a screen view |
parentVersion | String | yes | Parent version of a screen view |
createdAt | Date | no | Screen view’s creation date |
updatedAt | Date | no | Screen view’s update date |
deletedAt | Date | yes | Screen view’s deletion date |
ScreenViewAudience
Declared In:
Headers/SNRScreenViewAudience.h
Related To:
ScreenViewResponse
Inherits From:
BaseModel
Declaration:
class ScreenViewAudience: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
IDs | [String] | yes | Audience’s identifiers |
query | String | yes | Audience’s query |
InAppMessageData
Model representing an in-app message data.
Declared In:
Headers/SNRInAppMessageData.h
Inherits From:
BaseModel
Declaration:
class InAppMessageData: BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
campaignHash | String | no | Identifier of the in-app message campaign. |
variantIdentifier | String | no | Identifier of the in-app message campaign variant. |
additionalParameters | [AnyHashable: Any] | yes | Parameters additionally provided by the campaign. |
isTest | Bool | no | Specifies if the object is from a test campaign. |