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

io.sphere.sdk.carts.TaxPortion Maven / Gradle / Ivy

package io.sphere.sdk.carts;

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

import javax.money.MonetaryAmount;

public class TaxPortion extends Base {
    private final Double rate;
    private final MonetaryAmount amount;

    @JsonCreator
    private TaxPortion(final Double rate, final MonetaryAmount amount) {
        this.rate = rate;
        this.amount = amount;
    }

    public static TaxPortion of(final double rate, final MonetaryAmount amount) {
        return new TaxPortion(rate, amount);
    }

    public Double getRate() {
        return rate;
    }

    public MonetaryAmount getAmount() {
        return amount;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy