public interface PaymentDeleteCommand extends MetaModelReferenceExpansionDsl<Payment,PaymentDeleteCommand,PaymentExpansionModel<Payment>>, DeleteCommand<Payment>
Payment
.
final PaymentDraft paymentDraft = PaymentDraftBuilder.of(EURO_20).build(); final Payment payment = client().executeBlocking(PaymentCreateCommand.of(paymentDraft)); client().executeBlocking(PaymentDeleteCommand.of(payment)); final Payment loadedPayment = client().executeBlocking(PaymentByIdGet.of(payment)); assertThat(loadedPayment).isNull();
See the test code.
Payment
Modifier and Type | Method and Description |
---|---|
static PaymentDeleteCommand |
of(Versioned<Payment> versioned)
Creates a command object to delete a
Payment by ID. |
static PaymentDeleteCommand |
of(Versioned<Payment> versioned,
boolean eraseData)
Creates a command object to delete a
Payment by ID. |
static PaymentDeleteCommand |
ofKey(String key,
Long version)
Creates a command object to delete a
Payment by its key. |
static PaymentDeleteCommand |
ofKey(String key,
Long version,
boolean eraseData)
Creates a command object to delete a
Payment by its key. |
plusExpansionPaths, withExpansionPaths
plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths
expansionPaths
canDeserialize, deserialize, httpRequestIntent
static PaymentDeleteCommand of(Versioned<Payment> versioned)
Payment
by ID.versioned
- the object to delete (so directly a Payment
) or just the version/ID information of itstatic PaymentDeleteCommand of(Versioned<Payment> versioned, boolean eraseData)
Payment
by ID.versioned
- the object to delete (so directly a Payment
) 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 PaymentDeleteCommand ofKey(String key, Long version)
Payment
by its key.key
- the key of the Payment to delete, see Payment.getKey()
version
- `the current version of the Payment, see Resource.getVersion()
static PaymentDeleteCommand ofKey(String key, Long version, boolean eraseData)
Payment
by its key.key
- the key of the Payment to delete, see Payment.getKey()
version
- the current version of the Payment, 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.