Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }