public async Task <ItemRetireResponse> RetireItem(string merchantSku) { await new ContextRemover(); Base.Http.Request request = CreateRequest(); request.EndpointUri = string.Format("/v3/items/{0}", merchantSku); Base.Http.IResponse response = await client.DeleteAsync(request); ItemRetireResponse result = await ProcessResponse <ItemRetireResponse>(response); return(result); }
public async Task <ItemRetireResponse> RetireItem(string merchantSku) { // avoiding deadlock if client execute this method synchronously await new ContextRemover(); Base.Http.Request request = CreateRequest(); request.EndpointUri = string.Format("/v2/items/{0}", merchantSku); Base.Http.IResponse response = await client.DeleteAsync(request); ItemRetireResponse result = await ProcessResponse <ItemRetireResponse>(response); return(result); }
public async Task RetireOneSpecificItem() { ItemRetireResponse result = await itemApi.RetireItem("test"); Assert.True(result.Sku.Length > 0); }