/// <summary>parses json into a plan</summary>
 /// <param name="json">json to parse</param>
 /// <returns>plan corresponding to the json</returns>
 public static Priority Parse(JObject json)
 {
     Priority p = new Priority();
     p.ID = (ulong)json["id"];
     p.Name = (string)json["name"];
     p.ShortName = (string)json["short_name"];
     p.IsDefault = (bool)json["is_default"];
     p.PriorityLevel = (int)json["priority"];
     return p;
 }
Exemple #2
0
 /// <summary>parses json into a plan</summary>
 /// <param name="json">json to parse</param>
 /// <returns>plan corresponding to the json</returns>
 public static Priority Parse(JObject json)
 {
     var p = new Priority
     {
         JsonFromResponse = json,
         ID = (ulong)json["id"],
         Name = (string)json["name"],
         ShortName = (string)json["short_name"],
         IsDefault = (bool)json["is_default"],
         PriorityLevel = (int)json["priority"],
     };
     return p;
 }