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

io.sphere.sdk.cartdiscounts.LineItemsTarget Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.cartdiscounts;

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.Base;

public class LineItemsTarget extends Base implements CartDiscountTarget {
    private final String predicate;

    @JsonCreator
    private LineItemsTarget(final String predicate) {
        this.predicate = predicate;
    }

    public String getPredicate() {
        return predicate;
    }

    public static LineItemsTarget ofAll() {
        return of("1 = 1");
    }

    public static LineItemsTarget of(final String predicate) {
        return new LineItemsTarget(predicate);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy