/// <summary> /// Use this call to retrieve report about "Stock info for locations" /// </summary> /// <param name="date">Used to specify report date or null for current period</param> /// <returns>Sorted list of StockItemLocations</returns> public List <StatsStockItemLocation> GetInventoryLocationData(DateTime?date) { var response = GetResponse("Dashboards/GetInventoryLocationData", "date=" + JsonFormatter.ConvertToJson(date) + ""); return(JsonFormatter.ConvertFromJson <List <StatsStockItemLocation> >(response)); }
/// <summary> /// Add purchase order note /// </summary> /// <param name="pkPurchaseId">Purchase order unique identifier</param> /// <param name="Note">Note text, 2000 chars max (longer notes are truncated)</param> /// <returns>Returns the new purchase order note</returns> public PurchaseOrderNote Add_PurchaseOrderNote(Guid pkPurchaseId, String Note) { var response = GetResponse("PurchaseOrder/Add_PurchaseOrderNote", "pkPurchaseId=" + pkPurchaseId + "&Note=" + System.Net.WebUtility.UrlEncode(Note) + ""); return(JsonFormatter.ConvertFromJson <PurchaseOrderNote>(response)); }
/// <summary> /// Creates initial purchase order in pending status. Once PO is created you can add stock items to it. /// </summary> /// <param name="createParameters">pkPurchaseId</param> /// <returns>New Purchase Order Id</returns> public Guid Create_PurchaseOrder_Initial(Create_PurchaseOrder_InitialParameter createParameters) { var response = GetResponse("PurchaseOrder/Create_PurchaseOrder_Initial", "createParameters=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(createParameters)) + ""); return(JsonFormatter.ConvertFromJson <Guid>(response)); }
/// <summary> /// Update additional cost type /// </summary> public Update_AdditionalCostTypesResponse Update_AdditionalCostTypes(Update_AdditionalCostTypesRequest request) { var response = GetResponse("PurchaseOrder/Update_AdditionalCostTypes", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); return(JsonFormatter.ConvertFromJson <Update_AdditionalCostTypesResponse>(response)); }
/// <summary> /// Update purchase order header, only if status is not Delivered. Returns modified/recalculated purchase order header /// </summary> /// <param name="updateParameter">Update purchase order header class</param> /// <returns>Returns modified/recalculated purchase order header</returns> public PurchaseOrderHeader Update_PurchaseOrderHeader(Update_PurchaseOrderHeaderParameter updateParameter) { var response = GetResponse("PurchaseOrder/Update_PurchaseOrderHeader", "updateParameter=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(updateParameter)) + ""); return(JsonFormatter.ConvertFromJson <PurchaseOrderHeader>(response)); }
/// <summary> /// Gets a list of Purchase Order Ids that contain undelivered stock items /// </summary> /// <param name="purchaseOrder">Purchase Order class made up of a Stock Item Id and a nullable Location Id</param> /// <returns>Returns a list of Purchase Order Ids with undelivered stock using the Stock Item and Location Id parameters</returns> public List <Guid> GetPurchaseOrdersWithStockItems(PurchaseOrderWithStockItem purchaseOrder) { var response = GetResponse("PurchaseOrder/GetPurchaseOrdersWithStockItems", "purchaseOrder=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(purchaseOrder)) + ""); return(JsonFormatter.ConvertFromJson <List <Guid> >(response)); }
/// <summary> /// Delete, add and update purchase order items and cause purchase order totals recalculation /// </summary> /// <returns>Returns all added and modified purchase order items and purchase order header</returns> public Modify_PurchaseOrderItems_BulkResponse Modify_PurchaseOrderItems_Bulk(Modify_PurchaseOrderItems_BulkRequest request) { var response = GetResponse("PurchaseOrder/Modify_PurchaseOrderItems_Bulk", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); return(JsonFormatter.ConvertFromJson <Modify_PurchaseOrderItems_BulkResponse>(response)); }
/// <summary> /// Update purchase order item, quantity, cost, pack size, pack quantity, in PENDING order only. Returns class that represents modified/recalculated purchase order header and modified purchase order item line /// </summary> /// <param name="purchaseId">Purchase Order ID</param> /// <returns>Purchase order header and affected purchase order items records</returns> public Deliver_PurchaseOrderItemAllNoBatchResponse Deliver_PurchaseItemAll_ExceptBatchItems(Guid purchaseId) { var response = GetResponse("PurchaseOrder/Deliver_PurchaseItemAll_ExceptBatchItems", "purchaseId=" + purchaseId + ""); return(JsonFormatter.ConvertFromJson <Deliver_PurchaseOrderItemAllNoBatchResponse>(response)); }
/// <summary> /// Try to find an item by SKU of SpplierCode /// </summary> /// <param name="request"></param> public FindStockItem_Response FindStockItem(FindStockItemRequest request) { var response = GetResponse("PurchaseOrder/FindStockItem", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); return(JsonFormatter.ConvertFromJson <FindStockItem_Response>(response)); }
/// <summary> /// Delete purchase order item line from PENDING order. Returns recalculated/modified purchase order header /// </summary> /// <param name="deleteItemParameter">Delete purchase order item parameter</param> /// <returns>Returns recalculated/modified purchase order header</returns> public PurchaseOrderHeader Delete_PurchaseOrderItem(Delete_PurchaseOrderItemParameter deleteItemParameter) { var response = GetResponse("PurchaseOrder/Delete_PurchaseOrderItem", "deleteItemParameter=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(deleteItemParameter)) + ""); return(JsonFormatter.ConvertFromJson <PurchaseOrderHeader>(response)); }
/// <summary> /// Delete Note for Purchase Order /// </summary> /// <param name="pkPurchaseId">Purchase order unique identifier</param> /// <param name="pkPurchaseOrderNoteId">Purchase order note unique identifier</param> /// <returns>Returns number of notes on the purchase order</returns> public Int32 Delete_PurchaseOrderNote(Guid pkPurchaseId, Guid pkPurchaseOrderNoteId) { var response = GetResponse("PurchaseOrder/Delete_PurchaseOrderNote", "pkPurchaseId=" + pkPurchaseId + "&pkPurchaseOrderNoteId=" + pkPurchaseOrderNoteId + ""); return(JsonFormatter.ConvertFromJson <Int32>(response)); }
/// <summary> /// Use this call to retrieve report about "Performance through time chart" /// </summary> /// <param name="period">Used to specify report number of months</param> /// <param name="timeScale">time scale</param> /// <returns>List of PerfomanceDetail</returns> public Dictionary <String, List <PerfomanceDetail> > GetPerformanceDetail(Int32 period, Int32 timeScale) { var response = GetResponse("Dashboards/GetPerformanceDetail", "period=" + period + "&timeScale=" + timeScale + ""); return(JsonFormatter.ConvertFromJson <Dictionary <String, List <PerfomanceDetail> > >(response)); }
/// <summary> /// Use this call to retrieve report about "Low stock in location" /// </summary> /// <param name="locationId">Used to specify report location id or null for combined</param> /// <param name="numRows">Used to specify number of returned rows</param> /// <returns>List of LowStockLevel</returns> public List <LowStockLevel> GetLowStockLevel(Guid?locationId, Int32?numRows) { var response = GetResponse("Dashboards/GetLowStockLevel", "locationId=" + JsonFormatter.ConvertToJson(locationId) + "&numRows=" + JsonFormatter.ConvertToJson(numRows) + ""); return(JsonFormatter.ConvertFromJson <List <LowStockLevel> >(response)); }
/// <summary> /// Use this call to retrieve report about "Stock info for products in a specific category and location" /// </summary> /// <param name="date">Used to specify report date or null for current period</param> /// <param name="locationId">Used to specify report location id</param> /// <param name="categoryId">Used to specify report category id</param> /// <param name="pageNumber">Used to specify report page number</param> /// <param name="entriesPerPage">Used to specify number of entries per page in report</param> /// <returns>PagedStockCategoryLocationProductResult</returns> public PagedStockCategoryLocationProductResult GetInventoryLocationProductsData(DateTime?date, Guid locationId, Guid categoryId, Int32 pageNumber, Int32 entriesPerPage) { var response = GetResponse("Dashboards/GetInventoryLocationProductsData", "date=" + JsonFormatter.ConvertToJson(date) + "&locationId=" + locationId + "&categoryId=" + categoryId + "&pageNumber=" + pageNumber + "&entriesPerPage=" + entriesPerPage + ""); return(JsonFormatter.ConvertFromJson <PagedStockCategoryLocationProductResult>(response)); }
/// <summary> /// Get purchase order notes /// </summary> /// <param name="pkPurchaseId">Purchase order unique identifier</param> /// <returns>List of purchase order notes</returns> public List <PurchaseOrderNote> Get_PurchaseOrderNote(Guid pkPurchaseId) { var response = GetResponse("PurchaseOrder/Get_PurchaseOrderNote", "pkPurchaseId=" + pkPurchaseId + ""); return(JsonFormatter.ConvertFromJson <List <PurchaseOrderNote> >(response)); }
/// <summary> /// Get purchase order additional costs types /// </summary> public Get_AdditionalCostTypesResponse Get_AdditionalCostTypes() { var response = GetResponse("PurchaseOrder/Get_AdditionalCostTypes", ""); return(JsonFormatter.ConvertFromJson <Get_AdditionalCostTypesResponse>(response)); }
/// <summary> /// Get a list of available statuses /// </summary> /// <returns>Returns a list of available statuses</returns> public List <PurchaseOrderStatus> GetPurchaseOrderStatusList() { var response = GetResponse("PurchaseOrder/GetPurchaseOrderStatusList", ""); return(JsonFormatter.ConvertFromJson <List <PurchaseOrderStatus> >(response)); }
/// <summary> /// Get delivered item records for specific PO /// </summary> /// <param name="pkPurchaseId">PO id</param> public Get_DeliveredRecords_Response Get_DeliveredRecords(Guid pkPurchaseId) { var response = GetResponse("PurchaseOrder/Get_DeliveredRecords", "pkPurchaseId=" + pkPurchaseId + ""); return(JsonFormatter.ConvertFromJson <Get_DeliveredRecords_Response>(response)); }
/// <summary> /// Modify additional cost allocation items /// </summary> /// <param name="request"></param> public Modify_AdditionalCostAllocationResponse Modify_AdditionalCostAllocation(Modify_AdditionalCostAllocationRequest request) { var response = GetResponse("PurchaseOrder/Modify_AdditionalCostAllocation", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); return(JsonFormatter.ConvertFromJson <Modify_AdditionalCostAllocationResponse>(response)); }
/// <summary> /// Get the URL of the CSV file for the specific purchase order /// </summary> /// <param name="request"></param> public Get_EmailCSVFileResponse Get_EmailCSVFile(Get_EmailCSVFileRequest request) { var response = GetResponse("PurchaseOrder/Get_EmailCSVFile", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); return(JsonFormatter.ConvertFromJson <Get_EmailCSVFileResponse>(response)); }
/// <summary> /// Searches purchase order by a number of parameters, such as Date of Purchase, status, reference number. /// Returns paged result of purchase order header. /// </summary> /// <param name="searchParameter">Search Parameter class</param> /// <returns>Response class which contains Result - the list of purchase order headers and paging information</returns> public Search_PurchaseOrdersResult Search_PurchaseOrders(Search_PurchaseOrderParameter searchParameter) { var response = GetResponse("PurchaseOrder/Search_PurchaseOrders", "searchParameter=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(searchParameter)) + ""); return(JsonFormatter.ConvertFromJson <Search_PurchaseOrdersResult>(response)); }
/// <summary> /// Get payment statements of a purchase order /// </summary> /// <param name="request"></param> public Get_PaymentStatementResponse Get_Payment_Statement(Get_PaymentStatementRequest request) { var response = GetResponse("PurchaseOrder/Get_Payment_Statement", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); return(JsonFormatter.ConvertFromJson <Get_PaymentStatementResponse>(response)); }
/// <summary> /// Updates purchase order extended property by id. If supplied id doesn't exists, the routine will throw an error /// The routine checks for duplicated propery names and throws an error if duplicated property name. /// </summary> /// <param name="request"></param> public void Update_PurchaseOrderExtendedProperty(Update_PurchaseOrderExtendedPropertyRequest request) { GetResponse("PurchaseOrder/Update_PurchaseOrderExtendedProperty", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); }
/// <summary> /// Get purchase order header and items in one call /// </summary> /// <param name="pkPurchaseId">Purchase Order unique identifier</param> /// <returns>Returns class containing purchase order header and items</returns> public Get_PurchaseOrderResponse Get_PurchaseOrder(Guid pkPurchaseId) { var response = GetResponse("PurchaseOrder/Get_PurchaseOrder", "pkPurchaseId=" + pkPurchaseId + ""); return(JsonFormatter.ConvertFromJson <Get_PurchaseOrderResponse>(response)); }
/// <summary> /// Update purchase order item, quantity, cost, pack size, pack quantity, in PENDING order only. Returns class that represents modified/recalculated purchase order header and modified purchase order item line /// </summary> /// <param name="updateItemParameter">Edit purchase order item class</param> /// <returns>Returns class that represents modified/recalculated purchase order header and modified purchase order item line</returns> public Update_PurchaseOrderItemResponse Update_PurchaseOrderItem(Update_PurchaseOrderItemParameter updateItemParameter) { var response = GetResponse("PurchaseOrder/Update_PurchaseOrderItem", "updateItemParameter=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(updateItemParameter)) + ""); return(JsonFormatter.ConvertFromJson <Update_PurchaseOrderItemResponse>(response)); }
/// <summary> /// Get the Audit Log of a Purchase Order. Returns maxium 1000 records in descending order /// </summary> /// <param name="auditLog">Class that represents parameters when searching the Audit Log</param> /// <returns>Returns the Audit Log for the Purchase Order</returns> public List <PurchaseOrderAudit> Get_PurchaseOrderAudit(Search_PurchaseOrder_AuditLog auditLog) { var response = GetResponse("PurchaseOrder/Get_PurchaseOrderAudit", "auditLog=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(auditLog)) + ""); return(JsonFormatter.ConvertFromJson <List <PurchaseOrderAudit> >(response)); }
/// <summary> /// Change purchase order status. Can change from: /// PENDING to OPEN, which will populate Due (OnOrder) values in stock levels, /// OPEN to DELIVERED, which will consolidate Due values in stock levels /// PARTIAL to DELIVERED, which will consolidate Due values in stock levels /// </summary> /// <param name="changeStatusParameter">Class that represents the parameters for Changing the Purchase Order Status</param> /// <returns>Returns the Purchase Order Header for the Purchase Order</returns> public PurchaseOrderHeader Change_PurchaseOrderStatus(Change_PurchaseOrderStatusParameter changeStatusParameter) { var response = GetResponse("PurchaseOrder/Change_PurchaseOrderStatus", "changeStatusParameter=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(changeStatusParameter)) + ""); return(JsonFormatter.ConvertFromJson <PurchaseOrderHeader>(response)); }
/// <summary> /// Adds extended properties to a purchase order. Property name must be unique otherwise the method throws an error. Maxium number of extended properties allowed for a single purchase order is 50. If total count of extended properties exceeds 50 an error will be thrown. /// </summary> /// <param name="request"></param> public Add_PurchaseOrderExtendedPropertyResponse Add_PurchaseOrderExtendedProperty(Add_PurchaseOrderExtendedPropertyRequest request) { var response = GetResponse("PurchaseOrder/Add_PurchaseOrderExtendedProperty", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); return(JsonFormatter.ConvertFromJson <Add_PurchaseOrderExtendedPropertyResponse>(response)); }
/// <summary> /// Delete additional cost type /// </summary> public void Delete_AdditionalCostTypes(Delete_AdditionalCostTypesRequest request) { GetResponse("PurchaseOrder/Delete_AdditionalCostTypes", "request=" + System.Net.WebUtility.UrlEncode(JsonFormatter.ConvertToJson(request)) + ""); }
/// <summary> /// Use this call to retrieve report about "Stock info for categories in a specific location" /// </summary> /// <param name="date">Used to specify report date or null for current period</param> /// <param name="locationId">Used to specify report location id</param> /// <returns>Sorted list of StockCategoryLocation</returns> public List <StockCategoryLocation> GetInventoryLocationCategoriesData(DateTime?date, Guid locationId) { var response = GetResponse("Dashboards/GetInventoryLocationCategoriesData", "date=" + JsonFormatter.ConvertToJson(date) + "&locationId=" + locationId + ""); return(JsonFormatter.ConvertFromJson <List <StockCategoryLocation> >(response)); }