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

io.sphere.client.exceptions.OutOfStockException Maven / Gradle / Ivy

There is a newer version: 0.72.1
Show newest version
package io.sphere.client.exceptions;

import com.google.common.collect.ImmutableList;

import java.util.List;

/** Exception thrown when creating an order. */
public class OutOfStockException extends SphereException {
    private final ImmutableList lineItemsIds;

    public OutOfStockException(Iterable lineItemIds) {
        super("Some line items are out of stock. See OutOfStockException.getLineItemIds() to get their ids.");
        this.lineItemsIds = ImmutableList.copyOf(lineItemIds);
    }

    /** Ids of the line items that are out of stock. */
    public List getLineItemIds() { return lineItemsIds; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy