Class CartSetShippingAddressCustomFieldActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetShippingAddressCustomFieldActionBuilder
- All Implemented Interfaces:
Builder<CartSetShippingAddressCustomFieldAction>
public class CartSetShippingAddressCustomFieldActionBuilder
extends Object
implements Builder<CartSetShippingAddressCustomFieldAction>
CartSetShippingAddressCustomFieldActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetShippingAddressCustomFieldAction cartSetShippingAddressCustomFieldAction = CartSetShippingAddressCustomFieldAction.builder()
.name("{name}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartSetShippingAddressCustomFieldAction with checking for non-null required valuesbuilds CartSetShippingAddressCustomFieldAction without checking for non-null required valuesgetName()Name of the Custom Field.getValue()Ifvalueis absent ornull, this field will be removed if it exists.Name of the Custom Field.of()factory method for an instance of CartSetShippingAddressCustomFieldActionBuilderof(CartSetShippingAddressCustomFieldAction template) create builder for CartSetShippingAddressCustomFieldAction instanceIfvalueis absent ornull, this field will be removed if it exists.
-
Constructor Details
-
CartSetShippingAddressCustomFieldActionBuilder
public CartSetShippingAddressCustomFieldActionBuilder()
-
-
Method Details
-
name
Name of the Custom Field.
- Parameters:
name- value to be set- Returns:
- Builder
-
value
If
valueis absent ornull, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. Ifvalueis provided, it is set for the field defined byname.- Parameters:
value- value to be set- Returns:
- Builder
-
getName
Name of the Custom Field.
- Returns:
- name
-
getValue
If
valueis absent ornull, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. Ifvalueis provided, it is set for the field defined byname.- Returns:
- value
-
build
builds CartSetShippingAddressCustomFieldAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartSetShippingAddressCustomFieldAction>- Returns:
- CartSetShippingAddressCustomFieldAction
-
buildUnchecked
builds CartSetShippingAddressCustomFieldAction without checking for non-null required values- Returns:
- CartSetShippingAddressCustomFieldAction
-
of
factory method for an instance of CartSetShippingAddressCustomFieldActionBuilder- Returns:
- builder
-
of
public static CartSetShippingAddressCustomFieldActionBuilder of(CartSetShippingAddressCustomFieldAction template) create builder for CartSetShippingAddressCustomFieldAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-