Ejemplo n.º 1
0
        internal async Task AccountDetailsAsync(clsUpdateAccountDetail clsUpdateAccount)
        {
            string id = await Utilty.GetSecureStorageValueFor(Utilty.UserId);

            var Httpclient = new HttpClient();

            var url = Constants.BaseApiAddress + "wp-json/wc/v3/customers/" + id + Constants.Consumer_Key;

            var uri = new Uri(string.Format(url, string.Empty));

            var json = JsonConvert.SerializeObject(clsUpdateAccount);

            var content = new StringContent(json, Encoding.UTF8, "application/json");

            HttpResponseMessage response = null;

            response = await Httpclient.PutAsync(uri, content);

            if (response.StatusCode == HttpStatusCode.OK)
            {
                var responseContent = await response.Content.ReadAsStringAsync();

                var jObject = JObject.Parse(responseContent);
            }
        }
Ejemplo n.º 2
0
 public AccountDetailsVM()
 {
     clsUpdateAccount      = new clsUpdateAccountDetail();
     accountDetailsService = new UpdateADetailsService();
     _BillingDetailService = new GetBillingDetailbyId();
     getDetailById         = new GetDetailById();
     _ = getdata();
 }