
io.sphere.client.exceptions.OutOfStockException Maven / Gradle / Ivy
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 - 2025 Weber Informatics LLC | Privacy Policy