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

io.sphere.sdk.productdiscounts.commands.updateactions.ChangePredicate Maven / Gradle / Ivy

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

import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.productdiscounts.ProductDiscount;
import io.sphere.sdk.productdiscounts.ProductDiscountPredicate;

/**
 * Changes the predicate of a discount.
 *
 * {@doc.gen intro}
 *
 * {@include.example io.sphere.sdk.productdiscounts.commands.ProductDiscountUpdateCommandTest#changePredicate()}
 */
public class ChangePredicate extends UpdateActionImpl {
    private final String predicate;

    private ChangePredicate(final ProductDiscountPredicate predicate) {
        super("changePredicate");
        this.predicate = predicate.toSpherePredicate();
    }

    public static ChangePredicate of(final ProductDiscountPredicate predicate) {
        return new ChangePredicate(predicate);
    }

    public String getPredicate() {
        return predicate;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy