@gradientedge/commercetools-utils
    Preparing search index...

    Interface ProductTailoringSetAttributeAction

    Either variantId or sku is required.

    interface ProductTailoringSetAttributeAction {
        action: "setAttribute";
        name: string;
        sku?: string;
        staged?: boolean;
        value?: any;
        variantId?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    action: "setAttribute"
    name: string

    The name of the Attribute to set.

    sku?: string

    The sku of the ProductVariant to update. Required if variantId is absent.

    staged?: boolean

    If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

    value?: any

    Value to set for the Attribute. If empty, any existing value will be removed.

    The [AttributeType](ctp:api:type:AttributeType) determines the format of the Attribute `value` to be provided:
    
    - For [Enum Type](ctp:api:type:AttributeEnumType) and [Localized Enum Type](ctp:api:type:AttributeLocalizedEnumType),
      use the `key` of the [Plain Enum Value](ctp:api:type:AttributePlainEnumValue) or [Localized Enum Value](ctp:api:type:AttributeLocalizedEnumValue) objects,
      or the complete objects as `value`.
    - For [Localizable Text Type](ctp:api:type:AttributeLocalizableTextType), use the [LocalizedString](ctp:api:type:LocalizedString) object as `value`.
    - For [Money Type](ctp:api:type:AttributeMoneyType) Attributes, use the [Money](ctp:api:type:Money) object as `value`.
    - For [Set Type](ctp:api:type:AttributeSetType) Attributes, use the entire `set` object  as `value`.
    - For [Reference Type](ctp:api:type:AttributeReferenceType) Attributes, use the [Reference](ctp:api:type:Reference) object as `value`.
    
    Tailoring of [Nested Type](ctp:api:type:AttributeNestedType) Attributes is **not supported**.
    
    variantId?: number

    The id of the ProductVariant to update. Required if sku is absent.