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. |
LineItemDraftBuilder |
custom(CustomFields custom)
Deprecated.
This method will be removed be removed with the next major SDK update.
Please use the
custom(CustomFieldsDraft) method instead. |
T |
custom(CustomFieldsDraft custom)
Sets the
custom property of this builder. |
ZonedDateTime |
getAddedAt() |
CustomFieldsDraft |
getCustom() |
String |
getProductId() |
Long |
getQuantity() |
String |
getSku() |
Integer |
getVariantId() |
static LineItemDraftBuilder |
of(LineItemDraft template)
Creates a new object initialized with the fields of the template parameter.
|
static LineItemDraftBuilder |
of(String productId)
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 |
sku(String sku)
Sets the
sku property of this builder. |
T |
variantId(Integer variantId)
Sets the
variantId property of this builder. |
@Deprecated public LineItemDraftBuilder custom(@Nullable CustomFields custom)
custom(CustomFieldsDraft) method instead.custom property of this builder.custom - the value for LineItemDraft.getCustom()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 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 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 sku(String sku)
sku property of this builder.sku - the value for LineItemDraft.getSku()public T variantId(@Nullable Integer variantId)
variantId property of this builder.variantId - the value for LineItemDraft.getVariantId()@Nullable public ZonedDateTime getAddedAt()
@Nullable public CustomFieldsDraft getCustom()
public String getProductId()
public String getSku()
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)
productId - initial value for the LineItemDraft.getProductId() propertypublic static LineItemDraftBuilder of(LineItemDraft template)
template - the template