public CreateResult CreateCollaborator(string applicationSlug, string email, CollaboratorType collaboratorType)
{
CheckArgumentNull("applicationSlug", applicationSlug);
CheckArgumentNull("email", email);
if (collaboratorType == CollaboratorType.None)
{
throw new ArgumentException("collaboratorType needs to be set.");
}
var request = new RestRequest(Method.POST);
request.RequestFormat = DataFormat.Json;
request.Resource = "applications/{applicationSlug}/collaborators";
request.AddParameter("applicationSlug", applicationSlug, ParameterType.UrlSegment);
request.AddBody(new
{
collaboratorEmail = email,
role = GetCollaboratorType(collaboratorType),
});
return ExecuteCreate(request);
}