Interface CustomerSetDefaultShippingAddressAction
- All Superinterfaces:
CustomerUpdateAction,ResourceUpdateAction<CustomerUpdateAction>
Sets the default shipping address from addresses. The action adds the id of the specified address to the shippingAddressIds if not contained already. Either addressId or addressKey is required.
This action generates the CustomerDefaultShippingAddressSet Message.
Example to create an instance using the builder pattern
CustomerSetDefaultShippingAddressAction customerSetDefaultShippingAddressAction = CustomerSetDefaultShippingAddressAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CustomerSetDefaultShippingAddressAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CustomerSetDefaultShippingAddressActioncreate builder for CustomerSetDefaultShippingAddressAction instancecopyDeep()factory method to create a deep copy of CustomerSetDefaultShippingAddressActionidof the Address to become the default shipping address.keyof the Address to become the default shipping address.of()factory methodof(CustomerSetDefaultShippingAddressAction template) factory method to create a shallow copy CustomerSetDefaultShippingAddressActionvoidsetAddressId(String addressId) idof the Address to become the default shipping address.voidsetAddressKey(String addressKey) keyof the Address to become the default shipping address.static com.fasterxml.jackson.core.type.TypeReference<CustomerSetDefaultShippingAddressAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCustomerSetDefaultShippingAddressAction(Function<CustomerSetDefaultShippingAddressAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.customer.CustomerUpdateAction
getAction, withCustomerUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_DEFAULT_SHIPPING_ADDRESS
discriminator value for CustomerSetDefaultShippingAddressAction- See Also:
-
-
Method Details
-
getAddressId
String getAddressId()idof the Address to become the default shipping address.- Returns:
- addressId
-
getAddressKey
String getAddressKey()keyof the Address to become the default shipping address.- Returns:
- addressKey
-
setAddressId
idof the Address to become the default shipping address.- Parameters:
addressId- value to be set
-
setAddressKey
keyof the Address to become the default shipping address.- Parameters:
addressKey- value to be set
-
of
factory method- Returns:
- instance of CustomerSetDefaultShippingAddressAction
-
of
factory method to create a shallow copy CustomerSetDefaultShippingAddressAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CustomerSetDefaultShippingAddressAction copyDeep()- Specified by:
copyDeepin interfaceCustomerUpdateAction
-
deepCopy
@Nullable static CustomerSetDefaultShippingAddressAction deepCopy(@Nullable CustomerSetDefaultShippingAddressAction template) factory method to create a deep copy of CustomerSetDefaultShippingAddressAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomerSetDefaultShippingAddressAction- Returns:
- builder
-
builder
static CustomerSetDefaultShippingAddressActionBuilder builder(CustomerSetDefaultShippingAddressAction template) create builder for CustomerSetDefaultShippingAddressAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCustomerSetDefaultShippingAddressAction
default <T> T withCustomerSetDefaultShippingAddressAction(Function<CustomerSetDefaultShippingAddressAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<CustomerSetDefaultShippingAddressAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-