public static final class Item.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(java.lang.String title,
java.lang.Integer quantity,
java.math.BigDecimal unitPrice)
Builder for item construction.
|
Modifier and Type | Method and Description |
---|---|
Item |
build()
It creates the item that will be paid.
|
Item.Builder |
setCategoryId(java.lang.String categoryId)
Item category id is an optional value.
|
Item.Builder |
setDescription(java.lang.String description)
You can add an item description with more information.
|
Item.Builder |
setId(java.lang.String id)
Item identification is an optional value.
|
Item.Builder |
setPictureUrl(java.lang.String pictureUrl)
This value represents the URL of the item picture.
|
public Builder(@NonNull java.lang.String title, @NonNull java.lang.Integer quantity, @NonNull java.math.BigDecimal unitPrice)
title
- item titlequantity
- item quantityunitPrice
- item pricepublic Item.Builder setId(@NonNull java.lang.String id)
id
- item identification.public Item.Builder setDescription(@NonNull java.lang.String description)
description
- item description.public Item.Builder setCategoryId(@NonNull java.lang.String categoryId)
categoryId
- item category identification.public Item.Builder setPictureUrl(@NonNull java.lang.String pictureUrl)
pictureUrl
- item picture URL.public Item build()