public string Insert(string json) { var path = "/admin/api/2019-10/orders.json"; var response = _httpClient.Post(path, json); return(response.Body); }
public string CreateProduct(string json) { var path = $"/admin/api/2019-10/products.json"; var clientResponse = _httpClient.Post(path, json); return(clientResponse.Body); }
public string SetInventoryLevels(string content) { var path = "/admin/api/2019-10/inventory_levels/set.json"; var response = _httpClient.Post(path, content); return(response.Body); }
public string Insert(long orderId, string fulfillmentJson) { var path = $"/admin/orders/{orderId}/fulfillments.json"; var clientResponse = _httpClient.Post(path, fulfillmentJson); return(clientResponse.Body); }
public string Create(string json) { var path = $"/admin/api/2019-10/customers.json"; var response = _httpClient.Post(path, json); return(response.Body); }
public string RetrieveAccessToken(string code, ApiKeyAndSecret credentials) { var queryString = new QueryStringBuilder() .Add("client_id", credentials.ApiKey) .Add("client_secret", credentials.ApiSecret) .Add("code", code) .ToString(); var url = $"/admin/oauth/access_token?{queryString}"; var response = _httpClient.Post(url, ""); dynamic parent = JsonConvert.DeserializeObject(response.Body); return(parent.access_token); }