Promotions and Vouchers

Promotions


PromotionResponse

Declared In:
lib/model/promotions/promotion_response.dart

Related To:
Promotion

Declaration:

class PromotionResponse

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
items List<Promotion> no List of promotion items


Promotion

Declared In:
lib/model/promotions/promotion.dart

Related To:
PromotionResponse
PromotionStatus
PromotionType PromotionDiscountType

Declaration:

class Promotion

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 int yes Redemption limit per customer
redeemQuantityPerActivation int yes Redemption quantity per activation
currentRedeemedQuantity int no Current redemption quantity
currentRedeemLimit int no Current redemption limit
activationCounter int no Promotion’s activation counter
possibleRedeems int no Maximum number of promotion redemptions
requireRedeemedPoints int yes Required redeemed points
discountType PromotionDiscountType yes Discount type
discountValue int no Discount value
discountMode PromotionDiscountMode no Discount mode
discountModeDetails PromotionDiscountModeDetails yes Discount mode details
priority int no Promotion’s priority
price int no Item price
itemScope PromotionItemScope no Promotion’s item scope
minBasketValue int yes Minimum basket value
maxBasketValue int yes Maximum basket value
name String no Promotion’s name
headline String yes Promotion’s headline
descriptionText String yes Promotion’s description
images List<PromotionImage> yes List of promotion images
startAt DateTime yes Start time of a promotion
expireAt DateTime yes Expiration time of the promotion
lastingAt DateTime yes Date when the promotion expires for the current profile
lastingTime int yes Duration of the promotion in seconds
displayFrom String yes DateTime as a String when the promotion starts being displayed
displayTo String yes DateTime as a String when the promotions ends being displayed
catalogIndexItems List<String> yes List of item indexes
params Map<String, Object> yes Promotion’s custom parameters
tags List<Object> yes Promotion’s custom tags


PromotionStatus

Declared In:
lib/enums/promotions/promotion_status.dart

Related To:
Promotion

Declaration:

enum PromotionStatus {
  none('NONE'),
  active('ACTIVE'),
  assigned('ASSIGNED'),
  redeemed('REDEEMED');
}

Functions:

Converts from PromotionStatus to String.

String promotionStatusAsString()


Converts from String to PromotionStatus.

PromotionStatus getPromotionStatusFromString(String string)



PromotionType

Declared In:
lib/enums/promotions/promotion_type.dart

Related To:
Promotion

Declaration:

enum PromotionType {
  unknown('UNKNOWN'),
  membersOnly('MEMBERS_ONLY'),
  custom('CUSTOM'),
  general('GENERAL'),
  handbill('HANDBILL');
}

Functions:

Converts from PromotionType to String.

