3.0.1 • Published 4 years ago

@comparaonline/promotion-engine v3.0.1

Weekly downloads
15
License
MIT
Repository
github
Last release
4 years ago

promotion-engine

Group common behavior and functions for compara promotions

Apply promotion to offer product

VERSION 2.0

import PromotionEngine from '@comparaonline/promotion-engine';

const promotion = getSomePromotion();
const offer = getSomeOffer();
const engine = PromotionEngine.initialize(promotion);
const newProduct = engine.applyToProduct(offer.product);

The code snippet above will return a modified version of the offer product, in order to match a marketplace promotional offer.

promotion and offer object must implement Promotion and Offer interfaces, specified at @comparaonline/offers-models

3.0.1

4 years ago

3.0.0

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago