public async Task <bool> UpdateDetectionRuleFullWebServiceAsync(string id, FullWebServiceRule body = null, CancellationToken cancellationToken = default) { var response = await GetDetectionRulesFullWebServiceUrl() .AppendPathSegment(id) .PutJsonAsync(body, cancellationToken) .ConfigureAwait(false); return(response.IsSuccessStatusCode); }
public async Task <EntityShortRepresentation> CreateDetectionRuleFullWebServiceAsync(Positions?position = null, FullWebServiceRule body = null, CancellationToken cancellationToken = default) { var response = await GetDetectionRulesFullWebServiceUrl() .SetQueryParam(nameof(position), s_positionsConverter.ConvertToString(position)) .PostJsonAsync(body, cancellationToken) .ReceiveJsonWithErrorChecking <EntityShortRepresentation>() .ConfigureAwait(false); return(response); }