@aptos-scp/scp-component-store-selling-features-domain-model 2.20.1 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/domain/UIBusinessEventTypes.d.ts +2 -0
- package/lib/domain/UIBusinessEventTypes.js +2 -0
- package/lib/domain/model/Constants.d.ts +5 -0
- package/lib/domain/model/Constants.js +5 -0
- package/lib/domain/model/discounts/BaseCustomerRewardCardLineDecorator.d.ts +12 -0
- package/lib/domain/model/discounts/BaseCustomerRewardCardLineDecorator.js +32 -0
- package/lib/domain/model/discounts/CustomerRewardCardLine.d.ts +23 -0
- package/lib/domain/model/discounts/CustomerRewardCardLine.js +63 -0
- package/lib/domain/model/discounts/VoidedCustomerRewardCardLineDecorator.d.ts +15 -0
- package/lib/domain/model/discounts/VoidedCustomerRewardCardLineDecorator.js +38 -0
- package/lib/domain/model/discounts/index.d.ts +3 -0
- package/lib/domain/model/discounts/index.js +3 -0
- package/lib/domain/model/giftCard/BalanceInquiryLine.d.ts +3 -1
- package/lib/domain/model/giftCard/BalanceInquiryLine.js +10 -4
- package/package.json +1 -1
|
@@ -77,6 +77,7 @@ export declare const PERMANENT_MEMBERSHIP_DISCOUNT_EVENT: string;
|
|
|
77
77
|
export declare const ADD_EMPLOYEE_CUSTOMER_EVENT: string;
|
|
78
78
|
export declare const REWARD_CARD_DISCOUNT_EVENT: string;
|
|
79
79
|
export declare const RESET_REWARD_CARD_BALANCE_INQUIRY_EVENT: string;
|
|
80
|
+
export declare const START_REWARD_CARD_BALANCE_INQUIRY_EVENT: string;
|
|
80
81
|
export declare const APPLY_REWARD_CARD_EVENT: string;
|
|
81
82
|
export declare const VOID_REWARD_CARD_EVENT: string;
|
|
82
83
|
export declare const REMOVE_REWARD_CARD_AUTHORIZATION_EVENT: string;
|
|
@@ -112,6 +113,7 @@ export declare const REMOVE_ASSOCIATED_MANUAL_DISCOUNTS_EVENT: string;
|
|
|
112
113
|
export declare const REMOVE_CUSTOMER_EVENT: string;
|
|
113
114
|
export declare const REMOVE_CUSTOMER_ALTERNATE_KEY_EVENT: string;
|
|
114
115
|
export declare const REMOVE_LOYALTY_DISCOUNTS_EVENT: string;
|
|
116
|
+
export declare const REMOVE_REWARD_CARD_DISCOUNTS_EVENT: string;
|
|
115
117
|
export declare const REPRINT_LAST_RECEIPT_EVENT: string;
|
|
116
118
|
export declare const REPRINT_LAST_TRANSACTION_RECEIPTS_EVENT: string;
|
|
117
119
|
export declare const REPRINT_RECEIPT_EVENT: string;
|
|
@@ -80,6 +80,7 @@ exports.PERMANENT_MEMBERSHIP_DISCOUNT_EVENT = "PermanentMembershipDiscount";
|
|
|
80
80
|
exports.ADD_EMPLOYEE_CUSTOMER_EVENT = "AddEmployeeCustomer";
|
|
81
81
|
exports.REWARD_CARD_DISCOUNT_EVENT = "RewardCardDiscount";
|
|
82
82
|
exports.RESET_REWARD_CARD_BALANCE_INQUIRY_EVENT = "ResetRewardCardBalanceInquiryDiscount";
|
|
83
|
+
exports.START_REWARD_CARD_BALANCE_INQUIRY_EVENT = "StartRewardCardBalanceInquiry";
|
|
83
84
|
exports.APPLY_REWARD_CARD_EVENT = "ApplyRewardCard";
|
|
84
85
|
exports.VOID_REWARD_CARD_EVENT = "VoidRewardCard";
|
|
85
86
|
exports.REMOVE_REWARD_CARD_AUTHORIZATION_EVENT = "RemoveRewardCardAuthorization";
|
|
@@ -115,6 +116,7 @@ exports.REMOVE_ASSOCIATED_MANUAL_DISCOUNTS_EVENT = "RemoveDiscounts";
|
|
|
115
116
|
exports.REMOVE_CUSTOMER_EVENT = "RemoveCustomer";
|
|
116
117
|
exports.REMOVE_CUSTOMER_ALTERNATE_KEY_EVENT = "RemoveCustomerAlternateKey";
|
|
117
118
|
exports.REMOVE_LOYALTY_DISCOUNTS_EVENT = "RemoveLoyaltyDiscounts";
|
|
119
|
+
exports.REMOVE_REWARD_CARD_DISCOUNTS_EVENT = "RemoveRewardCardDiscounts";
|
|
118
120
|
exports.REPRINT_LAST_RECEIPT_EVENT = "ReprintLastReceipt";
|
|
119
121
|
exports.REPRINT_LAST_TRANSACTION_RECEIPTS_EVENT = "ReprintLastTransactionReceipts";
|
|
120
122
|
exports.REPRINT_RECEIPT_EVENT = "ReprintReceipt";
|
|
@@ -165,6 +165,7 @@ export declare enum UiInputKey {
|
|
|
165
165
|
FOREIGN_TENDER_AMOUNT = "input_foreignTenderAmount",
|
|
166
166
|
FORFEIT_TENDER_CHANGE_CONFIRMATION = "input_forfeitTenderChange",
|
|
167
167
|
REWARD_CARD_CONFIG = "input_rewardCardConfig",
|
|
168
|
+
CUSTOMER_REWARD_CARD = "input_customerRewardCard",
|
|
168
169
|
REDEEM_CARD_NUMBER = "input_redeemCardNumber",
|
|
169
170
|
REDEEMED_REDEMPTIONS = "input_redeemedRedemptions",
|
|
170
171
|
LOYALTY_PLANS = "input_loyaltyPlans",
|
|
@@ -456,6 +457,7 @@ export declare enum UiInputKey {
|
|
|
456
457
|
FISCAL_RETRY = "input_fiscalRetry",
|
|
457
458
|
MAX_FISCAL_RETRY = "input_maxFiscalRetry",
|
|
458
459
|
CUSTOMER_INPUT_SCREENS = "input_customerInputScreens",
|
|
460
|
+
CUSTOMER_INPUT_MODE = "input_customerInputMode",
|
|
459
461
|
FORCE_FISCAL_COMPLETION = "input_forceFiscalCompletion",
|
|
460
462
|
IS_FISCALISE_VOID = "input_isFiscaliseVoid"
|
|
461
463
|
}
|
|
@@ -484,6 +486,7 @@ export declare enum CollectedDataKey {
|
|
|
484
486
|
BusinessDayDate = "BusinessDayDate",
|
|
485
487
|
CancelPaymentFunction = "cancelPaymentFunction",
|
|
486
488
|
CardNumber = "CardNumber",
|
|
489
|
+
CustomerNumber = "CustomerNumber",
|
|
487
490
|
CashDrawerStatus = "CashDrawerStatus",
|
|
488
491
|
CashDrawerStatusChangeSuccess = "cashDrawerStatusChangeSuccess",
|
|
489
492
|
CashDrawerRequestType = "cashDrawerRequestType",
|
|
@@ -631,6 +634,8 @@ export declare enum CollectedDataKey {
|
|
|
631
634
|
RewardPrintedNumberLabel = "rewardPrintedNumberLabel",
|
|
632
635
|
AutoPopulateCardNumberFromCustomer = "autoPopulateCardNumberFromCustomer",
|
|
633
636
|
RewardCardName = "rewardCardName",
|
|
637
|
+
RewardCardBalanceInquiryRequired = "RewardCardBalanceInquiryRequired",
|
|
638
|
+
RewardCard = "RewardCard",
|
|
634
639
|
RewardCardAutoApplied = "RewardCardAutoApplied",
|
|
635
640
|
IsCompetitivePriceDiscount = "isCompetitivePriceDiscount",
|
|
636
641
|
NextTransactionNumber = "nextTransactionNumber",
|
|
@@ -166,6 +166,7 @@ var UiInputKey;
|
|
|
166
166
|
UiInputKey["FOREIGN_TENDER_AMOUNT"] = "input_foreignTenderAmount";
|
|
167
167
|
UiInputKey["FORFEIT_TENDER_CHANGE_CONFIRMATION"] = "input_forfeitTenderChange";
|
|
168
168
|
UiInputKey["REWARD_CARD_CONFIG"] = "input_rewardCardConfig";
|
|
169
|
+
UiInputKey["CUSTOMER_REWARD_CARD"] = "input_customerRewardCard";
|
|
169
170
|
UiInputKey["REDEEM_CARD_NUMBER"] = "input_redeemCardNumber";
|
|
170
171
|
UiInputKey["REDEEMED_REDEMPTIONS"] = "input_redeemedRedemptions";
|
|
171
172
|
UiInputKey["LOYALTY_PLANS"] = "input_loyaltyPlans";
|
|
@@ -457,6 +458,7 @@ var UiInputKey;
|
|
|
457
458
|
UiInputKey["FISCAL_RETRY"] = "input_fiscalRetry";
|
|
458
459
|
UiInputKey["MAX_FISCAL_RETRY"] = "input_maxFiscalRetry";
|
|
459
460
|
UiInputKey["CUSTOMER_INPUT_SCREENS"] = "input_customerInputScreens";
|
|
461
|
+
UiInputKey["CUSTOMER_INPUT_MODE"] = "input_customerInputMode";
|
|
460
462
|
UiInputKey["FORCE_FISCAL_COMPLETION"] = "input_forceFiscalCompletion";
|
|
461
463
|
UiInputKey["IS_FISCALISE_VOID"] = "input_isFiscaliseVoid";
|
|
462
464
|
})(UiInputKey = exports.UiInputKey || (exports.UiInputKey = {}));
|
|
@@ -491,6 +493,7 @@ var CollectedDataKey;
|
|
|
491
493
|
CollectedDataKey["BusinessDayDate"] = "BusinessDayDate";
|
|
492
494
|
CollectedDataKey["CancelPaymentFunction"] = "cancelPaymentFunction";
|
|
493
495
|
CollectedDataKey["CardNumber"] = "CardNumber";
|
|
496
|
+
CollectedDataKey["CustomerNumber"] = "CustomerNumber";
|
|
494
497
|
CollectedDataKey["CashDrawerStatus"] = "CashDrawerStatus";
|
|
495
498
|
CollectedDataKey["CashDrawerStatusChangeSuccess"] = "cashDrawerStatusChangeSuccess";
|
|
496
499
|
CollectedDataKey["CashDrawerRequestType"] = "cashDrawerRequestType";
|
|
@@ -638,6 +641,8 @@ var CollectedDataKey;
|
|
|
638
641
|
CollectedDataKey["RewardPrintedNumberLabel"] = "rewardPrintedNumberLabel";
|
|
639
642
|
CollectedDataKey["AutoPopulateCardNumberFromCustomer"] = "autoPopulateCardNumberFromCustomer";
|
|
640
643
|
CollectedDataKey["RewardCardName"] = "rewardCardName";
|
|
644
|
+
CollectedDataKey["RewardCardBalanceInquiryRequired"] = "RewardCardBalanceInquiryRequired";
|
|
645
|
+
CollectedDataKey["RewardCard"] = "RewardCard";
|
|
641
646
|
CollectedDataKey["RewardCardAutoApplied"] = "RewardCardAutoApplied";
|
|
642
647
|
CollectedDataKey["IsCompetitivePriceDiscount"] = "isCompetitivePriceDiscount";
|
|
643
648
|
CollectedDataKey["NextTransactionNumber"] = "nextTransactionNumber";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseLineDecorator } from "../BaseLineDecorator";
|
|
2
|
+
import { CustomerRewardCardLine } from "./CustomerRewardCardLine";
|
|
3
|
+
export declare abstract class BaseCustomerRewardCardLineDecorator extends BaseLineDecorator<CustomerRewardCardLine> {
|
|
4
|
+
get couldAffectPricing(): boolean;
|
|
5
|
+
get customerNumber(): string;
|
|
6
|
+
get cardNumber(): string;
|
|
7
|
+
get pin(): string;
|
|
8
|
+
get allowVoid(): boolean;
|
|
9
|
+
get preventsTransactionVoid(): boolean;
|
|
10
|
+
protected constructor(lineDecoratorType: string, decoratedTransactionLine: CustomerRewardCardLine, annotationDescription: string, annotationSourceType: string, annotationSourceLineNumber?: number);
|
|
11
|
+
protected clone(): BaseCustomerRewardCardLineDecorator;
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseLineDecorator_1 = require("../BaseLineDecorator");
|
|
4
|
+
class BaseCustomerRewardCardLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
|
|
5
|
+
get couldAffectPricing() {
|
|
6
|
+
return this.decoratedTransactionLine.couldAffectPricing;
|
|
7
|
+
}
|
|
8
|
+
get customerNumber() {
|
|
9
|
+
return this.decoratedTransactionLine.customerNumber;
|
|
10
|
+
}
|
|
11
|
+
get cardNumber() {
|
|
12
|
+
return this.decoratedTransactionLine.cardNumber;
|
|
13
|
+
}
|
|
14
|
+
get pin() {
|
|
15
|
+
return this.decoratedTransactionLine.pin;
|
|
16
|
+
}
|
|
17
|
+
get allowVoid() {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
get preventsTransactionVoid() {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
constructor(lineDecoratorType, decoratedTransactionLine, annotationDescription, annotationSourceType, annotationSourceLineNumber) {
|
|
24
|
+
super(lineDecoratorType, decoratedTransactionLine, annotationDescription, annotationSourceType, annotationSourceLineNumber);
|
|
25
|
+
}
|
|
26
|
+
clone() {
|
|
27
|
+
const newBaseCustomerRewardCardLineDecorator = super.clone();
|
|
28
|
+
return newBaseCustomerRewardCardLineDecorator;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.BaseCustomerRewardCardLineDecorator = BaseCustomerRewardCardLineDecorator;
|
|
32
|
+
//# sourceMappingURL=BaseCustomerRewardCardLineDecorator.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
3
|
+
import { IVoidableLine } from "../VoidInterfaces";
|
|
4
|
+
import { VoidSource } from "../Constants";
|
|
5
|
+
export declare const CUSTOMER_REWARD_CARD_LINE_TYPE: string;
|
|
6
|
+
export declare class CustomerRewardCardLine extends BaseTransactionLine implements IVoidableLine {
|
|
7
|
+
private _cardNumber;
|
|
8
|
+
private _customerNumber;
|
|
9
|
+
private _pin;
|
|
10
|
+
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): CustomerRewardCardLine;
|
|
11
|
+
static createFromJsonObject(transactionLineJsonObj: any): CustomerRewardCardLine;
|
|
12
|
+
get customerNumber(): string;
|
|
13
|
+
get cardNumber(): string;
|
|
14
|
+
get pin(): string;
|
|
15
|
+
get couldAffectPricing(): boolean;
|
|
16
|
+
get voided(): boolean;
|
|
17
|
+
get voidSource(): VoidSource;
|
|
18
|
+
get preventsTransactionVoid(): boolean;
|
|
19
|
+
get allowVoid(): boolean;
|
|
20
|
+
constructor(lineNumber: number, lineType: string, customerNumber: string, cardNumber: string, pin: string);
|
|
21
|
+
protected newTransactionLine(): BaseTransactionLine;
|
|
22
|
+
}
|
|
23
|
+
export declare function isCustomerRewardCardLine(transactionLine: ITransactionLine): transactionLine is CustomerRewardCardLine;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseTransactionLine_1 = require("../BaseTransactionLine");
|
|
4
|
+
const Constants_1 = require("../Constants");
|
|
5
|
+
exports.CUSTOMER_REWARD_CARD_LINE_TYPE = "CustomerRewardCard";
|
|
6
|
+
class CustomerRewardCardLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
7
|
+
constructor(lineNumber, lineType, customerNumber, cardNumber, pin) {
|
|
8
|
+
super(lineNumber, lineType);
|
|
9
|
+
this._customerNumber = customerNumber;
|
|
10
|
+
this._cardNumber = cardNumber;
|
|
11
|
+
this._pin = pin;
|
|
12
|
+
}
|
|
13
|
+
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
14
|
+
const customerNumber = collectedData.get(Constants_1.CollectedDataKey.CustomerNumber);
|
|
15
|
+
const cardNumber = collectedData.get(Constants_1.CollectedDataKey.CardNumber);
|
|
16
|
+
const pin = collectedData.get(Constants_1.CollectedDataKey.GiftCardPin);
|
|
17
|
+
return new CustomerRewardCardLine(lineNumber, lineType, customerNumber, cardNumber, pin);
|
|
18
|
+
}
|
|
19
|
+
static createFromJsonObject(transactionLineJsonObj) {
|
|
20
|
+
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
21
|
+
const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
|
|
22
|
+
const cardNumber = transactionLineJsonObj._cardNumber;
|
|
23
|
+
const customerNumber = transactionLineJsonObj._customerNumber;
|
|
24
|
+
const pin = transactionLineJsonObj._pin;
|
|
25
|
+
const customerRewardCardLine = new CustomerRewardCardLine(lineNumber, lineType, customerNumber, cardNumber, pin);
|
|
26
|
+
customerRewardCardLine.loadFromJsonObject(transactionLineJsonObj);
|
|
27
|
+
return customerRewardCardLine;
|
|
28
|
+
}
|
|
29
|
+
get customerNumber() {
|
|
30
|
+
return this._customerNumber;
|
|
31
|
+
}
|
|
32
|
+
get cardNumber() {
|
|
33
|
+
return this._cardNumber;
|
|
34
|
+
}
|
|
35
|
+
get pin() {
|
|
36
|
+
return this._pin;
|
|
37
|
+
}
|
|
38
|
+
get couldAffectPricing() {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
get voided() {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
get voidSource() {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
get preventsTransactionVoid() {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
get allowVoid() {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
newTransactionLine() {
|
|
54
|
+
return new CustomerRewardCardLine(this.lineNumber, this.lineType, this._customerNumber, this._cardNumber, this._pin);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.CustomerRewardCardLine = CustomerRewardCardLine;
|
|
58
|
+
function isCustomerRewardCardLine(transactionLine) {
|
|
59
|
+
return (transactionLine instanceof CustomerRewardCardLine ||
|
|
60
|
+
transactionLine.lineType === exports.CUSTOMER_REWARD_CARD_LINE_TYPE);
|
|
61
|
+
}
|
|
62
|
+
exports.isCustomerRewardCardLine = isCustomerRewardCardLine;
|
|
63
|
+
//# sourceMappingURL=CustomerRewardCardLine.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { VoidSource } from "../Constants";
|
|
3
|
+
import { BaseCustomerRewardCardLineDecorator } from "./BaseCustomerRewardCardLineDecorator";
|
|
4
|
+
import { CustomerRewardCardLine } from "./CustomerRewardCardLine";
|
|
5
|
+
export declare const DECORATOR_TYPE_VOIDED_CUSTOMER_REWARD_CARD_LINE: string;
|
|
6
|
+
export declare class VoidedCustomerRewardCardLineDecorator extends BaseCustomerRewardCardLineDecorator {
|
|
7
|
+
private _voidSource;
|
|
8
|
+
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): VoidedCustomerRewardCardLineDecorator;
|
|
9
|
+
get preventsTransactionVoid(): boolean;
|
|
10
|
+
get allowVoid(): boolean;
|
|
11
|
+
get voided(): boolean;
|
|
12
|
+
get voidSource(): VoidSource;
|
|
13
|
+
constructor(voidSource: VoidSource, customerRewardCardLine: CustomerRewardCardLine, annotationSourceLineNumber: number);
|
|
14
|
+
protected newTransactionLine(): VoidedCustomerRewardCardLineDecorator;
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseLineDecorator_1 = require("../BaseLineDecorator");
|
|
4
|
+
const VoidedLineDecorator_1 = require("../void/VoidedLineDecorator");
|
|
5
|
+
const BaseCustomerRewardCardLineDecorator_1 = require("./BaseCustomerRewardCardLineDecorator");
|
|
6
|
+
const VOIDED_CUSTOMER_REWARD_CARD_ANNOTATION_SOURCE_TYPE = "VoidedCustomerRewardCard";
|
|
7
|
+
exports.DECORATOR_TYPE_VOIDED_CUSTOMER_REWARD_CARD_LINE = "VOIDED_CUSTOMER_REWARD_CARD_DECORATOR";
|
|
8
|
+
class VoidedCustomerRewardCardLineDecorator extends BaseCustomerRewardCardLineDecorator_1.BaseCustomerRewardCardLineDecorator {
|
|
9
|
+
constructor(voidSource, customerRewardCardLine, annotationSourceLineNumber) {
|
|
10
|
+
super(exports.DECORATOR_TYPE_VOIDED_CUSTOMER_REWARD_CARD_LINE, customerRewardCardLine, VoidedLineDecorator_1.DECORATOR_DESCRIPTION_VOIDED, VOIDED_CUSTOMER_REWARD_CARD_ANNOTATION_SOURCE_TYPE, annotationSourceLineNumber);
|
|
11
|
+
this._voidSource = voidSource;
|
|
12
|
+
}
|
|
13
|
+
static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
|
|
14
|
+
const decoratedTransactionLineJsonObj = BaseLineDecorator_1.BaseLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
|
|
15
|
+
const decoratedLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
|
|
16
|
+
const annotationSourceLineNumber = BaseLineDecorator_1.BaseLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
|
|
17
|
+
const voidSource = transactionLineJsonObj._voidSource;
|
|
18
|
+
const voidedExtensibilityFormDataLineDecorator = new VoidedCustomerRewardCardLineDecorator(voidSource, decoratedLine, annotationSourceLineNumber);
|
|
19
|
+
return voidedExtensibilityFormDataLineDecorator;
|
|
20
|
+
}
|
|
21
|
+
get preventsTransactionVoid() {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
get allowVoid() {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
get voided() {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
get voidSource() {
|
|
31
|
+
return this._voidSource;
|
|
32
|
+
}
|
|
33
|
+
newTransactionLine() {
|
|
34
|
+
return new VoidedCustomerRewardCardLineDecorator(this._voidSource, this.decoratedTransactionLine, this.annotationSourceLineNumber);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.VoidedCustomerRewardCardLineDecorator = VoidedCustomerRewardCardLineDecorator;
|
|
38
|
+
//# sourceMappingURL=VoidedCustomerRewardCardLineDecorator.js.map
|
|
@@ -21,4 +21,7 @@ export * from "./RewardCardDiscountLine";
|
|
|
21
21
|
export * from "./RewardCardDiscountLineDecorator";
|
|
22
22
|
export * from "./VoidedRewardCardDiscountLineDecorator";
|
|
23
23
|
export * from "./PromotionCouponLine";
|
|
24
|
+
export * from "./CustomerRewardCardLine";
|
|
25
|
+
export * from "./BaseCustomerRewardCardLineDecorator";
|
|
26
|
+
export * from "./VoidedCustomerRewardCardLineDecorator";
|
|
24
27
|
export * from "./employee/";
|
|
@@ -23,5 +23,8 @@ __export(require("./RewardCardDiscountLine"));
|
|
|
23
23
|
__export(require("./RewardCardDiscountLineDecorator"));
|
|
24
24
|
__export(require("./VoidedRewardCardDiscountLineDecorator"));
|
|
25
25
|
__export(require("./PromotionCouponLine"));
|
|
26
|
+
__export(require("./CustomerRewardCardLine"));
|
|
27
|
+
__export(require("./BaseCustomerRewardCardLineDecorator"));
|
|
28
|
+
__export(require("./VoidedCustomerRewardCardLineDecorator"));
|
|
26
29
|
__export(require("./employee/"));
|
|
27
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -8,6 +8,7 @@ export declare class BalanceInquiryLine extends BaseTransactionLine {
|
|
|
8
8
|
private _authorizationDeviceId;
|
|
9
9
|
private _cardNumber;
|
|
10
10
|
private _tenderType;
|
|
11
|
+
private _isCustomerRewardCard;
|
|
11
12
|
/**
|
|
12
13
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
13
14
|
* data collected during the qualification process.
|
|
@@ -27,8 +28,9 @@ export declare class BalanceInquiryLine extends BaseTransactionLine {
|
|
|
27
28
|
get couldAffectPricing(): boolean;
|
|
28
29
|
get authResponse(): IAuthorizationResponse;
|
|
29
30
|
get cardNumber(): string;
|
|
31
|
+
get isCustomerRewardCard(): boolean;
|
|
30
32
|
get authorizationDeviceId(): string;
|
|
31
|
-
protected constructor(lineNumber: number, lineType: string, cardNumber: string, authResponse: IAuthorizationResponse, authorizationDeviceId: string, tenderType: TenderType);
|
|
33
|
+
protected constructor(lineNumber: number, lineType: string, cardNumber: string, authResponse: IAuthorizationResponse, authorizationDeviceId: string, tenderType: TenderType, isCustomerRewardCard?: boolean);
|
|
32
34
|
protected newTransactionLine(): BalanceInquiryLine;
|
|
33
35
|
}
|
|
34
36
|
export declare function isBalanceInquiryLine(transactionLine: ITransactionLine): transactionLine is BalanceInquiryLine;
|
|
@@ -6,12 +6,13 @@ const Constants_1 = require("../Constants");
|
|
|
6
6
|
const TenderType_1 = require("../TenderType");
|
|
7
7
|
exports.BALANCE_INQUIRY_LINE_TYPE = "BalanceInquiry";
|
|
8
8
|
class BalanceInquiryLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
9
|
-
constructor(lineNumber, lineType, cardNumber, authResponse, authorizationDeviceId, tenderType) {
|
|
9
|
+
constructor(lineNumber, lineType, cardNumber, authResponse, authorizationDeviceId, tenderType, isCustomerRewardCard) {
|
|
10
10
|
super(lineNumber, lineType);
|
|
11
11
|
this._authResponse = authResponse;
|
|
12
12
|
this._authorizationDeviceId = authorizationDeviceId;
|
|
13
13
|
this._cardNumber = cardNumber;
|
|
14
14
|
this._tenderType = tenderType;
|
|
15
|
+
this._isCustomerRewardCard = isCustomerRewardCard;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
@@ -27,9 +28,10 @@ class BalanceInquiryLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
27
28
|
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
28
29
|
const authResponse = collectedData.get(Constants_1.CollectedDataKey.BalanceInquiryResponse);
|
|
29
30
|
const cardNumber = collectedData.get(Constants_1.CollectedDataKey.CardNumber);
|
|
31
|
+
const isCustomerRewardCard = collectedData.get(Constants_1.CollectedDataKey.RewardCard);
|
|
30
32
|
const authorizationDeviceId = collectedData.get(Constants_1.CollectedDataKey.AuthorizationDeviceId);
|
|
31
33
|
const tenderType = collectedData.get(Constants_1.CollectedDataKey.TenderType);
|
|
32
|
-
return new BalanceInquiryLine(lineNumber, lineType, cardNumber, authResponse, authorizationDeviceId, tenderType);
|
|
34
|
+
return new BalanceInquiryLine(lineNumber, lineType, cardNumber, authResponse, authorizationDeviceId, tenderType, isCustomerRewardCard);
|
|
33
35
|
}
|
|
34
36
|
static createFromJsonObject(transactionLineJsonObj) {
|
|
35
37
|
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
@@ -37,6 +39,7 @@ class BalanceInquiryLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
37
39
|
const authResponse = transactionLineJsonObj._authResponse;
|
|
38
40
|
const cardNumber = transactionLineJsonObj._cardNumber;
|
|
39
41
|
const tenderType = TenderType_1.TenderType.createFromJsonObject(transactionLineJsonObj._tenderType);
|
|
42
|
+
const isCustomerRewardCard = transactionLineJsonObj._isCustomerRewardCard;
|
|
40
43
|
if (transactionLineJsonObj._authResponse) {
|
|
41
44
|
if (transactionLineJsonObj._authResponse.balance) {
|
|
42
45
|
authResponse.balance = new scp_component_business_core_1.Money(transactionLineJsonObj._authResponse.balance);
|
|
@@ -49,7 +52,7 @@ class BalanceInquiryLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
const authorizationDeviceId = transactionLineJsonObj._authorizationDeviceId;
|
|
52
|
-
const balanceInquiryLine = new BalanceInquiryLine(lineNumber, lineType, cardNumber, authResponse, authorizationDeviceId, tenderType);
|
|
55
|
+
const balanceInquiryLine = new BalanceInquiryLine(lineNumber, lineType, cardNumber, authResponse, authorizationDeviceId, tenderType, isCustomerRewardCard);
|
|
53
56
|
balanceInquiryLine.loadFromJsonObject(transactionLineJsonObj);
|
|
54
57
|
return balanceInquiryLine;
|
|
55
58
|
}
|
|
@@ -71,11 +74,14 @@ class BalanceInquiryLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
71
74
|
get cardNumber() {
|
|
72
75
|
return this._cardNumber;
|
|
73
76
|
}
|
|
77
|
+
get isCustomerRewardCard() {
|
|
78
|
+
return this._isCustomerRewardCard;
|
|
79
|
+
}
|
|
74
80
|
get authorizationDeviceId() {
|
|
75
81
|
return this._authorizationDeviceId;
|
|
76
82
|
}
|
|
77
83
|
newTransactionLine() {
|
|
78
|
-
return new BalanceInquiryLine(this.lineNumber, this.lineType, this._cardNumber, this._authResponse, this._authorizationDeviceId, this._tenderType);
|
|
84
|
+
return new BalanceInquiryLine(this.lineNumber, this.lineType, this._cardNumber, this._authResponse, this._authorizationDeviceId, this._tenderType, this._isCustomerRewardCard);
|
|
79
85
|
}
|
|
80
86
|
}
|
|
81
87
|
exports.BalanceInquiryLine = BalanceInquiryLine;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-store-selling-features-domain-model",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"description": "This component library provides the common components to handle the coordination of processing the business events from the UI.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|