UNPKG

@commercelayer/sdk

Version:
42 lines (39 loc) 1.73 kB
'use strict'; var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs'); // src/resources/order_factories.ts var OrderFactories = class _OrderFactories extends chunkU22VLCMN_cjs.ApiResource { static TYPE = "order_factories"; async source_order(orderFactoryId, params, options) { const _orderFactoryId = orderFactoryId.id || orderFactoryId; return this.resources.fetch({ type: "orders" }, `order_factories/${_orderFactoryId}/source_order`, params, options); } async target_order(orderFactoryId, params, options) { const _orderFactoryId = orderFactoryId.id || orderFactoryId; return this.resources.fetch({ type: "orders" }, `order_factories/${_orderFactoryId}/target_order`, params, options); } async events(orderFactoryId, params, options) { const _orderFactoryId = orderFactoryId.id || orderFactoryId; return this.resources.fetch({ type: "events" }, `order_factories/${_orderFactoryId}/events`, params, options); } async event_stores(orderFactoryId, params, options) { const _orderFactoryId = orderFactoryId.id || orderFactoryId; return this.resources.fetch({ type: "event_stores" }, `order_factories/${_orderFactoryId}/event_stores`, params, options); } isOrderFactory(resource) { return resource.type && resource.type === _OrderFactories.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _OrderFactories.TYPE; } }; var instance = new OrderFactories(); var order_factories_default = instance; exports.order_factories_default = order_factories_default; //# sourceMappingURL=chunk-G7MROYQP.cjs.map //# sourceMappingURL=chunk-G7MROYQP.cjs.map