interface DiscountCode {
    applicationVersion?: number;
    cartDiscounts: CartDiscountReference[];
    cartPredicate?: string;
    code: string;
    createdAt: string;
    createdBy?: CreatedBy;
    custom?: CustomFields;
    description?: LocalizedString;
    groups: string[];
    id: string;
    isActive: boolean;
    lastModifiedAt: string;
    lastModifiedBy?: LastModifiedBy;
    maxApplications?: number;
    maxApplicationsPerCustomer?: number;
    name?: LocalizedString;
    references: Reference[];
    validFrom?: string;
    validUntil?: string;
    version: number;
}

Hierarchy

Properties

applicationVersion?: number

Used and managed by the API and must not be used in customer logic. The value can change at any time due to internal and external factors.

cartDiscounts: CartDiscountReference[]

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

cartPredicate?: string

DiscountCode can only be applied to Carts that match this predicate.

code: string

User-defined unique identifier of the DiscountCode added to the Cart to apply the related CartDiscounts.

createdAt: string

Date and time (UTC) the DiscountCode was initially created.

createdBy?: CreatedBy

Present on resources created after 1 February 2019 except for events not tracked.

custom?: CustomFields

Custom Fields of the DiscountCode.

description?: LocalizedString

Description of the DiscountCode.

groups: string[]

Groups to which the DiscountCode belongs to.

id: string

Unique identifier of the DiscountCode.

isActive: boolean

Indicates if the DiscountCode is active and can be applied to the Cart.

lastModifiedAt: string

Date and time (UTC) the DiscountCode was last updated.

lastModifiedBy?: LastModifiedBy

Present on resources created after 1 February 2019 except for events not tracked.

maxApplications?: number

Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or edit. However, Order cancellation or deletion does not decrement the count.

maxApplicationsPerCustomer?: number

Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or edit. However, Order cancellation or deletion does not decrement the count.

Name of the DiscountCode.

references: Reference[]

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

validFrom?: string

Date and time (UTC) from which the DiscountCode is effective.

validUntil?: string

Date and time (UTC) until which the DiscountCode is effective.

version: number

Current version of the DiscountCode.

Generated using TypeDoc