public async Task WhenAsync(MergePatchSupplierProductDto c) { var idObj = SupplierProductProxyUtils.ToIdString((c as IMergePatchSupplierProduct).SupplierProductId); var uriParameters = new SupplierProductUriParameters(); uriParameters.Id = idObj; var req = new SupplierProductPatchRequest(uriParameters, (MergePatchSupplierProductDto)c); var resp = await _ramlClient.SupplierProduct.Patch(req); SupplierProductProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <ISupplierProductState> GetAsync(SupplierProductId supplierProductId) { ISupplierProductState state = null; var idObj = SupplierProductProxyUtils.ToIdString(supplierProductId); var uriParameters = new SupplierProductUriParameters(); uriParameters.Id = idObj; var req = new SupplierProductGetRequest(uriParameters); var resp = await _ramlClient.SupplierProduct.Get(req); SupplierProductProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToSupplierProductState(); return(state); }
public async Task WhenAsync(DeleteSupplierProductDto c) { var idObj = SupplierProductProxyUtils.ToIdString((c as IDeleteSupplierProduct).SupplierProductId); var uriParameters = new SupplierProductUriParameters(); uriParameters.Id = idObj; var q = new SupplierProductDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new SupplierProductDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.SupplierProduct.Delete(req); SupplierProductProxyUtils.ThrowOnHttpResponseError(resp); }