-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOL-1277: fix wrong syntax in OrderLifeTimeLimitDetectorService.js (#661
- Loading branch information
1 parent
a420fa7
commit faa72b6
Showing
1 changed file
with
19 additions
and
3 deletions.
There are no files selected for viewing
22 changes: 19 additions & 3 deletions
22
...-pluginconfig-section-order-lifetime-warning/services/OderLifeTimeLimitDetectorService.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
export default class OrderLifeTimeLimitsDetector { | ||
maximumOrderLifeTimeKlarna = 28; | ||
maximumOrderLifeTime = 100; | ||
|
||
/** | ||
* | ||
*/ | ||
constructor() { | ||
this.maximumOrderLifeTimeKlarna = 28; | ||
this.maximumOrderLifeTime = 100; | ||
} | ||
|
||
/** | ||
* | ||
* @param orderLifeTime | ||
* @returns {boolean} | ||
*/ | ||
isOderLifeTimeLimitReached(orderLifeTime) { | ||
return orderLifeTime > this.maximumOrderLifeTime; | ||
} | ||
|
||
/** | ||
* | ||
* @param orderLifeTime | ||
* @returns {boolean} | ||
*/ | ||
isKlarnaOrderLifeTimeReached(orderLifeTime) { | ||
return orderLifeTime > this.maximumOrderLifeTimeKlarna && orderLifeTime <= this.maximumOrderLifeTime; | ||
} | ||
|
||
} | ||
} |