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