Promotions and Vouchers
Promotions
PromotionResponse
Class model for a promotion response.
Declared In:
com.synerise.sdk.promotions.model.promotion.PromotionResponse
Declaration:
public class PromotionResponse
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
promotionMetadata | PromotionMetadata | no | - | Metadata |
promotions | List<Promotion> | no | - | List of promotions |
Initializers:
There are no initializers.
Methods:
This method retrieves the value of the promotionMetadata
parameter.
public PromotionMetadata getPromotionMetadata()
This method retrieves a list of promotions.
public List<Promotion> getPromotions()
SinglePromotionResponse
Class model for a single promotion response.
Declared In:
com.synerise.sdk.promotions.model.promotion.SinglePromotionResponse
Declaration:
public class SinglePromotionResponse
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
promotion | Promotion | no | - | Promotion |
Initializers:
There are no initializers.
Methods:
There are only getters and setters for the above properties.
This method retrieves the value of the promotion
parameter.
public Promotion getPromotion()
This method defines the value of the promotion
parameter.
public void setPromotion(Promotion data)
PromotionMetadata
Class model for a promotion metadata.
Declared In:
com.synerise.sdk.promotions.model.promotion.PromotionMetadata
Declaration:
public class PromotionMetadata implements Serializable
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
totalCount | int | no | - | Total count of promotions |
totalPages | int | no | - | Total count of pages |
page | int | no | - | Page |
limit | int | no | - | Limit of promotions per page |
code | int | no | - | Code |
Initializers:
There are no initializers.
Methods:
This method retrieves the value of the totalCount
parameter.
public int getTotalCount()
This method retrieves the value of the totalPages
parameter.
public int getTotalPages()
This method retrieves the value of the page
parameter.
public int getPage()
This method retrieves the value of the limit
parameter.
public int getLimit()
This method retrieves the value of the code
parameter.
public int getCode()
Promotion
Class model for a promotion.
Declared In:
com.synerise.sdk.promotions.model.promotion.Promotion
Declaration:
public class Promotion extends BaseModel implements Serializable
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
uuid | String | no | - | Promotion UUID |
code | String | no | - | Promotion code |
status | String | no | - | Promotion status |
type | String | no | - | Promotion type |
redeemLimitPerClient | int | no | - | Redemption limit per client |
redeemQuantityPerActivation | int | no | - | Redemption quantity per activation |
currentRedeemedQuantity | int | no | - | Current redeemed quantity |
currentRedeemLimit | int | no | - | Current redemption limit |
activationCounter | int | no | - | Activation counter |
discountType | String | no | - | Discount type |
discountValue | int | no | - | Discount value |
requireRedeemedPoints | int | no | - | Required redeemed points |
name | String | no | - | Promotion name |
headline | String | no | - | Promotion headline |
description | String | no | - | Promotion description |
images | List |
no | - | List of promotion images |
startAt | Date | no | - | Start time of a promotion |
expireAt | Date | no | - | Expiration time of a promotion |
lastingAt | Date | no | - | How long a promotion lasts |
params | HashMap<String, Object> | no | - | Promotion custom parameters |
catalogIndexItems | List |
no | - | List of item indexes |
price | long | no | - | Item price |
priority | int | no | - | Promotion priority |
Initializers:
There are no initializers.
Methods:
There are only getters for the above properties.
PromotionStatus
This enum contains values for a promotion status.
Declared In:
com.synerise.sdk.promotions.model.promotion.PromotionStatus
Declaration:
public enum PromotionStatus
Values:
Property | Value | Description |
---|---|---|
ASSIGNED | “ASSIGNED” | Promotion status |
ACTIVE | “ACTIVE” | Promotion status |
REDEEMED | “REDEEMED” | Promotion status |
UNKNOWN | “UNKNOWN” | Promotion status |
Methods:
This method retrieves a promotion status.
public static PromotionStatus getByPromotionStatus(String status)
PromotionType
This enum contains values for a promotion type.
Declared In:
com.synerise.sdk.promotions.model.promotion.PromotionType
Declaration:
public enum PromotionType
Values:
Property | Value | Description |
---|---|---|
GENERAL | “GENERAL” | Promotion type |
CUSTOM | “CUSTOM” | Promotion type |
MEMBERS_ONLY | “MEMBERS_ONLY” | Promotion type |
UNKNOWN | “UNKNOWN” | Promotion type |
Methods:
This method retrieves a promotion type.
public static PromotionType getByPromotionType(String type)
PromotionIdentifier
Class model for a promotion identifier.
Declared In:
com.synerise.sdk.promotions.model.promotion.PromotionIdentifier
Declaration:
public class PromotionIdentifier implements Serializable
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
key | String | no | - | Promotion key identifier |
value | String | no | - | Promotion identifier value |
Initializers:
There is a constructor.
Methods:
There are no methods.
PromotionsApiQuery
Class responsible for creating a promotion query.
Declared In:
com.synerise.sdk.promotions.model.promotion.PromotionsApiQuery
Declaration:
public class PromotionsApiQuery
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
statuses | List<PromotionStatus> | yes | - | List of promotion states |
types | List<PromotionType> | yes | - | List of promotion types |
sortParameters | LinkedHashMap<PromotionSortingKey, ApiQuerySortingOrder> | yes | - | Sort parameters. If you add more than one sorting attribute, the importance of each attribute depends on its position. The first one is the most important. |
limit | int | no | 100 | Limit of promotions per page |
page | int | no | 1 | Page number |
includeMeta | Boolean | no | false | If true, the response includes metadata |
Initializers:
There are no initializers.
Methods:
There are only setters for above properties.
Vouchers
AssignVoucherResponse
Class model of AssignVoucherResponse.
Declared In:
com.synerise.sdk.promotions.model.AssignVoucherResponse
Declaration:
public class AssignVoucherResponse
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
message | String | no | - | Message |
data | AssignVoucherData | no | - | Voucher data |
Initializers:
There are no initializers.
Methods:
There are only getters for the above properties.
This method retrieves the value of the message
parameter.
public String getMessage()
This method retrieves the value of the data
parameter.
public AssignVoucherData getData()
VoucherCodesResponse
Class model of VoucherCodesResponse.
Declared In:
com.synerise.sdk.promotions.model.VoucherCodesResponse
Declaration:
public class VoucherCodesResponse
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
data | List<VoucherCodesData> | no | - | Voucher data |
Initializers:
There are no initializers.
Methods:
There are only getters for the above properties.
This method retrieves the list of values of the data
parameter.
public List<VoucherCodesData> getData()
AssignVoucherData
Class model of AssignVoucherData.
Declared In:
com.synerise.sdk.promotions.model.AssignVoucherData
Declaration:
public class AssignVoucherData
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
code | String | no | - | Code |
expireIn | Date | no | - | Date of expiration |
redeemAt | Date | no | - | Redemption at date |
assignedAt | Date | no | - | Date of assigning voucher |
createdAt | Date | no | - | Date of creation |
updatedAt | Date | no | - | Date of voucher update |
Initializers:
There are no initializers.
Methods:
There are only getters for the above properties.
This method retrieves the value of the code
parameter.
public String getCode()
This method retrieves the value of the ExpireIn
parameter.
public Date getExpireIn()
This method retrieves the value of the RedeemAt
parameter.
public Date getRedeemAt()
This method retrieves the value of the AssignedAt
parameter.
public Date getAssignedAt()
This method retrieves the value of the CreatedAt
parameter.
public Date getCreatedAt()
This method retrieves the value of the UpdateAt
parameter.
public Date getUpdatedAt()
VoucherCodesData
Class model of VoucherCodesData.
Declared In:
com.synerise.sdk.promotions.model.VoucherCodesData
Declaration:
public class VoucherCodesData
Properties:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
code | String | no | - | Voucher code |
status | String | no | - | Voucher status |
clientUuid | String | no | - | Profile’s UUID |
poolUuid | String | no | - | Pool UUID |
expireIn | Date | no | - | Voucher expiration date |
assignedAt | Date | no | - | Voucher assignment date |
createdAt | Date | no | - | Voucher creation date |
updatedAt | Date | no | - | Voucher update date |
Initializers:
There are no initializers.
Methods:
There are only getters for the above properties.
VoucherCodesStatus
This enum contains values for a voucher code status.
Declared In:
com.synerise.sdk.client.model.client.VoucherCodeStatus
Declaration:
public enum VoucherCodeStatus
Values:
Property | Value | Description |
---|---|---|
ASSIGNED | “ASSIGNED” | Assigned |
UNASSIGNED | “UNASSIGNED” | Unassigned |
REDEEMED | “REDEEMED” | Redeemed |
CANCELED | “CANCELED” | Canceled |
Methods:
This method retrieves the voucher status.
public String getStatus()
This method retrieves the voucher status.
public static VoucherCodeStatus getStatus(String status)