/**
* 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.shippingruntime;
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.shippingruntime.ShippingRateLocalizedContent;
import com.mozu.api.contracts.shippingruntime.CustomAttribute;
import com.mozu.api.contracts.shippingruntime.ShippingRateValidationMessage;
import com.mozu.api.contracts.shippingruntime.ShippingItemRate;
/**
* Properties of a shipping rate calculated for a specified carrier.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ShippingRate implements Serializable
{
// Default Serial Version UID
private static final long serialVersionUID = 1L;
/**
* The total calculated shipping amount requested for the package or shipment.
*/
protected Double amount;
public Double getAmount() {
return this.amount;
}
public void setAmount(Double amount) {
this.amount = amount;
}
/**
* The carrier-defined alphanumeric code associated with this shipping rate.
*/
protected String code;
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
/**
* The number of days the shipment will spend between the origin address and the destination address.
*/
protected Integer daysInTransit;
public Integer getDaysInTransit() {
return this.daysInTransit;
}
public void setDaysInTransit(Integer daysInTransit) {
this.daysInTransit = daysInTransit;
}
/**
* Localizable content (such as a name and/or description) for an attribute. The content may be localized when displayed according to the locale code specified by the master catalog. Content can include descriptive text for product extensible attributes, catalog-level descriptions (displayed if isContentOverriden is true), product bundles, and customer account notes.
*/
protected ShippingRateLocalizedContent content;
public ShippingRateLocalizedContent getContent() {
return this.content;
}
public void setContent(ShippingRateLocalizedContent content) {
this.content = content;
}
/**
* Collection of carrier-specific key-value attribute pairs associated with a shipping carrier. These are required to retrieve a shipping rate request and are returned for the generated shipping label.
*/
protected List<CustomAttribute> customAttributes;
public List<CustomAttribute> getCustomAttributes() {
return this.customAttributes;
}
public void setCustomAttributes(List<CustomAttribute> customAttributes) {
this.customAttributes = customAttributes;
}
/**
* Shipping rate data.
*/
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;
}
/**
* Array list of validation and status messages associated with shipping rates, orders, and product purchasable state.
*/
protected List<ShippingRateValidationMessage> messages;
public List<ShippingRateValidationMessage> getMessages() {
return this.messages;
}
public void setMessages(List<ShippingRateValidationMessage> messages) {
this.messages = messages;
}
/**
* Properties of a calculated shipping rate for individual line items in a shipment.
*/
protected List<ShippingItemRate> shippingItemRates;
public List<ShippingItemRate> getShippingItemRates() {
return this.shippingItemRates;
}
public void setShippingItemRates(List<ShippingItemRate> shippingItemRates) {
this.shippingItemRates = shippingItemRates;
}
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);
}
}
}