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