pricing - add missing scope
MODIFY
src/types/Pricing.ts
src/types/Pricing.ts
@@ -146,20 +146,20 @@ export class PricingTimeLimit {
private minute: number;
private second: number;
- constructor(hour: number, minute: number, second: number) {
+ public constructor(hour: number, minute: number, second: number) {
this.hour = hour;
this.minute = minute;
this.second = second;
}
- static parseTime(timeAsString: string): PricingTimeLimit {
+ public static parseTime(timeAsString: string): PricingTimeLimit {
const hour = Utils.convertToInt(timeAsString.slice(0, 2));
const minute = Utils.convertToInt(timeAsString.slice(3, 5));
const second = Utils.convertToInt(timeAsString.slice(6, 8));
return new PricingTimeLimit(hour, minute, second);
}
- isGreaterThan(aTimeLimit: PricingTimeLimit): boolean {
+ public isGreaterThan(aTimeLimit: PricingTimeLimit): boolean {
if (this.hour === aTimeLimit.hour) {
if (this.minute === aTimeLimit.minute) {
return (this.second > aTimeLimit.second);
@@ -169,11 +169,11 @@ export class PricingTimeLimit {
return (this.hour > aTimeLimit.hour);
}
- isSameOrLowerThan(aTimeLimit: PricingTimeLimit): boolean {
+ public isSameOrLowerThan(aTimeLimit: PricingTimeLimit): boolean {
return !this.isGreaterThan(aTimeLimit);
}
- isLowerThan(aTimeLimit: PricingTimeLimit): boolean {
+ public isLowerThan(aTimeLimit: PricingTimeLimit): boolean {
if (this.hour === aTimeLimit.hour) {
if (this.minute === aTimeLimit.minute) {
return (this.second < aTimeLimit.second);
@@ -183,11 +183,11 @@ export class PricingTimeLimit {
return (this.hour < aTimeLimit.hour);
}
- isSameOrGreaterThan(aTimeLimit: PricingTimeLimit): boolean {
+ public isSameOrGreaterThan(aTimeLimit: PricingTimeLimit): boolean {
return !this.isLowerThan(aTimeLimit);
}
- isBetween(timeFrom: PricingTimeLimit, timeTo: PricingTimeLimit): boolean {
+ public isBetween(timeFrom: PricingTimeLimit, timeTo: PricingTimeLimit): boolean {
// Regular time range or not?
const spanTwoDays = timeTo.isLowerThan(timeFrom);
if (spanTwoDays) {

pricing - add missing scope