io.sphere.sdk.carts.expansion.CartLikeExpansionModel Maven / Gradle / Ivy
package io.sphere.sdk.carts.expansion;
import io.sphere.sdk.expansion.ExpansionModel;
import io.sphere.sdk.expansion.ExpansionPath;
public abstract class CartLikeExpansionModel extends ExpansionModel {
protected CartLikeExpansionModel(final String parentPath, final String path) {
super(parentPath, path);
}
protected CartLikeExpansionModel() {
super();
}
public ExpansionPath customerGroup() {
return expansionPath("customerGroup");
}
public DiscountCodeInfoExpansionModel discountCodes() {
return discountCodes("*");
}
public DiscountCodeInfoExpansionModel discountCodes(final int index) {
return discountCodes("" + index);
}
public LineItemExpansionModel lineItems() {
return new LineItemExpansionModel<>(pathExpression(), "lineItems[*]");
}
public LineItemExpansionModel lineItems(final int index) {
return new LineItemExpansionModel<>(pathExpression(), "lineItems[" + index + "]");
}
private DiscountCodeInfoExpansionModel discountCodes(final String s) {
return new DiscountCodeInfoExpansionModel<>(pathExpression(), "discountCodes[" + s + "]");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy