Class OrderItem


  • public class OrderItem
    extends Object
    OrderItem
    • Constructor Detail

      • OrderItem

        public OrderItem()
    • Method Detail

      • id

        public OrderItem id​(String id)
        The unique identifier of the product.
        Parameters:
        id - The unique identifier of the product.
        Returns:
        the current OrderItem instance, allowing for method chaining
      • getId

        public String getId()
        The unique identifier of the product.
        Returns:
        id The unique identifier of the product.
      • setId

        public void setId​(String id)
        The unique identifier of the product.
        Parameters:
        id - The unique identifier of the product.
      • installments

        public OrderItem installments​(Long installments)
        The number of installments for the specified product `id`.
        Parameters:
        installments - The number of installments for the specified product `id`.
        Returns:
        the current OrderItem instance, allowing for method chaining
      • getInstallments

        public Long getInstallments()
        The number of installments for the specified product `id`.
        Returns:
        installments The number of installments for the specified product `id`.
      • setInstallments

        public void setInstallments​(Long installments)
        The number of installments for the specified product `id`.
        Parameters:
        installments - The number of installments for the specified product `id`.
      • name

        public OrderItem name​(String name)
        The name of the product.
        Parameters:
        name - The name of the product.
        Returns:
        the current OrderItem instance, allowing for method chaining
      • getName

        public String getName()
        The name of the product.
        Returns:
        name The name of the product.
      • setName

        public void setName​(String name)
        The name of the product.
        Parameters:
        name - The name of the product.
      • quantity

        public OrderItem quantity​(Integer quantity)
        The number of items with the specified product `id` included in the order.
        Parameters:
        quantity - The number of items with the specified product `id` included in the order.
        Returns:
        the current OrderItem instance, allowing for method chaining
      • getQuantity

        public Integer getQuantity()
        The number of items with the specified product `id` included in the order.
        Returns:
        quantity The number of items with the specified product `id` included in the order.
      • setQuantity

        public void setQuantity​(Integer quantity)
        The number of items with the specified product `id` included in the order.
        Parameters:
        quantity - The number of items with the specified product `id` included in the order.
      • includeNullValues

        public OrderItem includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

        public boolean equals​(Object o)
        Return true if this OrderItem object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

        public static OrderItem fromJson​(String jsonString)
                                  throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of OrderItem given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of OrderItem
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to OrderItem
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of OrderItem to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException