UNPKG

@commercelayer/sdk

Version:
30 lines (27 loc) 1.01 kB
'use strict'; var chunkVRRJS3ZM_cjs = require('./chunk-VRRJS3ZM.cjs'); // src/resources/promotion_rules.ts var PromotionRules = class _PromotionRules extends chunkVRRJS3ZM_cjs.ApiResource { static TYPE = "promotion_rules"; 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-6TLH43XL.cjs.map //# sourceMappingURL=chunk-6TLH43XL.cjs.map