@aptos-scp/scp-component-store-selling-features-domain-model 2.21.0 → 2.22.1

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.
@@ -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",
@@ -458,7 +459,8 @@ export declare enum UiInputKey {
458
459
  CUSTOMER_INPUT_SCREENS = "input_customerInputScreens",
459
460
  CUSTOMER_INPUT_MODE = "input_customerInputMode",
460
461
  FORCE_FISCAL_COMPLETION = "input_forceFiscalCompletion",
461
- IS_FISCALISE_VOID = "input_isFiscaliseVoid"
462
+ IS_FISCALISE_VOID = "input_isFiscaliseVoid",
463
+ PAYMENT_FUNCTION = "input_paymentFunction"
462
464
  }
463
465
  export declare enum CollectedDataKey {
464
466
  Abort = "abort",
@@ -485,6 +487,7 @@ export declare enum CollectedDataKey {
485
487
  BusinessDayDate = "BusinessDayDate",
486
488
  CancelPaymentFunction = "cancelPaymentFunction",
487
489
  CardNumber = "CardNumber",
490
+ CustomerNumber = "CustomerNumber",
488
491
  CashDrawerStatus = "CashDrawerStatus",
489
492
  CashDrawerStatusChangeSuccess = "cashDrawerStatusChangeSuccess",
490
493
  CashDrawerRequestType = "cashDrawerRequestType",
@@ -632,6 +635,8 @@ export declare enum CollectedDataKey {
632
635
  RewardPrintedNumberLabel = "rewardPrintedNumberLabel",
633
636
  AutoPopulateCardNumberFromCustomer = "autoPopulateCardNumberFromCustomer",
634
637
  RewardCardName = "rewardCardName",
638
+ RewardCardBalanceInquiryRequired = "RewardCardBalanceInquiryRequired",
639
+ RewardCard = "RewardCard",
635
640
  RewardCardAutoApplied = "RewardCardAutoApplied",
636
641
  IsCompetitivePriceDiscount = "isCompetitivePriceDiscount",
637
642
  NextTransactionNumber = "nextTransactionNumber",
@@ -1082,6 +1087,13 @@ export declare enum AssignCustomerForReturnAction {
1082
1087
  export declare enum CustomerInputMode {
1083
1088
  OptInConfirmation = "OptInConfirmation"
1084
1089
  }
1090
+ export declare enum PaymentFunction {
1091
+ AccountLookup = "AccountLookup",
1092
+ AccountSummaryDisplay = "AccountSummaryDisplay",
1093
+ CustomerInput = "CustomerInput",
1094
+ DonationPrompt = "DonationPrompt",
1095
+ TenderAuthorization = "TenderAuthorization"
1096
+ }
1085
1097
  export declare const DELIVERY_CONTACT_UPDATED_EVENT: string;
1086
1098
  export declare const DELIVERY_ITEM_UPDATED_EVENT: string;
1087
1099
  export declare const PAYMENT_ACCOUNT_LOOKUP_EVENT: string;
@@ -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";
@@ -460,6 +461,7 @@ var UiInputKey;
460
461
  UiInputKey["CUSTOMER_INPUT_MODE"] = "input_customerInputMode";
461
462
  UiInputKey["FORCE_FISCAL_COMPLETION"] = "input_forceFiscalCompletion";
462
463
  UiInputKey["IS_FISCALISE_VOID"] = "input_isFiscaliseVoid";
464
+ UiInputKey["PAYMENT_FUNCTION"] = "input_paymentFunction";
463
465
  })(UiInputKey = exports.UiInputKey || (exports.UiInputKey = {}));
464
466
  //
465
467
  // Keys for use in relaying data collectedData (qualification) and nonContextualData (action).
@@ -492,6 +494,7 @@ var CollectedDataKey;
492
494
  CollectedDataKey["BusinessDayDate"] = "BusinessDayDate";
493
495
  CollectedDataKey["CancelPaymentFunction"] = "cancelPaymentFunction";
494
496
  CollectedDataKey["CardNumber"] = "CardNumber";
497
+ CollectedDataKey["CustomerNumber"] = "CustomerNumber";
495
498
  CollectedDataKey["CashDrawerStatus"] = "CashDrawerStatus";
496
499
  CollectedDataKey["CashDrawerStatusChangeSuccess"] = "cashDrawerStatusChangeSuccess";
497
500
  CollectedDataKey["CashDrawerRequestType"] = "cashDrawerRequestType";
@@ -639,6 +642,8 @@ var CollectedDataKey;
639
642
  CollectedDataKey["RewardPrintedNumberLabel"] = "rewardPrintedNumberLabel";
640
643
  CollectedDataKey["AutoPopulateCardNumberFromCustomer"] = "autoPopulateCardNumberFromCustomer";
641
644
  CollectedDataKey["RewardCardName"] = "rewardCardName";
645
+ CollectedDataKey["RewardCardBalanceInquiryRequired"] = "RewardCardBalanceInquiryRequired";
646
+ CollectedDataKey["RewardCard"] = "RewardCard";
642
647
  CollectedDataKey["RewardCardAutoApplied"] = "RewardCardAutoApplied";
643
648
  CollectedDataKey["IsCompetitivePriceDiscount"] = "isCompetitivePriceDiscount";
644
649
  CollectedDataKey["NextTransactionNumber"] = "nextTransactionNumber";
@@ -1088,6 +1093,14 @@ var CustomerInputMode;
1088
1093
  (function (CustomerInputMode) {
1089
1094
  CustomerInputMode["OptInConfirmation"] = "OptInConfirmation";
1090
1095
  })(CustomerInputMode = exports.CustomerInputMode || (exports.CustomerInputMode = {}));
1096
+ var PaymentFunction;
1097
+ (function (PaymentFunction) {
1098
+ PaymentFunction["AccountLookup"] = "AccountLookup";
1099
+ PaymentFunction["AccountSummaryDisplay"] = "AccountSummaryDisplay";
1100
+ PaymentFunction["CustomerInput"] = "CustomerInput";
1101
+ PaymentFunction["DonationPrompt"] = "DonationPrompt";
1102
+ PaymentFunction["TenderAuthorization"] = "TenderAuthorization";
1103
+ })(PaymentFunction = exports.PaymentFunction || (exports.PaymentFunction = {}));
1091
1104
  exports.DELIVERY_CONTACT_UPDATED_EVENT = "Delivery.ContactUpdated";
1092
1105
  exports.DELIVERY_ITEM_UPDATED_EVENT = "Delivery.ItemUpdated";
1093
1106
  exports.PAYMENT_ACCOUNT_LOOKUP_EVENT = "PaymentAccount.Lookup";
@@ -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.21.0",
3
+ "version": "2.22.1",
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",