@plasma-platform/tm-service-discounts
v2.1.4
Published
Discounts Service API
Downloads
7
Readme
Discounts Service Api
Documentation
Table of Contents
DiscountService
Discount Micro Service API
Parameters
url
string service url
messages
Object with class service messages
Type: Object
applyDiscount
View discount
Examples
To use
(async () => {
const DiscountService = new DiscountService(url);
const result = await DiscountService.viewDiscount();
})();
Returns Object array of posts
getDiscountApplicability
Get discount applicability
Parameters
Examples
To use
(async () => {
const DiscountService = new DiscountService(url);
const result = await DiscountService.getDiscountApplicability('sddf6gdfg6df', {}, []);
})();
Returns Object discount applicability to products provided with params