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