@Generated(value="io.sphere.sdk.annotations.processors.generators.UpdateActionsGenerator", comments="Generated from: io.sphere.sdk.payments.Payment") public final class SetKey extends UpdateActionImpl<Payment>
key property of a Payment.
withPayment(client(), (Payment payment) -> { final String newKey = randomKey(); final PaymentUpdateCommand cmd = PaymentUpdateCommand.of(payment, SetKey.of(newKey)); final Payment updatedPayment = client().executeBlocking(cmd); assertThat(updatedPayment.getKey()).isEqualTo(newKey); return updatedPayment; });See the test code.
Payment.getKey()| Modifier and Type | Method and Description |
|---|---|
String |
getKey() |
static SetKey |
of(String key)
Creates a new update action from the given parameters.
|
static SetKey |
ofUnset()
Creates a new update action to unset the
key property. |
getActionpublic static SetKey of(@Nullable String key)
key - the key property Payment.getKey().SetKey update action.public static SetKey ofUnset()
key property.SetKey update action.