public async Task CalculationFireAndForgetByPeriodIdsAsync(CalculationFireAndForgetByPeriodParams calculationFireAndForgetByPeriodParams) { //call service async await ServiceHelperExtensions.CallRestServiceAsync(Format.JSON, RestMethod.POST, _authorizationHeader, new Uri($"{_cotorraUri}/CalculationFireAndForgetByPeriodIds"), new object[] { calculationFireAndForgetByPeriodParams }).ContinueWith((i) => { if (i.Exception != null) { throw i.Exception; } }); }
public async Task <CalculateOverdraftResult> CalculateOverdraftAsync(CalculateOverdraftParams calculateOverdraftParams) { //call service async var result = await ServiceHelperExtensions.CallRestServiceAsync(Format.JSON, RestMethod.POST, _authorizationHeader, new Uri($"{_cotorraUri}/CalculateOverdraft"), new object[] { calculateOverdraftParams }).ContinueWith((i) => { if (i.Exception != null) { throw i.Exception; } return(i.Result); }); var calculateGenericResult = JsonConvert.DeserializeObject <CalculateOverdraftResult>(result); return(calculateGenericResult); }
public async Task <List <OverdraftDTO> > GetByEmployeeId(Guid companyId, Guid instanceId, Guid employeeId) { var serializer = new ExpressionSerializer(new Serialize.Linq.Serializers.JsonSerializer()); //call service async string result = null; //call service async await ServiceHelperExtensions.CallRestServiceAsync(Format.JSON, RestMethod.GET, _authorizationHeader, new Uri($"{_cotorraUri}/GetByEmployeeId/{companyId}/{instanceId}/{employeeId}"), new object[] { }) .ContinueWith((i) => { if (i.Exception != null) { throw i.Exception; } result = i.Result; }); return(JsonConvert.DeserializeObject <List <OverdraftDTO> >(result)); }