public final class LineItemDraftBuilder extends Base
| Modifier and Type | Method and Description |
|---|---|
T |
addedAt(ZonedDateTime addedAt)
Sets the
addedAt property of this builder. |
LineItemDraftDsl |
build()
Creates a new instance of
LineItemDraftDsl with the values of this builder. |
T |
custom(CustomFieldsDraft custom)
Sets the
custom property of this builder. |
LineItemDraftBuilder |
distributionChannel(Referenceable<Channel> distributionChannel) |
T |
distributionChannel(ResourceIdentifier<Channel> distributionChannel)
Sets the
distributionChannel property of this builder. |
T |
externalPrice(javax.money.MonetaryAmount externalPrice)
Sets the
externalPrice property of this builder. |
T |
externalTaxRate(ExternalTaxRateDraft externalTaxRate)
Sets the
externalTaxRate property of this builder. |
T |
externalTotalPrice(ExternalLineItemTotalPrice externalTotalPrice)
Sets the
externalTotalPrice property of this builder. |
ZonedDateTime |
getAddedAt() |
CustomFieldsDraft |
getCustom() |
ResourceIdentifier<Channel> |
getDistributionChannel() |
javax.money.MonetaryAmount |
getExternalPrice() |
ExternalTaxRateDraft |
getExternalTaxRate() |
ExternalLineItemTotalPrice |
getExternalTotalPrice() |
String |
getProductId() |
Long |
getQuantity() |
ItemShippingDetailsDraft |
getShippingDetails() |
String |
getSku() |
ResourceIdentifier<Channel> |
getSupplyChannel() |
Integer |
getVariantId() |
static LineItemDraftBuilder |
of(LineItemDraft template)
Creates a new object initialized with the fields of the template parameter.
|
static LineItemDraftBuilder |
of(String productId,
Integer variantId,
Long quantity,
ResourceIdentifier<Channel> supplyChannel,
ResourceIdentifier<Channel> distributionChannel,
CustomFieldsDraft custom,
ExternalTaxRateDraft externalTaxRate,
javax.money.MonetaryAmount externalPrice,
ExternalLineItemTotalPrice externalTotalPrice)
Creates a new object initialized with the given values.
|
static LineItemDraftBuilder |
ofSku(String sku,
Long quantity)
Creates a new object initialized with the given values.
|
static LineItemDraftBuilder |
ofSkuVariantIdentifier(BySkuVariantIdentifier skuVariantIdentifier,
Long quantity)
Creates a new object initialized with the given values.
|
static LineItemDraftBuilder |
ofVariantIdentifier(ByIdVariantIdentifier variantIdentifier,
Long quantity)
Creates a new object initialized with the given values.
|
T |
productId(String productId)
Sets the
productId property of this builder. |
T |
quantity(Long quantity)
Sets the
quantity property of this builder. |
T |
shippingDetails(ItemShippingDetailsDraft shippingDetails)
Sets the
shippingDetails property of this builder. |
T |
sku(String sku)
Sets the
sku property of this builder. |
LineItemDraftBuilder |
supplyChannel(Referenceable<Channel> supplyChannel) |
T |
supplyChannel(ResourceIdentifier<Channel> supplyChannel)
Sets the
supplyChannel property of this builder. |
T |
variantId(Integer variantId)
Sets the
variantId property of this builder. |
public static LineItemDraftBuilder ofVariantIdentifier(ByIdVariantIdentifier variantIdentifier, @Nullable Long quantity)
variantIdentifier - initial value for the LineItemDraft.getProductId() and LineItemDraft.getVariantId() propertiesquantity - initial value for the LineItemDraft.getQuantity() propertypublic static LineItemDraftBuilder ofSkuVariantIdentifier(BySkuVariantIdentifier skuVariantIdentifier, @Nullable Long quantity)
skuVariantIdentifier - initial value for the LineItemDraft.getSku() propertyquantity - initial value for the LineItemDraft.getQuantity() propertypublic LineItemDraftBuilder distributionChannel(@Nullable Referenceable<Channel> distributionChannel)
public LineItemDraftBuilder supplyChannel(@Nullable Referenceable<Channel> supplyChannel)
public T addedAt(@Nullable ZonedDateTime addedAt)
addedAt property of this builder.addedAt - the value for LineItemDraft.getAddedAt()public T custom(@Nullable CustomFieldsDraft custom)
custom property of this builder.custom - the value for LineItemDraft.getCustom()public T distributionChannel(@Nullable ResourceIdentifier<Channel> distributionChannel)
distributionChannel property of this builder.distributionChannel - the value for LineItemDraft.getDistributionChannel()public T externalPrice(@Nullable javax.money.MonetaryAmount externalPrice)
externalPrice property of this builder.externalPrice - the value for LineItemDraft.getExternalPrice()public T externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate)
externalTaxRate property of this builder.externalTaxRate - the value for LineItemDraft.getExternalTaxRate()public T externalTotalPrice(@Nullable ExternalLineItemTotalPrice externalTotalPrice)
externalTotalPrice property of this builder.externalTotalPrice - the value for LineItemDraft.getExternalTotalPrice()public T productId(String productId)
productId property of this builder.productId - the value for LineItemDraft.getProductId()public T quantity(@Nullable Long quantity)
quantity property of this builder.quantity - the value for LineItemDraft.getQuantity()public T shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails)
shippingDetails property of this builder.shippingDetails - the value for LineItemDraft.getShippingDetails()public T sku(String sku)
sku property of this builder.sku - the value for LineItemDraft.getSku()public T supplyChannel(@Nullable ResourceIdentifier<Channel> supplyChannel)
supplyChannel property of this builder.supplyChannel - the value for LineItemDraft.getSupplyChannel()public T variantId(Integer variantId)
variantId property of this builder.variantId - the value for LineItemDraft.getVariantId()@Nullable public ZonedDateTime getAddedAt()
@Nullable public CustomFieldsDraft getCustom()
@Nullable public ResourceIdentifier<Channel> getDistributionChannel()
@Nullable public javax.money.MonetaryAmount getExternalPrice()
@Nullable public ExternalTaxRateDraft getExternalTaxRate()
@Nullable public ExternalLineItemTotalPrice getExternalTotalPrice()
public String getProductId()
@Nullable public ItemShippingDetailsDraft getShippingDetails()
public String getSku()
@Nullable public ResourceIdentifier<Channel> getSupplyChannel()
public Integer getVariantId()
public LineItemDraftDsl build()
LineItemDraftDsl with the values of this builder.build in interface Builder<LineItemDraftDsl>public static LineItemDraftBuilder ofSku(String sku, @Nullable Long quantity)
sku - initial value for the LineItemDraft.getSku() propertyquantity - initial value for the LineItemDraft.getQuantity() propertypublic static LineItemDraftBuilder of(String productId, Integer variantId, @Nullable Long quantity, @Nullable ResourceIdentifier<Channel> supplyChannel, @Nullable ResourceIdentifier<Channel> distributionChannel, @Nullable CustomFieldsDraft custom, @Nullable ExternalTaxRateDraft externalTaxRate, @Nullable javax.money.MonetaryAmount externalPrice, @Nullable ExternalLineItemTotalPrice externalTotalPrice)
productId - initial value for the LineItemDraft.getProductId() propertyvariantId - initial value for the LineItemDraft.getVariantId() propertyquantity - initial value for the LineItemDraft.getQuantity() propertysupplyChannel - initial value for the LineItemDraft.getSupplyChannel() propertydistributionChannel - initial value for the LineItemDraft.getDistributionChannel() propertycustom - initial value for the LineItemDraft.getCustom() propertyexternalTaxRate - initial value for the LineItemDraft.getExternalTaxRate() propertyexternalPrice - initial value for the LineItemDraft.getExternalPrice() propertyexternalTotalPrice - initial value for the LineItemDraft.getExternalTotalPrice() propertypublic static LineItemDraftBuilder of(LineItemDraft template)
template - the template