UNPKG

@commercelayer/sdk

Version:
46 lines (43 loc) 2.02 kB
'use strict'; var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs'); // src/resources/reserved_stocks.ts var ReservedStocks = class _ReservedStocks extends chunkU22VLCMN_cjs.ApiResource { static TYPE = "reserved_stocks"; async stock_item(reservedStockId, params, options) { const _reservedStockId = reservedStockId.id || reservedStockId; return this.resources.fetch({ type: "stock_items" }, `reserved_stocks/${_reservedStockId}/stock_item`, params, options); } async sku(reservedStockId, params, options) { const _reservedStockId = reservedStockId.id || reservedStockId; return this.resources.fetch({ type: "skus" }, `reserved_stocks/${_reservedStockId}/sku`, params, options); } async stock_reservations(reservedStockId, params, options) { const _reservedStockId = reservedStockId.id || reservedStockId; return this.resources.fetch({ type: "stock_reservations" }, `reserved_stocks/${_reservedStockId}/stock_reservations`, params, options); } async versions(reservedStockId, params, options) { const _reservedStockId = reservedStockId.id || reservedStockId; return this.resources.fetch({ type: "versions" }, `reserved_stocks/${_reservedStockId}/versions`, params, options); } async event_stores(reservedStockId, params, options) { const _reservedStockId = reservedStockId.id || reservedStockId; return this.resources.fetch({ type: "event_stores" }, `reserved_stocks/${_reservedStockId}/event_stores`, params, options); } isReservedStock(resource) { return resource.type && resource.type === _ReservedStocks.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _ReservedStocks.TYPE; } }; var instance = new ReservedStocks(); var reserved_stocks_default = instance; exports.reserved_stocks_default = reserved_stocks_default; //# sourceMappingURL=chunk-TIINXXHU.cjs.map //# sourceMappingURL=chunk-TIINXXHU.cjs.map