Class MyShoppingListAddLineItemActionBuilder
- All Implemented Interfaces:
Builder<MyShoppingListAddLineItemAction>
Example to create an instance using the builder pattern
MyShoppingListAddLineItemAction myShoppingListAddLineItemAction = MyShoppingListAddLineItemAction.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddedAt(ZonedDateTime addedAt) Date and time the TextLineItem is added to the ShoppingList.build()builds MyShoppingListAddLineItemAction with checking for non-null required valuesbuilds MyShoppingListAddLineItemAction 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 TextLineItem 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 MyShoppingListAddLineItemActionBuilderof(MyShoppingListAddLineItemAction template) create builder for MyShoppingListAddLineItemAction 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
-
MyShoppingListAddLineItemActionBuilder
public MyShoppingListAddLineItemActionBuilder()
-
-
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 TextLineItem 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 MyShoppingListAddLineItemActionBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields defined for the ShoppingListLineItem.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
public MyShoppingListAddLineItemActionBuilder 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 TextLineItem 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 MyShoppingListAddLineItemAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<MyShoppingListAddLineItemAction>- Returns:
- MyShoppingListAddLineItemAction
-
buildUnchecked
builds MyShoppingListAddLineItemAction without checking for non-null required values- Returns:
- MyShoppingListAddLineItemAction
-
of
factory method for an instance of MyShoppingListAddLineItemActionBuilder- Returns:
- builder
-
of
create builder for MyShoppingListAddLineItemAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-