io.sphere.sdk.cartdiscounts.AbsoluteCartDiscountValue Maven / Gradle / Ivy
package io.sphere.sdk.cartdiscounts;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.Base;
import javax.money.MonetaryAmount;
import java.util.Collections;
import java.util.List;
public class AbsoluteCartDiscountValue extends Base implements CartDiscountValue {
private final List money;
@JsonCreator
private AbsoluteCartDiscountValue(final List money) {
this.money = money;
}
public List getMoney() {
return money;
}
public static AbsoluteCartDiscountValue of(final MonetaryAmount money) {
return of(Collections.singletonList(money));
}
public static AbsoluteCartDiscountValue of(final List money) {
return new AbsoluteCartDiscountValue(money);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy