sf-apple-sdk
Version:
Apple SF SDK for SF WMS
71 lines (70 loc) • 2.22 kB
JavaScript
import { CancelInboundService, CancelOutboundService, InboundSnService, ItemService, OutboundService, PurchaseOrderService, UpdatePurchaseOrderService, } from "./services/index.js";
export class Client {
constructor(options) {
this.options = options;
this.itemService = new ItemService(this.options);
this.purchaseOrderService = new PurchaseOrderService(this.options);
this.outboundService = new OutboundService(this.options);
this.cancelInboundService = new CancelInboundService(this.options);
this.cancelOutboundService = new CancelOutboundService(this.options);
this.updatePurchaseOrderService = new UpdatePurchaseOrderService(this.options);
this.inboundSnService = new InboundSnService(this.options);
}
/**
* 调用商品接口
* 创建/更新商品信息
*/
async sendItems(data) {
return this.itemService.sendItems(data);
}
/**
* 统一场景入库
*/
async sceneIn(data) {
return this.purchaseOrderService.sceneIn(data);
}
/**
* 统一场景出库
*/
async sceneOut(data) {
return this.outboundService.sceneOut(data);
}
/**
* 调用入库单取消接口
*/
async cancelPurchaseOrders(data) {
return this.cancelInboundService.cancelInbound(data);
}
/**
* 调用出库单取消接口
*/
async cancelSaleOrders(data) {
return this.cancelOutboundService.cancelOutbound(data);
}
/**
* 调用退货入库单运单号更新接口
*/
async updateReturnInboundWaybills(data) {
return this.updatePurchaseOrderService.updateWaybills(data);
}
/**
* 调用入库序列号信息接口
*/
async receiptSerialNumbers(data) {
return this.inboundSnService.addInboundSn(data);
}
/**
* 通用入库单接口
* 非必要,不建议调用
*/
async sendPurchaseOrders(data) {
return this.purchaseOrderService.sendPurchaseOrders(data);
}
/**
* 调用出库单接口
* 非必要,不建议调用
*/
async sendSaleOrders(data) {
return this.outboundService.sendOutbound(data);
}
}