using System;
using System.Collections.Generic;
using System.Web.Script.Serialization;
using Newtonsoft.Json;
using ZionRobot.Models.ZFlow;
using ZionRobot.Persistence;
using ZionVault.WebService;

namespace ZionRobot.WebService
{
	// Token: 0x02000018 RID: 24
	public class LawsuitPhaseProgress
	{
		// Token: 0x0600008D RID: 141 RVA: 0x00005654 File Offset: 0x00003854
		internal List<LawsuitPhaseProgress> LawsuitPhaseProgressToSync()
		{
			string result = new Client(WSProperties.UrlApi)._request("GET", WSProperties.LawsuitPhaseProgressToSync, WSProperties.Token, null, string.Empty, null);
			return JsonConvert.DeserializeObject<List<LawsuitPhaseProgress>>(result);
		}

		// Token: 0x0600008E RID: 142 RVA: 0x00005694 File Offset: 0x00003894
		internal string UpdateUrl(LawsuitPhaseProgress LawsuitPhaseProgress)
		{
			string a = new JavaScriptSerializer().Serialize(new
			{
				LawsuitPhaseProgress
			});
			return new Client(WSProperties.UrlApi)._request("PUT", WSProperties.UpdateLawsuitPhaseProgressLink, WSProperties.Token, null, a, null);
		}

		// Token: 0x0600008F RID: 143 RVA: 0x000056D8 File Offset: 0x000038D8
		internal string UpdateSync(LawsuitPhaseProgress LawsuitPhaseProgress, int status)
		{
			return new Client(WSProperties.UrlApi)._request("PUT", WSProperties.UpdateLawsuitPhaseProgressSync, WSProperties.Token, null, new JavaScriptSerializer().Serialize(new
			{
				EntityId = LawsuitPhaseProgress.EntityId,
				ClientId = LawsuitPhaseProgress.ClientId,
				FieldOfLawId = LawsuitPhaseProgress.FieldOfLawId,
				LawsuitId = LawsuitPhaseProgress.LawsuitId,
				LawsuitPhaseId = LawsuitPhaseProgress.LawsuitPhaseId,
				Id = LawsuitPhaseProgress.Id,
				SyncId = LawsuitPhaseProgress.SyncId,
				SyncStatus = status
			}), null);
		}
	}
}
