using Newtonsoft.Json;
using System.Collections.Generic;
using AyaNova.Biz;

namespace AyaNova.Api.ControllerHelpers
{




    /// <summary>
    ///
    /// </summary>
    public class ApiError
    {     
        public string Code { get; }

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<ApiDetailError> Details { get; internal set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string Message { get; }

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string Target { get; }

        public ApiError(ApiErrorCode apiCode, string message = null, string target = null)
        {
            Code = ((int)apiCode).ToString();
            Target = target;
            Message=message;            
        }
       
    }//eoc


}//eons