Class ShoppingListLineItemDraftBuilder
- All Implemented Interfaces:
Builder<ShoppingListLineItemDraft>
Example to create an instance using the builder pattern
ShoppingListLineItemDraft shoppingListLineItemDraft = ShoppingListLineItemDraft.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddedAt
(ZonedDateTime addedAt) Date and time the ShoppingListLineItem is added to the ShoppingList.build()
builds ShoppingListLineItemDraft with checking for non-null required valuesbuilds ShoppingListLineItemDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields of the ShoppingListLineItem.Custom Fields of the ShoppingListLineItem.Date and time the ShoppingListLineItem is added to the ShoppingList.Custom Fields of the ShoppingListLineItem.getKey()
User-defined identifier of the ShoppingListLineItem.Unique identifier of a Product.Number of Products in the ShoppingListLineItem.getSku()
sku
of the ProductVariant.id
of the ProductVariant.User-defined identifier of the ShoppingListLineItem.of()
factory method for an instance of ShoppingListLineItemDraftBuilderof
(ShoppingListLineItemDraft template) create builder for ShoppingListLineItemDraft instanceUnique identifier of a Product.Number of Products in the ShoppingListLineItem.sku
of the ProductVariant.id
of the ProductVariant.Custom Fields of the ShoppingListLineItem.
-
Constructor Details
-
ShoppingListLineItemDraftBuilder
public ShoppingListLineItemDraftBuilder()
-
-
Method Details
-
key
User-defined identifier of the ShoppingListLineItem. Must be unique per ShoppingList.
- Parameters:
key
- value to be set- Returns:
- Builder
-
productId
Unique identifier of a Product.
- Parameters:
productId
- value to be set- Returns:
- Builder
-
variantId
id
of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.- Parameters:
variantId
- value to be set- Returns:
- Builder
-
sku
sku
of the ProductVariant.- Parameters:
sku
- value to be set- Returns:
- Builder
-
addedAt
Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.
- Parameters:
addedAt
- value to be set- Returns:
- Builder
-
custom
public ShoppingListLineItemDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields of the ShoppingListLineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public ShoppingListLineItemDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields of the ShoppingListLineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the ShoppingListLineItem.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
quantity
Number of Products in the ShoppingListLineItem.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getKey
User-defined identifier of the ShoppingListLineItem. Must be unique per ShoppingList.
- Returns:
- key
-
getProductId
Unique identifier of a Product.
- Returns:
- productId
-
getVariantId
id
of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.- Returns:
- variantId
-
getSku
sku
of the ProductVariant.- Returns:
- sku
-
getAddedAt
Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.
- Returns:
- addedAt
-
getCustom
Custom Fields of the ShoppingListLineItem.
- Returns:
- custom
-
getQuantity
Number of Products in the ShoppingListLineItem.
- Returns:
- quantity
-
build
builds ShoppingListLineItemDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ShoppingListLineItemDraft>
- Returns:
- ShoppingListLineItemDraft
-
buildUnchecked
builds ShoppingListLineItemDraft without checking for non-null required values- Returns:
- ShoppingListLineItemDraft
-
of
factory method for an instance of ShoppingListLineItemDraftBuilder- Returns:
- builder
-
of
create builder for ShoppingListLineItemDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-