/** * 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.commerceruntime.carts; 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.core.AuditInfo; import com.mozu.api.contracts.commerceruntime.carts.CartMessage; import com.mozu.api.contracts.commerceruntime.commerce.ChangeMessage; import com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty; import com.mozu.api.contracts.commerceruntime.fulfillment.FulfillmentInfo; import com.mozu.api.contracts.commerceruntime.discounts.InvalidCoupon; import com.mozu.api.contracts.commerceruntime.carts.CartItem; import com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount; /** * Properties of a shopping cart. */ @JsonIgnoreProperties(ignoreUnknown = true) public class Cart implements Serializable { // Default Serial Version UID private static final long serialVersionUID = 1L; /** * Code that identifies the channel associated with the site for the shopper's created shopping cart, order, and return. */ protected String channelCode; public String getChannelCode() { return this.channelCode; } public void setChannelCode(String channelCode) { this.channelCode = channelCode; } /** * Array list of coupon codes associated with a shopping cart and the associated order. These codes are entered by a shopper when proceeding to checkout. */ protected List<String> couponCodes; public List<String> getCouponCodes() { return this.couponCodes; } public void setCouponCodes(List<String> couponCodes) { this.couponCodes = couponCodes; } /** * 3-letter ISO 4217 standard global currency code. Currently, only "USD" (US Dollar) is supported. */ protected String currencyCode; public String getCurrencyCode() { return this.currencyCode; } public void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } /** * The type of customer interaction used to create this shopping cart. Possible values are Website, Call, Store, or Unknown. */ protected String customerInteractionType; public String getCustomerInteractionType() { return this.customerInteractionType; } public void setCustomerInteractionType(String customerInteractionType) { this.customerInteractionType = customerInteractionType; } /** * The aggregate total for all items in the cart, including costs associated with shopper-defined options or extras and any applied discounts. */ protected Double discountedSubtotal; public Double getDiscountedSubtotal() { return this.discountedSubtotal; } public void setDiscountedSubtotal(Double discountedSubtotal) { this.discountedSubtotal = discountedSubtotal; } /** * The subtotal of the cart, order, and wishlist items, including any applied discount calculations. Wishlist subtotals may change depending on the length of time, available discounts, and stock amounts of products at the time of review by shoppers. */ protected Double discountedTotal; public Double getDiscountedTotal() { return this.discountedTotal; } public void setDiscountedTotal(Double discountedTotal) { this.discountedTotal = discountedTotal; } /** * Estimated amount of discounts applied to all items in the carts and orders. System-supplied and read-only. This value will be available at the wish list, cart item, order item, and wish list item level at a later time. */ protected Double discountTotal; public Double getDiscountTotal() { return this.discountTotal; } public void setDiscountTotal(Double discountTotal) { this.discountTotal = discountTotal; } /** * Date and time in UTC format when a discount, credit, wish list, or cart expires. An expired discount no longer can be redeemed. An expired wish list is no longer available. An expired credit can no longer be redeemed for a purchase. Acart becomes inactive and expired based on a system-calculated interval. For example, if an anonymous shopper has 14 days of inactivity, the cart is considered abandoned after that period of inactivity. System-supplied and read-only. */ protected DateTime expirationDate; public DateTime getExpirationDate() { return this.expirationDate; } public void setExpirationDate(DateTime expirationDate) { this.expirationDate = expirationDate; } /** * The monetary sum of all fees incurred in the cart, order, line item in a cart, or line item in an order. This value is not calculated for wish lists at this time. */ protected Double feeTotal; public Double getFeeTotal() { return this.feeTotal; } public void setFeeTotal(Double feeTotal) { this.feeTotal = feeTotal; } /** * Calculated total tax amount for handling costs if the cart/order is subject to sales tax. */ protected Double handlingTaxTotal; public Double getHandlingTaxTotal() { return this.handlingTaxTotal; } public void setHandlingTaxTotal(Double handlingTaxTotal) { this.handlingTaxTotal = handlingTaxTotal; } /** * 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; } /** * The total amount of calculated tax for items, used by carts, orders, and wish lists. */ protected Double itemTaxTotal; public Double getItemTaxTotal() { return this.itemTaxTotal; } public void setItemTaxTotal(Double itemTaxTotal) { this.itemTaxTotal = itemTaxTotal; } /** * The date in UTC Date/Time when the items in the cart were last validated against the site's product catalog. System-supplied and read-only. */ protected DateTime lastValidationDate; public DateTime getLastValidationDate() { return this.lastValidationDate; } public void setLastValidationDate(DateTime lastValidationDate) { this.lastValidationDate = lastValidationDate; } protected Double lineItemSubtotalWithOrderAdjustments; public Double getLineItemSubtotalWithOrderAdjustments() { return this.lineItemSubtotalWithOrderAdjustments; } public void setLineItemSubtotalWithOrderAdjustments(Double lineItemSubtotalWithOrderAdjustments) { this.lineItemSubtotalWithOrderAdjustments = lineItemSubtotalWithOrderAdjustments; } /** * Pricelist code */ protected String priceListCode; public String getPriceListCode() { return this.priceListCode; } public void setPriceListCode(String priceListCode) { this.priceListCode = priceListCode; } protected Double shippingAmountBeforeDiscountsAndAdjustments; public Double getShippingAmountBeforeDiscountsAndAdjustments() { return this.shippingAmountBeforeDiscountsAndAdjustments; } public void setShippingAmountBeforeDiscountsAndAdjustments(Double shippingAmountBeforeDiscountsAndAdjustments) { this.shippingAmountBeforeDiscountsAndAdjustments = shippingAmountBeforeDiscountsAndAdjustments; } /** * The shipping subtotal amount calculated without any applied discounts for line item and entire amounts of carts and orders. This property is not calculated for wish lists at this time. */ protected Double shippingSubTotal; public Double getShippingSubTotal() { return this.shippingSubTotal; } public void setShippingSubTotal(Double shippingSubTotal) { this.shippingSubTotal = shippingSubTotal; } /** * The total amount of tax incurred on the shipping charges in the cart and order. This property is not calculated at this time for wish lists. */ protected Double shippingTaxTotal; public Double getShippingTaxTotal() { return this.shippingTaxTotal; } public void setShippingTaxTotal(Double shippingTaxTotal) { this.shippingTaxTotal = shippingTaxTotal; } /** * The calculated total shipping amount estimated for carts or orders, including tax. This amount is not calculated for wish lists at this time. */ protected Double shippingTotal; public Double getShippingTotal() { return this.shippingTotal; } public void setShippingTotal(Double shippingTotal) { this.shippingTotal = shippingTotal; } /** * Unique identifier of the site. */ protected Integer siteId; public Integer getSiteId() { return this.siteId; } public void setSiteId(Integer siteId) { this.siteId = siteId; } /** * Estimated amount of the cart or order without sales tax, shipping costs, and other fees. This amount is not calculated for wish lists at this time. */ protected Double subtotal; public Double getSubtotal() { return this.subtotal; } public void setSubtotal(Double subtotal) { this.subtotal = subtotal; } /** * The total monetary sum of sales tax estimated for a cart or order. */ protected Double taxTotal; public Double getTaxTotal() { return this.taxTotal; } public void setTaxTotal(Double taxTotal) { this.taxTotal = taxTotal; } /** * Unique identifier of the Mozu tenant. */ protected Integer tenantId; public Integer getTenantId() { return this.tenantId; } public void setTenantId(Integer tenantId) { this.tenantId = tenantId; } /** * Total is used to indicate the monetary, estimated total amount of the cart or order, including items, sales tax, shipping costs, and other fees. Totals are not estimated for wish lists at this time. */ protected Double total; public Double getTotal() { return this.total; } public void setTotal(Double total) { this.total = total; } /** * Unique identifier of the customer account (shopper or system user). System-supplied and read-only. If the shopper user is anonymous, the user ID represents a system-generated user ID string. */ protected String userId; public String getUserId() { return this.userId; } public void setUserId(String userId) { this.userId = userId; } /** * Unique identifier of the customer visit in which the cart was created or last modified. */ protected String visitId; public String getVisitId() { return this.visitId; } public void setVisitId(String visitId) { this.visitId = visitId; } /** * Unique identifier of the web session in which the cart, order, return, or wish list was created or last modified. */ protected String webSessionId; public String getWebSessionId() { return this.webSessionId; } public void setWebSessionId(String webSessionId) { this.webSessionId = webSessionId; } /** * Identifier and datetime stamp information recorded when a user or application creates, updates, or deletes a resource entity. This value is system-supplied and read-only. */ protected AuditInfo auditInfo; public AuditInfo getAuditInfo() { return this.auditInfo; } public void setAuditInfo(AuditInfo auditInfo) { this.auditInfo = auditInfo; } /** * Mozu.CommerceRuntime.Contracts.Carts.Cart cartMessage ApiTypeMember DOCUMENT_HERE */ protected CartMessage cartMessage; public CartMessage getCartMessage() { return this.cartMessage; } public void setCartMessage(CartMessage cartMessage) { this.cartMessage = cartMessage; } protected List<CartMessage> cartMessages; public List<CartMessage> getCartMessages() { return this.cartMessages; } public void setCartMessages(List<CartMessage> cartMessages) { this.cartMessages = cartMessages; } /** * Collection (list or paged) of change messages logged for each modification made by a shopper to their carts, wishlists, orders, package, payment, pickup, and returns. Change log messages are system-supplied based on shopper actions and read only. */ protected List<ChangeMessage> changeMessages; public List<ChangeMessage> getChangeMessages() { return this.changeMessages; } public void setChangeMessages(List<ChangeMessage> changeMessages) { this.changeMessages = changeMessages; } /** * Custom data for a given vendor set within the commerce process. */ 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; } /** * Extra properties (key-value pairs) that extend the primary object. Think of this as a property bag of string keys and string values. */ protected List<ExtendedProperty> extendedProperties; public List<ExtendedProperty> getExtendedProperties() { return this.extendedProperties; } public void setExtendedProperties(List<ExtendedProperty> extendedProperties) { this.extendedProperties = extendedProperties; } /** * Properties of the information required to fulfill the cart, order, or wish list. Shoppers can fulfill ordered items by using in-store pickup or direct shipping. */ protected FulfillmentInfo fulfillmentInfo; public FulfillmentInfo getFulfillmentInfo() { return this.fulfillmentInfo; } public void setFulfillmentInfo(FulfillmentInfo fulfillmentInfo) { this.fulfillmentInfo = fulfillmentInfo; } /** * The list of invalid coupons the shopper attempted to enter for the cart or order. These coupons may no longer be valid or incorrectly entered. */ protected List<InvalidCoupon> invalidCoupons; public List<InvalidCoupon> getInvalidCoupons() { return this.invalidCoupons; } public void setInvalidCoupons(List<InvalidCoupon> invalidCoupons) { this.invalidCoupons = invalidCoupons; } /** * An array list of objects in the returned collection. */ protected List<CartItem> items; public List<CartItem> getItems() { return this.items; } public void setItems(List<CartItem> items) { this.items = items; } /** * List of order-level discounts projected to apply to the cart at checkout or order. */ protected List<AppliedDiscount> orderDiscounts; public List<AppliedDiscount> getOrderDiscounts() { return this.orderDiscounts; } public void setOrderDiscounts(List<AppliedDiscount> orderDiscounts) { this.orderDiscounts = orderDiscounts; } 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); } } }