All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.carts.commands.updateactions.RemoveCustomLineItem Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.carts.commands.updateactions;

import io.sphere.sdk.carts.Cart;
import io.sphere.sdk.carts.CustomLineItem;
import io.sphere.sdk.commands.UpdateActionImpl;

/**
 Removes the custom line item from the cart.

 {@doc.gen intro}

 {@include.example io.sphere.sdk.carts.commands.CartUpdateCommandTest#removeCustomLineItem()}

 */
public class RemoveCustomLineItem extends UpdateActionImpl {
    private final String customLineItemId;

    private RemoveCustomLineItem(final String customLineItemId) {
        super("removeCustomLineItem");
        this.customLineItemId = customLineItemId;
    }

    public static RemoveCustomLineItem of(final String customLineItemId) {
        return new RemoveCustomLineItem(customLineItemId);
    }

    public static RemoveCustomLineItem of(final CustomLineItem customLineItem) {
        return of(customLineItem.getId());
    }

    public String getCustomLineItemId() {
        return customLineItemId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy