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

io.sphere.sdk.productdiscounts.DiscountedPrice Maven / Gradle / Ivy

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy