/** * This code was auto-generated by a Codezu. * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. */ package com.mozu.api.contracts.pricingruntime; import java.util.List; import java.util.HashMap; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.joda.time.DateTime; import java.io.IOException; import java.lang.ClassNotFoundException; import com.mozu.api.contracts.pricingruntime.ProductProperty; /** * Properties of a line item in an order that is subject to tax. */ @JsonIgnoreProperties(ignoreUnknown = true) public class TaxableLineItem implements Serializable { // Default Serial Version UID private static final long serialVersionUID = 1L; /** * Unique identifier of the source product property. For a product field it will be the name of the field. For a product attribute it will be the Attribute FQN. */ protected String id; public String getId() { return this.id; } public void setId(String id) { this.id = id; } /** * Indicates if the item is subject to taxation, used by products, options, extras, cart and order items, line items, and wish lists. If true, the entity is subject to tax based on the relevant tax rate and rules. */ protected Boolean isTaxable; public Boolean getIsTaxable() { return this.isTaxable; } public void setIsTaxable(Boolean isTaxable) { this.isTaxable = isTaxable; } /** * The sale price of the line item in the order. */ protected Double lineItemPrice; public Double getLineItemPrice() { return this.lineItemPrice; } public void setLineItemPrice(Double lineItemPrice) { this.lineItemPrice = lineItemPrice; } /** * Merchant-created code that uniquely identifies the product such as a SKU or item number. Once created, the product code is read-only. */ protected String productCode; public String getProductCode() { return this.productCode; } public void setProductCode(String productCode) { this.productCode = productCode; } /** * The name of the product that represents a line item in a taxable order or product bundle. */ protected String productName; public String getProductName() { return this.productName; } public void setProductName(String productName) { this.productName = productName; } /** * The specified quantity of objects and items. This property is used for numerous object types including products, options, components within a product bundle, cart and order items, returned items, shipping line items, items in a digital product. and items associated with types and reservations. */ protected Integer quantity; public Integer getQuantity() { return this.quantity; } public void setQuantity(Integer quantity) { this.quantity = quantity; } /** * The reason description for an action, including item return, coupon not valid, and item is taxed. */ protected String reason; public String getReason() { return this.reason; } public void setReason(String reason) { this.reason = reason; } /** * The calculated monetary amount of shipping for a line items within and an entire order. */ protected Double shippingAmount; public Double getShippingAmount() { return this.shippingAmount; } public void setShippingAmount(Double shippingAmount) { this.shippingAmount = shippingAmount; } /** * For configurable products, the unique identifier of the product variation that has been selected. */ protected String variantProductCode; public String getVariantProductCode() { return this.variantProductCode; } public void setVariantProductCode(String variantProductCode) { this.variantProductCode = variantProductCode; } protected transient com.fasterxml.jackson.databind.JsonNode data; public com.fasterxml.jackson.databind.JsonNode getData() { return this.data; } public void setData(com.fasterxml.jackson.databind.JsonNode data) { this.data = data; } /** * Properties of the product that represents the line item in the order. */ protected List<ProductProperty> productProperties; public List<ProductProperty> getProductProperties() { return this.productProperties; } public void setProductProperties(List<ProductProperty> productProperties) { this.productProperties = productProperties; } private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.defaultWriteObject(); if(data == null){ out.writeBoolean(false); } else { out.writeBoolean(true); new com.fasterxml.jackson.databind.ObjectMapper().configure(com.fasterxml.jackson.core.JsonGenerator.Feature.AUTO_CLOSE_TARGET, false).writeValue(out, data); } } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if(in.readBoolean()){ this.data = new com.fasterxml.jackson.databind.ObjectMapper().configure(com.fasterxml.jackson.core.JsonParser.Feature.AUTO_CLOSE_SOURCE, false).readValue(in, com.fasterxml.jackson.databind.JsonNode.class); } } }