All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.products.expansion.ProductVariantExpansionModel Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
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 + "]");
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy