UNPKG

@commercelayer/sdk

Version:
34 lines (31 loc) 1.26 kB
'use strict'; var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs'); // src/resources/promotion_rules.ts var PromotionRules = class _PromotionRules extends chunkU22VLCMN_cjs.ApiResource { static TYPE = "promotion_rules"; async versions(promotionRuleId, params, options) { const _promotionRuleId = promotionRuleId.id || promotionRuleId; return this.resources.fetch({ type: "versions" }, `promotion_rules/${_promotionRuleId}/versions`, params, options); } async event_stores(promotionRuleId, params, options) { const _promotionRuleId = promotionRuleId.id || promotionRuleId; return this.resources.fetch({ type: "event_stores" }, `promotion_rules/${_promotionRuleId}/event_stores`, params, options); } isPromotionRule(resource) { return resource.type && resource.type === _PromotionRules.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _PromotionRules.TYPE; } }; var instance = new PromotionRules(); var promotion_rules_default = instance; exports.promotion_rules_default = promotion_rules_default; //# sourceMappingURL=chunk-ZLFWYCCG.cjs.map //# sourceMappingURL=chunk-ZLFWYCCG.cjs.map