/// <summary> /// Sends a POST to '/api/user/{userId}/mailmessages' /// </summary> /// <param name="userId">a path parameter (no description)</param> /// <param name="model">a body parameter (no description)</param> /// <returns></returns> public static RestOperation EnqueueMailMessage(string userId, Message model) { return new RestOperation("POST", "api/user/" + userId + "/mailmessages") { Content = model }; }
public Message Clone(bool includeLocalProperties) { var c = new Message { Body = Body, Subject = Subject, To = To.Select(x=>x.Clone(includeLocalProperties)).ToList(), }; CopyExtraPropertiesToClone(c, includeLocalProperties); return c; }
partial void CopyExtraPropertiesToClone(Message clone, bool includeLocalProperties);
/// <summary> /// Sends a POST to '/api/user/{userId}/mailmessages' (asynchronous) /// </summary> /// <param name="userId">a path parameter (no description)</param> /// <param name="model">a body parameter (no description)</param> /// <returns></returns> public virtual async Task<QueuedMessage> EnqueueMailMessageAsync(string userId, Message model) { var operation = Operations.EnqueueMailMessage(userId, model); var response = await _client.SendAsync(operation.BuildRequest(_client)); EnsureSuccess(response); var result = await response.Content.ReadAsAsync<QueuedMessage>(); return result; }