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