@Generated(value="io.sphere.sdk.annotations.processors.generators.UpdateActionsGenerator", comments="Generated from: io.sphere.sdk.customers.Customer") public final class SetMiddleName extends UpdateActionImpl<Customer>
middleName
property of a Customer
.
withCustomer(client(), customer -> { String newMiddleName = "Petronella"; assertThat(customer.getMiddleName()).isNotEqualTo(newMiddleName); final Customer updatedCustomer = client().executeBlocking(CustomerUpdateCommand.of(customer, SetMiddleName.of(newMiddleName))); assertThat(updatedCustomer.getMiddleName()).isEqualTo(newMiddleName); });
See the test code.
Customer.getMiddleName()
Modifier and Type | Method and Description |
---|---|
String |
getMiddleName() |
static SetMiddleName |
of(String middleName)
Creates a new update action from the given parameters.
|
static SetMiddleName |
ofUnset()
Creates a new update action to unset the
middleName property. |
getAction
public static SetMiddleName of(@Nullable String middleName)
middleName
- the middleName
property Customer.getMiddleName()
.SetMiddleName
update action.public static SetMiddleName ofUnset()
middleName
property.SetMiddleName
update action.