public async Task <bool> PostOrder(ExternalMobileTelecomsNetworkOrder order) { var json = JsonConvert.SerializeObject(order); var response = await httpClient.PostAsync($"{config.ExternalMobileTelecomsNetworkApiUrl}/api/orders", new StringContent(json, System.Text.Encoding.UTF8, "application/json")); return(response.StatusCode == System.Net.HttpStatusCode.OK); }
public async Task <bool> PostCease(ExternalMobileTelecomsNetworkOrder order) { var response = await httpClient.DeleteAsync($"{config.ExternalMobileTelecomsNetworkApiUrl}/api/orders/{order.PhoneNumber}/{order.Reference}"); return(response.StatusCode == System.Net.HttpStatusCode.NoContent); }