String promotionTypeAsString() {


Converts from String to PromotionType.

PromotionType getPromotionTypeFromString(String string) {



PromotionDiscountType

Declared In:
lib/enums/promotions/promotion_discount_type.dart

Related To:
Promotion

Declaration:

enum PromotionDiscountType {
  none('NONE'),
  percent('PERCENT'),
  amount('AMOUNT'),
  twoForOne('2_FOR_1'),
  points('POINTS'),
  multibuy('MULTIBUY'),
  exactPrice('EXACT_PRICE');
}

Functions:

Converts from String to PromotionDiscountType.

PromotionDiscountType getPromotionDiscountTypeFromString(String string)



PromotionItemScope

Declared In:
lib/enums/promotions/promotion_item_scope.dart

Related To:
Promotion

Declaration:

enum PromotionItemScope {
  lineItem('LINE_ITEM'),
  basket('BASKET');

Functions: Converts from PromotionItemScope to String.

String promotionItemScopeAsString()


Converts from String to PromotionItemScope.

static PromotionItemScope getPromotionItemScopeFromString(String string)



PromotionDetails

Declared In:
lib/model/promotions/promotion_details.dart

Related To:
Promotion
PromotionDiscountTypeDetails

Declaration:

class PromotionDetails

Properties:

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


PromotionDiscountTypeDetails

Declared In:
lib/model/promotions/promotion_discount_type_details.dart

Related To:
PromotionDetails

Declaration:

class PromotionDiscountTypeDetails 

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


PromotionDiscountMode

Declared In:
lib/enums/promotions/promotion_discount_mode.dart

Related To:
Promotion

Declaration:

enum PromotionDiscountMode {
  staticMode('STATIC'),
  stepMode('STEP');

Functions:

Converts from String to PromotionDiscountMode.

static PromotionDiscountMode getPromotionDiscountModeFromString(String string) 



PromotionDiscountModeDetails

Declared In:
lib/model/promotions/promotion_discount_mode_details.dart

Related To:
Promotion
PromotionDiscountStep

Declaration:

class PromotionDiscountModeDetails 

Properties:

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


PromotionDiscountStep

Declared In:
lib/model/promotions/promotion_discount_step.dart

Related To:
PromotionDiscountModeDetails

Declaration:

class PromotionDiscountStep 

Properties:

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


PromotionDiscountUsageTrigger

Declared In:
lib/enums/promotions/promotion_discount_usage_trigger.dart

Related To:
PromotionDiscountModeDetails

Declaration:

enum PromotionDiscountUsageTrigger {
  transaction('TRANSACTION'),
  redeem('REDEEM');

Functions: Converts from PromotionDiscountUsageTrigger to String.

String promotionDiscountUsageTriggerAsString() {


Converts from String to PromotionDiscountUsageTrigger.

static PromotionDiscountUsageTrigger getPromotionDiscountUsageTriggerFromString(String string) {



PromotionImage

Declared In:
lib/model/promotions/promotion_image.dart

Related To:
Promotion
PromotionImageType

Declaration:

class PromotionImage

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:
lib/enums/promotions/promotion_image_type.dart

Related To:
Promotion

Declaration:

enum PromotionImageType {
  image('image'),
  thumbnail('thumbnail'),
  large('large'),
  unknown('UNKNOWN');

Functions: Converts from PromotionImageType to String.

String promotionImageTypeAsString() {


Converts from String to PromotionImageType.

static PromotionImageType getPromotionImageTypeFromString(String string) 



PromotionIdentifier

Declared In:
lib/model/promotions/promotion_identifier.dart

Declaration:

class PromotionIdentifier {
  PromotionIdentifierKey key;
  String value;
}

Properties:

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

Initializers:

PromotionIdentifier({required this.key, required this.value});



PromotionIdentifierKey

Declared In:
lib/enums/promotions/promotion_identifier_key.dart

Declaration:

enum PromotionIdentifierKey {
  uuid('UUID'),
  code('CODE');
}



PromotionsApiQuery

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

Declared In:
lib/model/promotions/promotions_api_query.dart

Related To:
PromotionResponse
Promotion

Declaration:

class PromotionsApiQuery

Properties:

Property Type Optional Default Description
statuses List<PromotionStatus> no [] List of promotion statuses for query
types List<PromotionType> no [] List of promotion types for query
Note:

Initializers:

  PromotionsApiQuery(
      {required this.statuses,
      required this.types,
      required super.sorting,
      required super.limit,
      required super.page,
      required super.includeMeta});



Vouchers


AssignVoucherResponse

Declared In:
lib/model/vouchers/assign_voucher_response.dart

Related To:
AssignVoucherData

Declaration:

class AssignVoucherResponse

Properties:

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


VoucherCodesResponse

Declared In:
lib/model/vouchers/voucher_codes_response.dart

Related To:
VoucherCodesData

Declaration:

class VoucherCodesResponse

Properties:

Property Type Optional Description
items List<VoucherCodesData> no List of voucher items


AssignVoucherData

Declared In:
lib/model/vouchers/assign_voucher_data.dart

Related To:
AssignVoucherResponse

Declaration:

class AssignVoucherData

Properties:

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


VoucherCodesData

Declared In:
lib/model/vouchers/voucher_codes_data.dart

Declaration:

class VoucherCodesData

Properties:

Property Type Optional Description
code String no Voucher’s code
status VoucherCodeStatus 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 String no Voucher’s expiration date
redeemAt DateTime no Voucher’s redemption date
assignedAt DateTime no Voucher’s assignment date
createdAt DateTime no Voucher’s creation date
updatedAt DateTime no Voucher’s update date


VoucherCodeStatus

Declared In:
lib/enums/vouchers/voucher_code_status.dart

Declaration:

enum VoucherCodeStatus {
  unassigned('UNASSIGNED'),
  assigned('ASSIGNED'),
  redeemed('REDEEMED'),
  canceled('CANCELED');
}

Functions:

Converts from VoucherCodeStatus to String.

String voucherCodeStatusAsString() {


Converts from String to VoucherCodeStatus.

VoucherCodeStatus getVoucherCodeStatusFromString(String string) {

😕

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