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: 0x0200001A RID: 26
	public class LawsuitPhase
	{
		// Token: 0x06000096 RID: 150 RVA: 0x00005B1C File Offset: 0x00003D1C
		internal List<LawsuitPhase> LawsuitPhasesToSync()
		{
			string result = new Client(WSProperties.UrlApi)._request("GET", WSProperties.LawsuitPhasesToSync, WSProperties.Token, null, string.Empty, null);
			return JsonConvert.DeserializeObject<List<LawsuitPhase>>(result);
		}

		// Token: 0x06000097 RID: 151 RVA: 0x00005B5C File Offset: 0x00003D5C
		internal string UpdateUrl(LawsuitPhase lawsuitPhase)
		{
			string a = new JavaScriptSerializer().Serialize(new
			{
				lawsuitPhase
			});
			return new Client(WSProperties.UrlApi)._request("PUT", WSProperties.UpdateLawsuitPhaseLink, WSProperties.Token, null, a, null);
		}

		// Token: 0x06000098 RID: 152 RVA: 0x00005BA0 File Offset: 0x00003DA0
		internal string UpdateSync(LawsuitPhase lawsuitPhase, int status)
		{
			return new Client(WSProperties.UrlApi)._request("PUT", WSProperties.UpdateLawsuitPhaseSync, WSProperties.Token, null, new JavaScriptSerializer().Serialize(new
			{
				EntityId = lawsuitPhase.EntityId,
				ClientId = lawsuitPhase.ClientId,
				FieldOfLawId = lawsuitPhase.FieldOfLawId,
				LawsuitId = lawsuitPhase.LawsuitId,
				Id = lawsuitPhase.Id,
				SyncId = lawsuitPhase.SyncId,
				SyncStatus = status
			}), null);
		}
	}
}
