You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.1 KiB
52 lines
2.1 KiB
using BBWY.Client.Models;
|
|
using BBWY.Common.Http;
|
|
using BBWY.Common.Models;
|
|
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
|
|
namespace BBWY.Client.APIServices
|
|
{
|
|
public class PurchaseOrderService : BaseApiService, IDenpendency
|
|
{
|
|
public PurchaseOrderService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext)
|
|
{
|
|
|
|
}
|
|
|
|
public ApiResponse<object> AddPurchaseOrder(PurchaseOrder purchaseOrder)
|
|
{
|
|
return SendRequest<object>(globalContext.BBYWApiHost,
|
|
"api/PurchaseOrder/AddPurchaseOrder",
|
|
purchaseOrder,
|
|
null,
|
|
HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<object> EditPurchaseOrder(PurchaseOrder purchaseOrder)
|
|
{
|
|
return SendRequest<object>(globalContext.BBYWApiHost,
|
|
"api/PurchaseOrder/EditPurchaseOrder",
|
|
purchaseOrder,
|
|
null,
|
|
HttpMethod.Put);
|
|
}
|
|
|
|
public ApiResponse<IList<PurchaseOrderResponse>> GetList(IList<string> skuIdList, StorageType storageType, long shopId)
|
|
{
|
|
return SendRequest<IList<PurchaseOrderResponse>>(globalContext.BBYWApiHost,
|
|
"api/PurchaseOrder/GetList",
|
|
new { SkuIdList = skuIdList, StorageType = storageType, ShopId = shopId },
|
|
null,
|
|
HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<object> DeletePurchaseOrder(long id)
|
|
{
|
|
return SendRequest<object>(globalContext.BBYWApiHost,
|
|
$"api/purchaseOrder/deletePurchaseOrder/{id}",
|
|
null,
|
|
null,
|
|
HttpMethod.Delete);
|
|
}
|
|
}
|
|
}
|
|
|