Class ShoppingCartItem.Builder

  • Enclosing class:
    ShoppingCartItem

    public static final class ShoppingCartItem.Builder
    extends Object
    Builder creates instances of ShippingCartItem from values set by the builder's methods.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • category

        public ShoppingCartItem.Builder category​(String category)
        Parameters:
        category - The category of the item.
        Returns:
        The builder object.
      • price

        public ShoppingCartItem.Builder price​(BigDecimal price)
        Parameters:
        price - The per-unit price of the item in the shopping cart. This should use the same currency as the order currency.
        Returns:
        The builder object.
      • price

        public ShoppingCartItem.Builder price​(Double price)
        Parameters:
        price - The price of the item in the shopping cart. This should be the same currency as the order currency.
        Returns:
        The builder object.
      • build

        public ShoppingCartItem build()
        Returns:
        An instance of ShoppingCartItem created from the fields set on this builder.