io.sphere.sdk.products.expansion.ProductVariantExpansionModel Maven / Gradle / Ivy
package io.sphere.sdk.products.expansion;
import io.sphere.sdk.expansion.ExpansionModel;
import javax.annotation.Nullable;
public class ProductVariantExpansionModel extends ExpansionModel {
ProductVariantExpansionModel(@Nullable final String parentPath, @Nullable final String path) {
super(parentPath, path);
}
public PriceExpansionModel prices() {
return prices("*");
}
public PriceExpansionModel prices(final int index) {
return prices("" + index);
}
public ProductAttributeExpansionModel attributes() {
return new ProductAttributeExpansionModel<>(pathExpression(), "attributes[*]");
}
private PriceExpansionModel prices(final String index) {
return new PriceExpansionModel<>(pathExpression(), "prices[" + index + "]");
}
}