public interface CustomerDeleteCommand extends MetaModelReferenceExpansionDsl<Customer,CustomerDeleteCommand,CustomerExpansionModel<Customer>>, DeleteCommand<Customer>
final CustomerSignInResult result = client().executeBlocking(CustomerCreateCommand.of(newCustomerDraft())); final Customer customer = result.getCustomer(); client().executeBlocking(CustomerDeleteCommand.of(customer)); final Cart cart = client().executeBlocking(CartByCustomerIdGet.of(customer)); assertThat(cart).isNull();
See the test code.
Customer
Modifier and Type | Method and Description |
---|---|
static CustomerDeleteCommand |
of(Versioned<Customer> versioned)
Creates a command object to delete a
Customer by ID. |
static CustomerDeleteCommand |
of(Versioned<Customer> versioned,
boolean eraseData)
Creates a command object to delete a
Customer by ID. |
static CustomerDeleteCommand |
ofKey(String key,
Long version)
Creates a command object to delete a
Customer by its key. |
static CustomerDeleteCommand |
ofKey(String key,
Long version,
boolean eraseData)
Creates a command object to delete a
Customer by its key. |
plusExpansionPaths, withExpansionPaths
plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths
expansionPaths
canDeserialize, deserialize, httpRequestIntent
static CustomerDeleteCommand of(Versioned<Customer> versioned)
Customer
by ID.versioned
- the object to delete (so directly a Customer
) or just the version/ID information of itstatic CustomerDeleteCommand of(Versioned<Customer> versioned, boolean eraseData)
Customer
by ID.versioned
- the object to delete (so directly a Customer
) or just the version/ID information of iteraseData
- If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static CustomerDeleteCommand ofKey(String key, Long version)
Customer
by its key.key
- the key of the Customer to delete, see Customer.getKey()
version
- `the current version of the Customer, see Resource.getVersion()
static CustomerDeleteCommand ofKey(String key, Long version, boolean eraseData)
Customer
by its key.key
- the key of the Customer to delete, see Customer.getKey()
version
- the current version of the Customer, see Resource.getVersion()
eraseData
- If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.