public final class PaymentInteractionAddedMessage extends GenericMessageImpl<Payment>
AddInterfaceInteraction
update action.
withUpdateableType(client(), type -> { withPayment(client(), payment -> { final AddInterfaceInteraction addInterfaceInteraction = AddInterfaceInteraction.ofTypeIdAndObjects(type.getId(), singletonMap(STRING_FIELD_NAME, "some id")); final Payment updatedPayment = client().executeBlocking(PaymentUpdateCommand.of(payment, addInterfaceInteraction)); assertThat(updatedPayment.getInterfaceInteractions().get(0).getFieldAsString(STRING_FIELD_NAME)).isEqualTo("some id"); assertEventually(() -> { final PagedQueryResult<PaymentInteractionAddedMessage> pagedQueryResult = client().executeBlocking(MessageQuery.of() .withPredicates(m -> m.resource().is(payment)) .forMessageType(PaymentInteractionAddedMessage.MESSAGE_HINT)); assertThat(pagedQueryResult.head()).isPresent(); assertThat(pagedQueryResult.head().get().getInteraction().getFieldAsString(STRING_FIELD_NAME)).isEqualTo("some id"); }); return updatedPayment; }); return type; });
See the test code.
Payment
,
AddInterfaceInteraction
Modifier and Type | Field and Description |
---|---|
static MessageDerivateHint<PaymentInteractionAddedMessage> |
MESSAGE_HINT |
static String |
MESSAGE_TYPE |
resource, resourceUserProvidedIdentifiers, resourceVersion, sequenceNumber, type
Modifier and Type | Method and Description |
---|---|
CustomFields |
getInteraction() |
as, equals, getPayload, getResource, getResourceUserProvidedIdentifiers, getResourceVersion, getSequenceNumber, getType, hashCode, toReference
getCreatedAt, getId, getLastModifiedAt, getVersion
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
referenceOfId, referenceTypeId, typeReference
getCreatedAt, getId, getLastModifiedAt, getVersion
hasSameIdAs, toResourceIdentifier
public static final String MESSAGE_TYPE
public static final MessageDerivateHint<PaymentInteractionAddedMessage> MESSAGE_HINT
public CustomFields getInteraction()