Class CartSetItemShippingAddressCustomFieldActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetItemShippingAddressCustomFieldActionBuilder
- All Implemented Interfaces:
Builder<CartSetItemShippingAddressCustomFieldAction>
public class CartSetItemShippingAddressCustomFieldActionBuilder
extends Object
implements Builder<CartSetItemShippingAddressCustomFieldAction>
CartSetItemShippingAddressCustomFieldActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetItemShippingAddressCustomFieldAction cartSetItemShippingAddressCustomFieldAction = CartSetItemShippingAddressCustomFieldAction.builder()
.addressKey("{addressKey}")
.name("{name}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddressKey
(String addressKey) key
of the Address initemShippingAddress
.build()
builds CartSetItemShippingAddressCustomFieldAction with checking for non-null required valuesbuilds CartSetItemShippingAddressCustomFieldAction without checking for non-null required valueskey
of the Address initemShippingAddress
.getName()
Name of the Custom Field.getValue()
Ifvalue
is absent ornull
, this field will be removed if it exists.Name of the Custom Field.of()
factory method for an instance of CartSetItemShippingAddressCustomFieldActionBuildercreate builder for CartSetItemShippingAddressCustomFieldAction instanceIfvalue
is absent ornull
, this field will be removed if it exists.
-
Constructor Details
-
CartSetItemShippingAddressCustomFieldActionBuilder
public CartSetItemShippingAddressCustomFieldActionBuilder()
-
-
Method Details
-
addressKey
key
of the Address initemShippingAddress
.- Parameters:
addressKey
- value to be set- Returns:
- Builder
-
name
Name of the Custom Field.
- Parameters:
name
- value to be set- Returns:
- Builder
-
value
If
value
is absent ornull
, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. Ifvalue
is provided, it is set for the field defined byname
.- Parameters:
value
- value to be set- Returns:
- Builder
-
getAddressKey
key
of the Address initemShippingAddress
.- Returns:
- addressKey
-
getName
Name of the Custom Field.
- Returns:
- name
-
getValue
If
value
is absent ornull
, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. Ifvalue
is provided, it is set for the field defined byname
.- Returns:
- value
-
build
builds CartSetItemShippingAddressCustomFieldAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartSetItemShippingAddressCustomFieldAction>
- Returns:
- CartSetItemShippingAddressCustomFieldAction
-
buildUnchecked
builds CartSetItemShippingAddressCustomFieldAction without checking for non-null required values- Returns:
- CartSetItemShippingAddressCustomFieldAction
-
of
factory method for an instance of CartSetItemShippingAddressCustomFieldActionBuilder- Returns:
- builder
-
of
public static CartSetItemShippingAddressCustomFieldActionBuilder of(CartSetItemShippingAddressCustomFieldAction template) create builder for CartSetItemShippingAddressCustomFieldAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-