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

    Interface StagedOrderAddCustomLineItemAction

    If the Cart already contains a CustomLineItem with the same slug, name, money, taxCategory, state, and Custom Fields, then only the quantity of the existing Custom Line Item is increased. If CustomLineItem shippingDetails are set, they are merged with the targets that already exist on the ItemShippingDetails of the Custom Line Item. In case of overlapping address keys the ItemShippingTarget quantity is summed up.

    If the Cart already contains a Custom Line Item with the same slug that is otherwise not identical, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
    
    If the Tax Rate is not set, a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
    
    interface StagedOrderAddCustomLineItemAction {
        action: "addCustomLineItem";
        custom?: CustomFieldsDraft;
        externalTaxRate?: ExternalTaxRateDraft;
        key?: string;
        money: _Money;
        name: LocalizedString;
        priceMode?: CustomLineItemPriceMode;
        quantity?: number;
        recurrenceInfo?: CustomLineItemRecurrenceInfoDraft;
        shippingDetails?: ItemShippingDetailsDraft;
        slug: string;
        taxCategory?: TaxCategoryResourceIdentifier;
    }

    Hierarchy (View Summary)

    Index

    Properties

    action: "addCustomLineItem"

    Custom Fields for the Custom Line Item.

    externalTaxRate?: ExternalTaxRateDraft

    An external Tax Rate can be set if the Cart has the External TaxMode.

    key?: string

    User-defined unique identifier of the Custom Line Item.

    money: _Money

    Money value of the Custom Line Item. The value can be negative.

    Name of the Custom Line Item.

    quantity?: number

    Number of Custom Line Items to add to the Cart.

    Recurring Order and frequency data.

    shippingDetails?: ItemShippingDetailsDraft

    Container for Custom Line Item-specific addresses.

    slug: string

    User-defined identifier used in a deep-link URL for the Custom Line Item. It must match the pattern [a-zA-Z0-9_-]{2,256}.

    Used to select a Tax Rate when a Cart has the Platform TaxMode. If TaxMode is Platform, this field must not be empty.