Typescript SDK Type Docs
    Preparing search index...

    Interface DiscountCodeImport

    Represents the data used to import a DiscountCode. Once imported, this data is persisted as a DiscountCode in the Project.

    interface DiscountCodeImport {
        cartDiscounts: CartDiscountKeyReference[];
        cartPredicate?: string;
        code: string;
        custom?: Custom;
        description?: LocalizedString;
        groups?: string[];
        isActive: boolean;
        key: string;
        maxApplications?: number;
        maxApplicationsPerCustomer?: number;
        name?: LocalizedString;
        validFrom?: string;
        validUntil?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    cartDiscounts: CartDiscountKeyReference[]

    Maps to DiscountCode.cartDiscounts. If the referenced CartDiscounts do not exist, the state of the ImportOperation will be set to unresolved until the referenced CartDiscounts are created.

    cartPredicate?: string

    Maps to DiscountCode.cartPredicate.

    code: string

    Maps to DiscountCode.code. This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.

    custom?: Custom

    Maps to DiscountCode.custom.

    description?: LocalizedString

    Maps to DiscountCode.description.

    groups?: string[]

    Maps to DiscountCode.groups.

    isActive: boolean

    Maps to DiscountCode.isActive.

    key: string

    User-defined unique identifier. If a DiscountCode with this key exists, it is updated with the imported data.

    maxApplications?: number

    Maps to DiscountCode.maxApplications.

    maxApplicationsPerCustomer?: number

    Maps to DiscountCode.maxApplicationsPerCustomer.

    Maps to DiscountCode.name.

    validFrom?: string

    Maps to DiscountCode.validFrom.

    validUntil?: string

    Maps to DiscountCode.validUntil.