CreateAttachments method

Future<ServiceResponseCollection<CreateAttachmentResponse>> CreateAttachments(
  1. String? parentItemId,
  2. Iterable<Attachment?> attachments
)
Creates attachments. The parent item id. The attachments.

Implementation

Future<ServiceResponseCollection<CreateAttachmentResponse>> CreateAttachments(
    String? parentItemId, Iterable<Attachment?> attachments) {
  CreateAttachmentRequest request =
      new CreateAttachmentRequest(this, ServiceErrorHandling.ReturnErrors);

  request.ParentItemId = parentItemId;
  request.Attachments.addAll(attachments);

  return request.Execute();
}