io.sphere.sdk.carts.expansion.LineItemExpansionModel Maven / Gradle / Ivy
package io.sphere.sdk.carts.expansion;
import io.sphere.sdk.expansion.ExpansionModel;
import io.sphere.sdk.expansion.ExpansionPath;
public class LineItemExpansionModel extends ExpansionModel {
LineItemExpansionModel(final String parentPath, final String path) {
super(parentPath, path);
}
LineItemExpansionModel() {
super();
}
public ExpansionPath supplyChannel() {
return expansionPath("supplyChannel");
}
public ExpansionPath distributionChannel() {
return expansionPath("distributionChannel");
}
public ItemStateExpansionModel state() {
return state("*");
}
public ItemStateExpansionModel state(final int index) {
return state("" + index);
}
private ItemStateExpansionModel state(final String s) {
return new ItemStateExpansionModel<>(pathExpression(), "state[" + s + "]");
}
}