UNPKG

@commercelayer/sdk

Version:
46 lines (43 loc) 2.08 kB
'use strict'; var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs'); // src/resources/discount_engines.ts var DiscountEngines = class _DiscountEngines extends chunkU22VLCMN_cjs.ApiResource { static TYPE = "discount_engines"; async markets(discountEngineId, params, options) { const _discountEngineId = discountEngineId.id || discountEngineId; return this.resources.fetch({ type: "markets" }, `discount_engines/${_discountEngineId}/markets`, params, options); } async discount_engine_items(discountEngineId, params, options) { const _discountEngineId = discountEngineId.id || discountEngineId; return this.resources.fetch({ type: "discount_engine_items" }, `discount_engines/${_discountEngineId}/discount_engine_items`, params, options); } async attachments(discountEngineId, params, options) { const _discountEngineId = discountEngineId.id || discountEngineId; return this.resources.fetch({ type: "attachments" }, `discount_engines/${_discountEngineId}/attachments`, params, options); } async versions(discountEngineId, params, options) { const _discountEngineId = discountEngineId.id || discountEngineId; return this.resources.fetch({ type: "versions" }, `discount_engines/${_discountEngineId}/versions`, params, options); } async event_stores(discountEngineId, params, options) { const _discountEngineId = discountEngineId.id || discountEngineId; return this.resources.fetch({ type: "event_stores" }, `discount_engines/${_discountEngineId}/event_stores`, params, options); } isDiscountEngine(resource) { return resource.type && resource.type === _DiscountEngines.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _DiscountEngines.TYPE; } }; var instance = new DiscountEngines(); var discount_engines_default = instance; exports.discount_engines_default = discount_engines_default; //# sourceMappingURL=chunk-MKV2B7P5.cjs.map //# sourceMappingURL=chunk-MKV2B7P5.cjs.map