Esempio n. 1
0
        public static string GetEmails(RestCommand command)
        {
            Emails emails = new Emails(command.LoginUser);

            emails.LoadByOrganizationID(command.Organization.OrganizationID);

            if (command.Format == RestFormat.XML)
            {
                return(emails.GetXml("Emails", "Email", true, command.Filters));
            }
            else
            {
                throw new RestException(HttpStatusCode.BadRequest, "Invalid data format");
            }
        }