InternalCreateResponseObject method

Future<List<Item>> InternalCreateResponseObject(
  1. ServiceObject responseObject,
  2. FolderId? parentFolderId,
  3. MessageDisposition messageDisposition
)
Create response object. The response object. The parent folder id. The message disposition.

Implementation

Future<List<Item>> InternalCreateResponseObject(ServiceObject responseObject,
    FolderId? parentFolderId, MessageDisposition messageDisposition) async {
  CreateResponseObjectRequest request = new CreateResponseObjectRequest(
      this, ServiceErrorHandling.ThrowOnError);

  request.ParentFolderId = parentFolderId;
  request.Items = [responseObject];
  request.MessageDisposition = messageDisposition;

  ServiceResponseCollection<CreateResponseObjectResponse> responses =
      await request.Execute();

  return responses[0].Items;
}