Class SkuInventoryAvailabilityRequest

java.lang.Object
com.broadleafcommerce.cartoperation.domain.SkuInventoryAvailabilityRequest
All Implemented Interfaces:
Serializable

public class SkuInventoryAvailabilityRequest extends Object implements Serializable
Request to check availability for a SKU with a specified minimum quantity.
Author:
Marie Standeven
See Also:
  • Constructor Details

    • SkuInventoryAvailabilityRequest

      public SkuInventoryAvailabilityRequest()
  • Method Details

    • getSkuCode

      public String getSkuCode()
      The value of the SKU reference. This will be one of SKU contextId, SKU external ID, arbitrary SKU code, UPC, EAN, or GTIN.
    • getReferenceNumber

      public String getReferenceNumber()
      The reference number used to identify any existing soft inventory reservations.

      Existing soft reservations are excluded if this field is passed in. For example, if a SKU has total of 2 available and 1 is reserved for userA, and userA checks inventory availability for a quantity of 2 for the same SKU. The existing soft reservation is excluded from the check in this case, effectively making this request to check for an additional quantity of 1 to be available. However, if userB sends the same request to check availability for a quantity of 2 for the same SKU, it would return unavailable since only 1 is available as the other one is reserved for userA.

    • getQuantityRequested

      public Integer getQuantityRequested()
      Quantity delta that is being requested (i.e. the number to check). These must always be positive numbers.
    • getAdditionalAttributes

      public Map<String,Object> getAdditionalAttributes()
      Map holding any additional attributes passed in the request not matching any defined properties.
    • setSkuCode

      public void setSkuCode(String skuCode)
      The value of the SKU reference. This will be one of SKU contextId, SKU external ID, arbitrary SKU code, UPC, EAN, or GTIN.
    • setReferenceNumber

      public void setReferenceNumber(String referenceNumber)
      The reference number used to identify any existing soft inventory reservations.

      Existing soft reservations are excluded if this field is passed in. For example, if a SKU has total of 2 available and 1 is reserved for userA, and userA checks inventory availability for a quantity of 2 for the same SKU. The existing soft reservation is excluded from the check in this case, effectively making this request to check for an additional quantity of 1 to be available. However, if userB sends the same request to check availability for a quantity of 2 for the same SKU, it would return unavailable since only 1 is available as the other one is reserved for userA.

    • setQuantityRequested

      public void setQuantityRequested(Integer quantityRequested)
      Quantity delta that is being requested (i.e. the number to check). These must always be positive numbers.
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,Object> additionalAttributes)
      Map holding any additional attributes passed in the request not matching any defined properties.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object