UpdateItems method
Future<ServiceResponseCollection<UpdateItemResponse> >
UpdateItems(
- Iterable<
Item> items, - FolderId savedItemsDestinationFolderId,
- ConflictResolutionMode conflictResolution,
- MessageDisposition messageDisposition,
- SendInvitationsOrCancellationsMode sendInvitationsOrCancellationsMode, [
- bool suppressReadReceipts = false,
Implementation
Future<ServiceResponseCollection<UpdateItemResponse>> UpdateItems(
Iterable<Item> items,
FolderId savedItemsDestinationFolderId,
ConflictResolutionMode conflictResolution,
MessageDisposition messageDisposition,
SendInvitationsOrCancellationsMode sendInvitationsOrCancellationsMode, [
bool suppressReadReceipts = false,
]) {
// All items have to exist on the server (!new) and modified (dirty)
if (!items.every((item) => (!item.IsNew && item.IsDirty))) {
throw ServiceValidationException(
"Strings.UpdateItemsDoesNotSupportNewOrUnchangedItems",
);
}
// Make sure that all items do *not* have unprocessed attachments.
if (!items.every((item) => !item.HasUnprocessedAttachmentChanges())) {
throw ServiceValidationException(
"Strings.UpdateItemsDoesNotAllowAttachments",
);
}
return InternalUpdateItems(
items,
savedItemsDestinationFolderId,
conflictResolution,
messageDisposition,
sendInvitationsOrCancellationsMode,
ServiceErrorHandling.ReturnErrors,
suppressReadReceipts,
);
}