Class MyCartAddLineItemActionBuilder
- All Implemented Interfaces:
Builder<MyCartAddLineItemAction>
Example to create an instance using the builder pattern
MyCartAddLineItemAction myCartAddLineItemAction = MyCartAddLineItemAction.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddedAt(ZonedDateTime addedAt) Date and time (UTC) the Line Item was added to the Cart.build()builds MyCartAddLineItemAction with checking for non-null required valuesbuilds MyCartAddLineItemAction without checking for non-null required valuescustom(CustomFieldsDraft custom) Custom Fields for the Line Item.Custom Fields for the Line Item.distributionChannel(ChannelResourceIdentifier distributionChannel) Used to select a Product Price.distributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) Used to select a Product Price.Date and time (UTC) the Line Item was added to the Cart.Custom Fields for the Line Item.Used to select a Product Price.getKey()User-defined unique identifier of the LineItem.idof the Product.Number of Line Items to add to the Cart.Recurring Order and frequency data.Container for Line Item-specific addresses.getSku()skuof the ProductVariant.Used to identify Inventory entries that must be reserved.idof the ProductVariant in the Product.User-defined unique identifier of the LineItem.of()factory method for an instance of MyCartAddLineItemActionBuilderof(MyCartAddLineItemAction template) create builder for MyCartAddLineItemAction instanceidof the Product.Number of Line Items to add to the Cart.recurrenceInfo(LineItemRecurrenceInfoDraft recurrenceInfo) Recurring Order and frequency data.recurrenceInfo(Function<LineItemRecurrenceInfoDraftBuilder, LineItemRecurrenceInfoDraftBuilder> builder) Recurring Order and frequency data.shippingDetails(ItemShippingDetailsDraft shippingDetails) Container for Line Item-specific addresses.Container for Line Item-specific addresses.skuof the ProductVariant.supplyChannel(ChannelResourceIdentifier supplyChannel) Used to identify Inventory entries that must be reserved.Used to identify Inventory entries that must be reserved.idof the ProductVariant in the Product.Custom Fields for the Line Item.withDistributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) Used to select a Product Price.withRecurrenceInfo(Function<LineItemRecurrenceInfoDraftBuilder, LineItemRecurrenceInfoDraft> builder) Recurring Order and frequency data.Container for Line Item-specific addresses.Used to identify Inventory entries that must be reserved.
-
Constructor Details
-
MyCartAddLineItemActionBuilder
public MyCartAddLineItemActionBuilder()
-
-
Method Details
-
key
User-defined unique identifier of the LineItem.
- Parameters:
key- value to be set- Returns:
- Builder
-
productId
idof the Product.Either the
productIdandvariantId, orskumust be provided.- Parameters:
productId- value to be set- Returns:
- Builder
-
variantId
idof the ProductVariant in the Product.If not given, the Master Variant is used.
Either the
productIdandvariantId, orskumust be provided.- Parameters:
variantId- value to be set- Returns:
- Builder
-
sku
skuof the ProductVariant.Either the
productIdandvariantId, orskumust be provided.- Parameters:
sku- value to be set- Returns:
- Builder
-
quantity
Number of Line Items to add to the Cart.
- Parameters:
quantity- value to be set- Returns:
- Builder
-
addedAt
Date and time (UTC) the Line Item was added to the Cart. If not set, it defaults to the current date and time.
Optional for backwards compatibility reasons.
- Parameters:
addedAt- value to be set- Returns:
- Builder
-
distributionChannel
public MyCartAddLineItemActionBuilder distributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) Used to select a Product Price. The Channel must have the
ProductDistributionChannelRoleEnum. If the Cart is bound to a Store withdistributionChannelsset, the Channel must match one of the Store's distribution channels.- Parameters:
builder- function to build the distributionChannel value- Returns:
- Builder
-
withDistributionChannel
public MyCartAddLineItemActionBuilder withDistributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) Used to select a Product Price. The Channel must have the
ProductDistributionChannelRoleEnum. If the Cart is bound to a Store withdistributionChannelsset, the Channel must match one of the Store's distribution channels.- Parameters:
builder- function to build the distributionChannel value- Returns:
- Builder
-
distributionChannel
public MyCartAddLineItemActionBuilder distributionChannel(@Nullable ChannelResourceIdentifier distributionChannel) Used to select a Product Price. The Channel must have the
ProductDistributionChannelRoleEnum. If the Cart is bound to a Store withdistributionChannelsset, the Channel must match one of the Store's distribution channels.- Parameters:
distributionChannel- value to be set- Returns:
- Builder
-
supplyChannel
public MyCartAddLineItemActionBuilder supplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupplyChannelRoleEnum.- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public MyCartAddLineItemActionBuilder withSupplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupplyChannelRoleEnum.- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
public MyCartAddLineItemActionBuilder supplyChannel(@Nullable ChannelResourceIdentifier supplyChannel) Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupplyChannelRoleEnum.- Parameters:
supplyChannel- value to be set- Returns:
- Builder
-
shippingDetails
public MyCartAddLineItemActionBuilder shippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Container for Line Item-specific addresses.
- Parameters:
builder- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public MyCartAddLineItemActionBuilder withShippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Container for Line Item-specific addresses.
- Parameters:
builder- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
public MyCartAddLineItemActionBuilder shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails) Container for Line Item-specific addresses.
- Parameters:
shippingDetails- value to be set- Returns:
- Builder
-
recurrenceInfo
public MyCartAddLineItemActionBuilder recurrenceInfo(Function<LineItemRecurrenceInfoDraftBuilder, LineItemRecurrenceInfoDraftBuilder> builder) Recurring Order and frequency data.
- Parameters:
builder- function to build the recurrenceInfo value- Returns:
- Builder
-
withRecurrenceInfo
public MyCartAddLineItemActionBuilder withRecurrenceInfo(Function<LineItemRecurrenceInfoDraftBuilder, LineItemRecurrenceInfoDraft> builder) Recurring Order and frequency data.
- Parameters:
builder- function to build the recurrenceInfo value- Returns:
- Builder
-
recurrenceInfo
public MyCartAddLineItemActionBuilder recurrenceInfo(@Nullable LineItemRecurrenceInfoDraft recurrenceInfo) Recurring Order and frequency data.
- Parameters:
recurrenceInfo- value to be set- Returns:
- Builder
-
custom
public MyCartAddLineItemActionBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Line Item.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
public MyCartAddLineItemActionBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Line Item.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Line Item.
- Parameters:
custom- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier of the LineItem.
- Returns:
- key
-
getProductId
idof the Product.Either the
productIdandvariantId, orskumust be provided.- Returns:
- productId
-
getVariantId
idof the ProductVariant in the Product.If not given, the Master Variant is used.
Either the
productIdandvariantId, orskumust be provided.- Returns:
- variantId
-
getSku
skuof the ProductVariant.Either the
productIdandvariantId, orskumust be provided.- Returns:
- sku
-
getQuantity
Number of Line Items to add to the Cart.
- Returns:
- quantity
-
getAddedAt
Date and time (UTC) the Line Item was added to the Cart. If not set, it defaults to the current date and time.
Optional for backwards compatibility reasons.
- Returns:
- addedAt
-
getDistributionChannel
Used to select a Product Price. The Channel must have the
ProductDistributionChannelRoleEnum. If the Cart is bound to a Store withdistributionChannelsset, the Channel must match one of the Store's distribution channels.- Returns:
- distributionChannel
-
getSupplyChannel
Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupplyChannelRoleEnum.- Returns:
- supplyChannel
-
getShippingDetails
Container for Line Item-specific addresses.
- Returns:
- shippingDetails
-
getRecurrenceInfo
Recurring Order and frequency data.
- Returns:
- recurrenceInfo
-
getCustom
Custom Fields for the Line Item.
- Returns:
- custom
-
build
builds MyCartAddLineItemAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<MyCartAddLineItemAction>- Returns:
- MyCartAddLineItemAction
-
buildUnchecked
builds MyCartAddLineItemAction without checking for non-null required values- Returns:
- MyCartAddLineItemAction
-
of
factory method for an instance of MyCartAddLineItemActionBuilder- Returns:
- builder
-
of
create builder for MyCartAddLineItemAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-