
io.sphere.client.shop.model.TaxedPrice Maven / Gradle / Ivy
package io.sphere.client.shop.model;
import io.sphere.client.model.Money;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
/** The cart price with product tax rates applied. */
public class TaxedPrice {
@Nonnull private Money totalNet;
@Nonnull private Money totalGross;
@Nonnull private List taxPortions = new ArrayList();
// for JSON deserializer
private TaxedPrice() {}
/** The total net price (total price excluding tax). */
@Nonnull public Money getTotalNet() { return totalNet; }
/** The total gross price (total price including tax). */
@Nonnull public Money getTotalGross() { return totalGross; }
/** The portions for individual tax rates.
* The following always holds: {@code totalNet + sum(tax portions) = totalGross}. */
@Nonnull public List getTaxPortions() { return taxPortions; }
@Override
public String toString() {
return "TaxedPrice{" +
"totalNet=" + totalNet +
", totalGross=" + totalGross +
", taxPortions=" + taxPortions +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy