io.sphere.sdk.carts.expansion.LineItemExpansionModelImpl Maven / Gradle / Ivy
package io.sphere.sdk.carts.expansion;
import io.sphere.sdk.channels.expansion.ChannelExpansionModel;
import io.sphere.sdk.expansion.ExpansionModelImpl;
import java.util.List;
final class LineItemExpansionModelImpl extends ExpansionModelImpl implements LineItemExpansionModel {
LineItemExpansionModelImpl(final List parentPath, final String path) {
super(parentPath, path);
}
@Override
public ChannelExpansionModel supplyChannel() {
return ChannelExpansionModel.of(buildPathExpression(), "supplyChannel");
}
@Override
public ChannelExpansionModel distributionChannel() {
return ChannelExpansionModel.of(buildPathExpression(), "distributionChannel");
}
@Override
public ItemStateExpansionModel state() {
return state("*");
}
@Override
public ItemStateExpansionModel state(final int index) {
return state("" + index);
}
private ItemStateExpansionModel state(final String s) {
return new ItemStateExpansionModelImpl<>(pathExpression(), "state[" + s + "]");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy