public final class ShippingMethodDraftBuilder extends Base
Modifier and Type | Method and Description |
---|---|
T |
_default(Boolean _default)
Sets the
default property of this builder. |
ShippingMethodDraftDsl |
build()
Creates a new instance of
ShippingMethodDraftDsl with the values of this builder. |
T |
custom(CustomFieldsDraft custom)
Sets the
custom property of this builder. |
T |
description(String description)
Deprecated.
This method will be removed with the next major SDK update.
|
CustomFieldsDraft |
getCustom() |
String |
getDescription()
Deprecated.
This method will be removed with the next major SDK update.
|
String |
getKey() |
LocalizedString |
getLocalizedDescription() |
LocalizedString |
getLocalizedName() |
String |
getName() |
String |
getPredicate() |
ResourceIdentifier<TaxCategory> |
getTaxCategory() |
List<ZoneRateDraft> |
getZoneRates() |
Boolean |
isDefault() |
T |
isDefault(Boolean _default)
Sets the
default property of this builder. |
T |
key(String key)
Sets the
key property of this builder. |
T |
localizedDescription(LocalizedString localizedDescription)
Sets the
localizedDescription property of this builder. |
T |
localizedName(LocalizedString localizedName)
Sets the
localizedName property of this builder. |
T |
name(String name)
Sets the
name property of this builder. |
static ShippingMethodDraftBuilder |
of(ShippingMethodDraft template)
Creates a new object initialized with the fields of the template parameter.
|
static ShippingMethodDraftBuilder |
of(String name,
LocalizedString localizedDescription,
ResourceIdentifier<TaxCategory> taxCategory,
List<ZoneRateDraft> zoneRates,
Boolean _default)
Creates a new object initialized with the given values.
|
static ShippingMethodDraftBuilder |
of(String name,
ResourceIdentifier<TaxCategory> taxCategory,
List<ZoneRateDraft> zoneRates,
Boolean _default)
Creates a new object initialized with the given values.
|
static ShippingMethodDraftBuilder |
of(String name,
String description,
ResourceIdentifier<TaxCategory> taxCategory,
List<ZoneRateDraft> zoneRates,
Boolean _default)
Creates a new object initialized with the given values.
|
T |
plusZoneRates(List<ZoneRateDraft> zoneRates)
Concatenate
zoneRates parameter to the zoneRates list property of this builder. |
T |
plusZoneRates(ZoneRateDraft zoneRates)
Adds
zoneRates parameter to the zoneRates list property of this builder. |
ShippingMethodDraftBuilder |
predicate(CartPredicate predicate) |
T |
predicate(String predicate)
Sets the
predicate property of this builder. |
T |
taxCategory(ResourceIdentifier<TaxCategory> taxCategory)
Sets the
taxCategory property of this builder. |
T |
zoneRates(List<ZoneRateDraft> zoneRates)
Sets the
zoneRates property of this builder. |
public ShippingMethodDraftBuilder predicate(CartPredicate predicate)
public T _default(Boolean _default)
default
property of this builder._default
- the value for ShippingMethodDraft.isDefault()
public T isDefault(Boolean _default)
default
property of this builder._default
- the value for ShippingMethodDraft.isDefault()
public T custom(@Nullable CustomFieldsDraft custom)
custom
property of this builder.custom
- the value for ShippingMethodDraft.getCustom()
@Deprecated public T description(@Nullable String description)
description
property of this builder.description
- the value for ShippingMethodDraft.getDescription()
public T key(@Nullable String key)
key
property of this builder.key
- the value for ShippingMethodDraft.getKey()
public T localizedDescription(@Nullable LocalizedString localizedDescription)
localizedDescription
property of this builder.localizedDescription
- the value for ShippingMethodDraft.getLocalizedDescription()
public T localizedName(@Nullable LocalizedString localizedName)
localizedName
property of this builder.localizedName
- the value for ShippingMethodDraft.getLocalizedName()
public T name(String name)
name
property of this builder.name
- the value for ShippingMethodDraft.getName()
public T predicate(@Nullable String predicate)
predicate
property of this builder.predicate
- the value for ShippingMethodDraft.getPredicate()
public T taxCategory(ResourceIdentifier<TaxCategory> taxCategory)
taxCategory
property of this builder.taxCategory
- the value for ShippingMethodDraft.getTaxCategory()
public T zoneRates(List<ZoneRateDraft> zoneRates)
zoneRates
property of this builder.zoneRates
- the value for ShippingMethodDraft.getZoneRates()
public Boolean isDefault()
@Nullable public CustomFieldsDraft getCustom()
@Nullable @Deprecated public String getDescription()
@Nullable public LocalizedString getLocalizedDescription()
@Nullable public LocalizedString getLocalizedName()
public String getName()
public ResourceIdentifier<TaxCategory> getTaxCategory()
public List<ZoneRateDraft> getZoneRates()
public T plusZoneRates(List<ZoneRateDraft> zoneRates)
zoneRates
parameter to the zoneRates
list property of this builder.zoneRates
- the value for ShippingMethodDraft.getZoneRates()
public T plusZoneRates(ZoneRateDraft zoneRates)
zoneRates
parameter to the zoneRates
list property of this builder.zoneRates
- the value of the element to add to ShippingMethodDraft.getZoneRates()
public ShippingMethodDraftDsl build()
ShippingMethodDraftDsl
with the values of this builder.build
in interface Builder<ShippingMethodDraftDsl>
public static ShippingMethodDraftBuilder of(String name, @Nullable String description, ResourceIdentifier<TaxCategory> taxCategory, List<ZoneRateDraft> zoneRates, Boolean _default)
name
- initial value for the ShippingMethodDraft.getName()
propertydescription
- initial value for the ShippingMethodDraft.getDescription()
propertytaxCategory
- initial value for the ShippingMethodDraft.getTaxCategory()
propertyzoneRates
- initial value for the ShippingMethodDraft.getZoneRates()
property_default
- initial value for the ShippingMethodDraft.isDefault()
propertypublic static ShippingMethodDraftBuilder of(String name, ResourceIdentifier<TaxCategory> taxCategory, List<ZoneRateDraft> zoneRates, Boolean _default)
name
- initial value for the ShippingMethodDraft.getName()
propertytaxCategory
- initial value for the ShippingMethodDraft.getTaxCategory()
propertyzoneRates
- initial value for the ShippingMethodDraft.getZoneRates()
property_default
- initial value for the ShippingMethodDraft.isDefault()
propertypublic static ShippingMethodDraftBuilder of(String name, @Nullable LocalizedString localizedDescription, ResourceIdentifier<TaxCategory> taxCategory, List<ZoneRateDraft> zoneRates, Boolean _default)
name
- initial value for the ShippingMethodDraft.getName()
propertylocalizedDescription
- initial value for the ShippingMethodDraft.getLocalizedDescription()
propertytaxCategory
- initial value for the ShippingMethodDraft.getTaxCategory()
propertyzoneRates
- initial value for the ShippingMethodDraft.getZoneRates()
property_default
- initial value for the ShippingMethodDraft.isDefault()
propertypublic static ShippingMethodDraftBuilder of(ShippingMethodDraft template)
template
- the template