io.sphere.sdk.productdiscounts.DiscountedPrice Maven / Gradle / Ivy
The newest version!
package io.sphere.sdk.productdiscounts;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.Reference;
import javax.money.MonetaryAmount;
public class DiscountedPrice extends Base {
private final MonetaryAmount value;
private final Reference discount;
@JsonCreator
DiscountedPrice(final MonetaryAmount value, final Reference discount) {
this.value = value;
this.discount = discount;
}
public MonetaryAmount getValue() {
return value;
}
public Reference getDiscount() {
return discount;
}
public static DiscountedPrice of(final MonetaryAmount value, final Reference discount) {
return new DiscountedPrice(value, discount);
}
}