vanilli-shop-client
Advanced tools
Comparing version 1.6.7 to 1.6.8
@@ -33,2 +33,3 @@ import { IBaseDto, IPropertyDto } from "./base"; | ||
static getLink(product: IProductBaseDto): string; | ||
static getLinkWithCategory(product: IProductDto): string; | ||
static getDiscountPercentage(product: IProductBaseDto): number; | ||
@@ -35,0 +36,0 @@ static hasStock(product: IProductBaseDto): boolean; |
@@ -20,2 +20,10 @@ "use strict"; | ||
}; | ||
Product.getLinkWithCategory = function (product) { | ||
var refType = ProductRefTypeEnum.Id; | ||
var ref = product.ref; | ||
if (ref === product.code) { | ||
refType = ProductRefTypeEnum.Code; | ||
} | ||
return "/products/" + product.categoryName + "/" + ref + "?refType=" + refType; | ||
}; | ||
Product.getDiscountPercentage = function (product) { | ||
@@ -22,0 +30,0 @@ var discountPrice = product.discountPrice; |
{ | ||
"name": "vanilli-shop-client", | ||
"version": "1.6.7", | ||
"version": "1.6.8", | ||
"description": "Client for Vanilli Shop API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -49,2 +49,13 @@ import {IBaseDto, IPropertyDto} from "./base"; | ||
static getLinkWithCategory(product: IProductDto): string { | ||
let refType = ProductRefTypeEnum.Id; | ||
const ref = product.ref; | ||
if (ref === product.code) { | ||
refType = ProductRefTypeEnum.Code; | ||
} | ||
return `/products/${product.categoryName}/${ref}?refType=${refType}`; | ||
} | ||
static getDiscountPercentage(product: IProductBaseDto): number { | ||
@@ -51,0 +62,0 @@ const discountPrice = product.discountPrice; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
270454
6033