@aptos-scp/scp-component-store-selling-features-domain-model 2.17.0 → 2.19.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.
@@ -77,6 +77,8 @@ 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 APPLY_REWARD_CARD_EVENT: string;
81
+ export declare const VOID_REWARD_CARD_EVENT: string;
80
82
  export declare const APPLY_EMPLOYEE_CUSTOMER_DISCOUNT_EVENT = "ApplyEmployeeCustomerDiscount";
81
83
  export declare const MODIFY_EMPLOYEE_MANUAL_DISCOUNT_EVENT: string;
82
84
  export declare const MODIFY_ITEM_MANUAL_DISCOUNT_EVENT: string;
@@ -80,6 +80,8 @@ 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.APPLY_REWARD_CARD_EVENT = "ApplyRewardCard";
84
+ exports.VOID_REWARD_CARD_EVENT = "VoidRewardCard";
83
85
  exports.APPLY_EMPLOYEE_CUSTOMER_DISCOUNT_EVENT = "ApplyEmployeeCustomerDiscount";
84
86
  exports.MODIFY_EMPLOYEE_MANUAL_DISCOUNT_EVENT = "ModifyEmployeeManualDiscount";
85
87
  exports.MODIFY_ITEM_MANUAL_DISCOUNT_EVENT = "ModifyItemManualDiscount";
@@ -0,0 +1,24 @@
1
+ import { Money } from "@aptos-scp/scp-component-business-core";
2
+ import { IAuthorizationResponse } from "@aptos-scp/scp-types-commerce-devices";
3
+ import { ManualDiscountLevel } from "../configuration";
4
+ import { TenderType } from "../TenderType";
5
+ import { IManualDiscountLine } from "./IManualDiscountLine";
6
+ export interface IRewardCardDiscountLine extends IManualDiscountLine {
7
+ readonly cardNumber: string;
8
+ readonly discountLevel: ManualDiscountLevel;
9
+ readonly rewardPrintedName: string;
10
+ readonly rewardPrintedNumberLabel: string;
11
+ readonly rewardCardName: string;
12
+ readonly autoPopulateCardNumberFromCustomer: boolean;
13
+ readonly pin: string;
14
+ readonly inputSource: string;
15
+ /**
16
+ * The tenderId is the id of the tender associated with reward card authorization
17
+ */
18
+ readonly tenderId: string;
19
+ readonly authResponse: IAuthorizationResponse;
20
+ readonly tenderAmount: Money;
21
+ readonly tenderType: TenderType;
22
+ readonly authorizationDeviceId: string;
23
+ readonly isAuthorized: boolean;
24
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IRewardCardDiscountLine.js.map
@@ -1,24 +1,25 @@
1
1
  import { Money, Price } from "@aptos-scp/scp-component-business-core";
2
2
  import { UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
3
3
  import { DiscountEntryType, ITransactionLineReferenceType, ManualDiscountType } from "@aptos-scp/scp-types-commerce-transaction";
4
- import { IAuthorizationResponse, TenderType } from "@aptos-scp/scp-types-commerce-devices";
4
+ import { IAuthorizationResponse } from "@aptos-scp/scp-types-commerce-devices";
5
5
  import { BaseTransactionLine } from "../BaseTransactionLine";
6
6
  import { ManualDiscountLevel } from "../configuration";
7
+ import { TenderType } from "../TenderType";
7
8
  import { BaseManualDiscountLine } from "./BaseManualDiscountLine";
8
- export declare class RewardCardDiscountLine extends BaseManualDiscountLine {
9
- readonly _cardNumber: string;
10
- readonly _discountLevel: ManualDiscountLevel;
11
- readonly _rewardPrintedName: string;
12
- readonly _rewardPrintedNumberLabel: string;
13
- readonly _rewardCardName: string;
14
- readonly _autoPopulateCardNumberFromCustomer: boolean;
15
- readonly _pin: string;
9
+ import { IRewardCardDiscountLine } from "./IRewardCardDiscountLine";
10
+ export declare class RewardCardDiscountLine extends BaseManualDiscountLine implements IRewardCardDiscountLine {
11
+ private _cardNumber;
12
+ private _discountLevel;
13
+ private _rewardPrintedName;
14
+ private _rewardPrintedNumberLabel;
15
+ private _rewardCardName;
16
+ private _autoPopulateCardNumberFromCustomer;
17
+ private _pin;
18
+ private _inputSource;
16
19
  /**
17
20
  * The tenderId is the id of the tender associated with reward card authorization
18
21
  */
19
- readonly _tenderId: string;
20
- readonly _authResponse: IAuthorizationResponse;
21
- readonly _tenderType: TenderType;
22
+ private _tenderId;
22
23
  /**
23
24
  * The create method is called by the transaction line factory to create an instance and initialize it from the
24
25
  * data collected during the qualification process.
@@ -32,6 +33,7 @@ export declare class RewardCardDiscountLine extends BaseManualDiscountLine {
32
33
  */
33
34
  static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): RewardCardDiscountLine;
34
35
  static createFromJsonObject(transactionLineJsonObj: any): RewardCardDiscountLine;
36
+ get inputSource(): string;
35
37
  get discountLevel(): ManualDiscountLevel;
36
38
  get autoPopulateCardNumberFromCustomer(): boolean;
37
39
  get cardNumber(): string;
@@ -40,6 +42,11 @@ export declare class RewardCardDiscountLine extends BaseManualDiscountLine {
40
42
  get rewardPrintedNumberLabel(): string;
41
43
  get tenderId(): string;
42
44
  get pin(): string;
43
- protected constructor(lineNumber: number, lineType: string, discountType: ManualDiscountType, discountLevel: ManualDiscountLevel, rewardPrintedName: string, rewardPrintedNumberLabel: string, rewardCardName: string, autoPopulateCardNumberFromCustomer: boolean, tenderId: string, pin: string, cardNumber: string, pricingRuleId?: string, amount?: Money, percent?: string, replacementUnitPrice?: Price, reasonCode?: string, reasonDesc?: string, reasonType?: string, couponCode?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, isEmployeeDiscount?: boolean, isFastDiscount?: boolean, competitivePrice?: Price, competitor?: string, formOfProof?: string, customCompetitorName?: string, customFormOfProof?: string, competitorCode?: string, formOfProofCode?: string, entryType?: DiscountEntryType);
45
+ get authResponse(): IAuthorizationResponse;
46
+ get tenderAmount(): Money;
47
+ get tenderType(): TenderType;
48
+ get authorizationDeviceId(): string;
49
+ get isAuthorized(): boolean;
50
+ protected constructor(lineNumber: number, lineType: string, discountType: ManualDiscountType, discountLevel: ManualDiscountLevel, rewardPrintedName: string, rewardPrintedNumberLabel: string, rewardCardName: string, autoPopulateCardNumberFromCustomer: boolean, tenderId: string, pin: string, cardNumber: string, inputSource: string, pricingRuleId?: string, amount?: Money, percent?: string, replacementUnitPrice?: Price, reasonCode?: string, reasonDesc?: string, reasonType?: string, couponCode?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, isEmployeeDiscount?: boolean, isFastDiscount?: boolean, competitivePrice?: Price, competitor?: string, formOfProof?: string, customCompetitorName?: string, customFormOfProof?: string, competitorCode?: string, formOfProofCode?: string, entryType?: DiscountEntryType);
44
51
  protected newTransactionLine(): BaseTransactionLine;
45
52
  }
@@ -5,7 +5,7 @@ const Constants_1 = require("../Constants");
5
5
  const BaseManualDiscountLine_1 = require("./BaseManualDiscountLine");
6
6
  class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscountLine {
7
7
  // Since the constructor is only called from the create methods it is made protected to prevent use by others.
8
- constructor(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, pricingRuleId, amount, percent, replacementUnitPrice, reasonCode, reasonDesc, reasonType, couponCode, supervisorOverrideLineReference, isEmployeeDiscount, isFastDiscount, competitivePrice, competitor, formOfProof, customCompetitorName, customFormOfProof, competitorCode, formOfProofCode, entryType) {
8
+ constructor(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, inputSource, pricingRuleId, amount, percent, replacementUnitPrice, reasonCode, reasonDesc, reasonType, couponCode, supervisorOverrideLineReference, isEmployeeDiscount, isFastDiscount, competitivePrice, competitor, formOfProof, customCompetitorName, customFormOfProof, competitorCode, formOfProofCode, entryType) {
9
9
  super(lineNumber, lineType, discountType, pricingRuleId, amount, percent, replacementUnitPrice, reasonCode, reasonDesc, reasonType, couponCode, supervisorOverrideLineReference, isEmployeeDiscount, isFastDiscount, false, competitivePrice, competitor, formOfProof, customCompetitorName, customFormOfProof, competitorCode, formOfProofCode, entryType);
10
10
  this._discountLevel = discountLevel;
11
11
  this._rewardPrintedName = rewardPrintedName;
@@ -14,6 +14,7 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
14
14
  this._tenderId = tenderId;
15
15
  this._pin = pin;
16
16
  this._cardNumber = cardNumber;
17
+ this._inputSource = inputSource;
17
18
  }
18
19
  /**
19
20
  * The create method is called by the transaction line factory to create an instance and initialize it from the
@@ -35,8 +36,9 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
35
36
  const pin = collectedData.get(Constants_1.CollectedDataKey.GiftCardPin);
36
37
  const cardNumber = collectedData.get(Constants_1.CollectedDataKey.CardNumber);
37
38
  const rewardCardName = collectedData.get(Constants_1.CollectedDataKey.RewardCardName);
39
+ const inputSource = collectedData.get(Constants_1.CollectedDataKey.InputSource);
38
40
  const discountType = BaseManualDiscountLine_1.BaseManualDiscountLine.discountTypeFromCollectedData(collectedData);
39
- const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber);
41
+ const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, inputSource);
40
42
  discountLine.loadFromCollectedData(collectedData);
41
43
  return discountLine;
42
44
  }
@@ -52,10 +54,14 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
52
54
  const tenderId = transactionLineJsonObj._tenderId;
53
55
  const pin = transactionLineJsonObj._pin;
54
56
  const cardNumber = transactionLineJsonObj._cardNumber;
55
- const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber);
57
+ const inputSource = transactionLineJsonObj._inputSource;
58
+ const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, inputSource);
56
59
  discountLine.loadFromJsonObject(transactionLineJsonObj);
57
60
  return discountLine;
58
61
  }
62
+ get inputSource() {
63
+ return this._inputSource;
64
+ }
59
65
  get discountLevel() {
60
66
  return this._discountLevel;
61
67
  }
@@ -80,8 +86,23 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
80
86
  get pin() {
81
87
  return this._pin;
82
88
  }
89
+ get authResponse() {
90
+ return undefined;
91
+ }
92
+ get tenderAmount() {
93
+ return undefined;
94
+ }
95
+ get tenderType() {
96
+ return undefined;
97
+ }
98
+ get authorizationDeviceId() {
99
+ return undefined;
100
+ }
101
+ get isAuthorized() {
102
+ return false;
103
+ }
83
104
  newTransactionLine() {
84
- return new RewardCardDiscountLine(this.lineNumber, this.lineType, this._discountType, this._discountLevel, this._rewardPrintedName, this._rewardPrintedNumberLabel, this._rewardCardName, this._autoPopulateCardNumberFromCustomer, this._tenderId, this._pin, this._cardNumber, this._pricingRuleId, this._amount, this._percent, this._replacementUnitPrice, this._reasonCode, this._reasonDescription, this._reasonListType, this._couponCode, this._supervisorOverrideLineReference, this._isEmployeeDiscount, this._isFastDiscount, this._competitivePrice, this._competitor, this._formOfProof, this._customCompetitorName, this._customFormOfProof, this._competitorCode, this._formOfProofCode, this._entryType);
105
+ return new RewardCardDiscountLine(this.lineNumber, this.lineType, this._discountType, this._discountLevel, this._rewardPrintedName, this._rewardPrintedNumberLabel, this._rewardCardName, this._autoPopulateCardNumberFromCustomer, this._tenderId, this._pin, this._cardNumber, this._inputSource, this._pricingRuleId, this._amount, this._percent, this._replacementUnitPrice, this._reasonCode, this._reasonDescription, this._reasonListType, this._couponCode, this._supervisorOverrideLineReference, this._isEmployeeDiscount, this._isFastDiscount, this._competitivePrice, this._competitor, this._formOfProof, this._customCompetitorName, this._customFormOfProof, this._competitorCode, this._formOfProofCode, this._entryType);
85
106
  }
86
107
  }
87
108
  exports.RewardCardDiscountLine = RewardCardDiscountLine;
@@ -0,0 +1,33 @@
1
+ import { Money } from "@aptos-scp/scp-component-business-core";
2
+ import { ITransactionLine, ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
3
+ import { IAuthorizationResponse } from "@aptos-scp/scp-types-commerce-devices";
4
+ import { TenderType } from "../TenderType";
5
+ import { BaseManualDiscountLineDecorator } from "./BaseManualDiscountLineDecorator";
6
+ import { IRewardCardDiscountLine } from "./IRewardCardDiscountLine";
7
+ import { ManualDiscountLevel } from "../configuration";
8
+ export declare const DECORATOR_TYPE_REWARD_CARD_DISCOUNT: string;
9
+ export declare function isRewardCardDiscountDecorator(transactionLine: ITransactionLine): transactionLine is RewardCardDiscountLineDecorator;
10
+ export declare class RewardCardDiscountLineDecorator extends BaseManualDiscountLineDecorator implements IRewardCardDiscountLine {
11
+ private _authResponse;
12
+ private _tenderAmount;
13
+ private _tenderType;
14
+ private _authorizationDeviceId;
15
+ static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): RewardCardDiscountLineDecorator;
16
+ constructor(manualDiscountLine: IRewardCardDiscountLine, annotationSourceLineNumber: number, authResponse: IAuthorizationResponse, tenderAmount: Money, tenderType: TenderType, authorizationDeviceId: string);
17
+ get discountLevel(): ManualDiscountLevel;
18
+ get inputSource(): string;
19
+ get autoPopulateCardNumberFromCustomer(): boolean;
20
+ get cardNumber(): string;
21
+ get rewardPrintedName(): string;
22
+ get rewardCardName(): string;
23
+ get rewardPrintedNumberLabel(): string;
24
+ get tenderId(): string;
25
+ get pin(): string;
26
+ get authResponse(): IAuthorizationResponse;
27
+ get tenderAmount(): Money;
28
+ get tenderType(): TenderType;
29
+ get authorizationDeviceId(): string;
30
+ get isAuthorized(): boolean;
31
+ protected clone(): RewardCardDiscountLineDecorator;
32
+ protected newTransactionLine(): RewardCardDiscountLineDecorator;
33
+ }
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const scp_component_business_core_1 = require("@aptos-scp/scp-component-business-core");
4
+ const TenderType_1 = require("../TenderType");
5
+ const BaseManualDiscountLineDecorator_1 = require("./BaseManualDiscountLineDecorator");
6
+ const ANNOTATION_SOURCE_TYPE = "RewardCard";
7
+ exports.DECORATOR_TYPE_REWARD_CARD_DISCOUNT = "REWARD_CARD_DISCOUNT_DECORATOR";
8
+ function isRewardCardDiscountDecorator(transactionLine) {
9
+ return (transactionLine.lineDecoratorType ===
10
+ exports.DECORATOR_TYPE_REWARD_CARD_DISCOUNT);
11
+ }
12
+ exports.isRewardCardDiscountDecorator = isRewardCardDiscountDecorator;
13
+ class RewardCardDiscountLineDecorator extends BaseManualDiscountLineDecorator_1.BaseManualDiscountLineDecorator {
14
+ constructor(manualDiscountLine, annotationSourceLineNumber, authResponse, tenderAmount, tenderType, authorizationDeviceId) {
15
+ super(exports.DECORATOR_TYPE_REWARD_CARD_DISCOUNT, manualDiscountLine, undefined, ANNOTATION_SOURCE_TYPE, annotationSourceLineNumber);
16
+ this._authResponse = authResponse;
17
+ this._tenderAmount = tenderAmount;
18
+ this._tenderType = tenderType;
19
+ this._authorizationDeviceId = authorizationDeviceId;
20
+ }
21
+ static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
22
+ const decoratedTransactionLineJsonObj = BaseManualDiscountLineDecorator_1.BaseManualDiscountLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
23
+ const decoratedItemLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
24
+ const annotationSourceLineNumber = BaseManualDiscountLineDecorator_1.BaseManualDiscountLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
25
+ const authResponse = transactionLineJsonObj._authResponse;
26
+ if (transactionLineJsonObj._authResponse) {
27
+ if (transactionLineJsonObj._authResponse.balance) {
28
+ authResponse.balance = new scp_component_business_core_1.Money(transactionLineJsonObj._authResponse.balance);
29
+ }
30
+ if (transactionLineJsonObj._authResponse.amount) {
31
+ authResponse.amount = new scp_component_business_core_1.Money(transactionLineJsonObj._authResponse.amount);
32
+ }
33
+ if (transactionLineJsonObj._authResponse.approvedAmount) {
34
+ authResponse.approvedAmount = new scp_component_business_core_1.Money(transactionLineJsonObj._authResponse.approvedAmount);
35
+ }
36
+ }
37
+ const tenderAmount = new scp_component_business_core_1.Money(transactionLineJsonObj._tenderAmount);
38
+ const tenderType = TenderType_1.TenderType.createFromJsonObject(transactionLineJsonObj._tenderType);
39
+ const authorizationDeviceId = transactionLineJsonObj._authorizationDeviceId;
40
+ return new RewardCardDiscountLineDecorator(decoratedItemLine, annotationSourceLineNumber, authResponse, tenderAmount, tenderType, authorizationDeviceId);
41
+ }
42
+ get discountLevel() {
43
+ return this.decoratedTransactionLine.discountLevel;
44
+ }
45
+ get inputSource() {
46
+ return this.decoratedTransactionLine.inputSource;
47
+ }
48
+ get autoPopulateCardNumberFromCustomer() {
49
+ return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
50
+ }
51
+ get cardNumber() {
52
+ return this.decoratedTransactionLine.cardNumber;
53
+ }
54
+ get rewardPrintedName() {
55
+ return this.decoratedTransactionLine.rewardPrintedName;
56
+ }
57
+ get rewardCardName() {
58
+ return this.decoratedTransactionLine.rewardCardName;
59
+ }
60
+ get rewardPrintedNumberLabel() {
61
+ return this.decoratedTransactionLine.rewardPrintedNumberLabel;
62
+ }
63
+ get tenderId() {
64
+ return this.decoratedTransactionLine.tenderId;
65
+ }
66
+ get pin() {
67
+ return this.decoratedTransactionLine.pin;
68
+ }
69
+ get authResponse() {
70
+ return this._authResponse;
71
+ }
72
+ get tenderAmount() {
73
+ return this._tenderAmount;
74
+ }
75
+ get tenderType() {
76
+ return this._tenderType;
77
+ }
78
+ get authorizationDeviceId() {
79
+ return this._authorizationDeviceId;
80
+ }
81
+ get isAuthorized() {
82
+ return !!this._authResponse;
83
+ }
84
+ clone() {
85
+ const newRewardCardRedeemDecorator = super.clone();
86
+ newRewardCardRedeemDecorator._authResponse = this._authResponse;
87
+ newRewardCardRedeemDecorator._tenderAmount = this._tenderAmount;
88
+ newRewardCardRedeemDecorator._tenderType = this._tenderType;
89
+ newRewardCardRedeemDecorator._authorizationDeviceId = this._authorizationDeviceId;
90
+ return newRewardCardRedeemDecorator;
91
+ }
92
+ newTransactionLine() {
93
+ return new RewardCardDiscountLineDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._authResponse, this._tenderAmount, this._tenderType, this._authorizationDeviceId);
94
+ }
95
+ }
96
+ exports.RewardCardDiscountLineDecorator = RewardCardDiscountLineDecorator;
97
+ //# sourceMappingURL=RewardCardDiscountLineDecorator.js.map
@@ -1,11 +1,14 @@
1
1
  import { Money } from "@aptos-scp/scp-component-business-core";
2
2
  import { ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
3
- import { IManualDiscountLine } from "./IManualDiscountLine";
3
+ import { IAuthorizationResponse } from "@aptos-scp/scp-types-commerce-devices";
4
4
  import { ManualDiscountLevel } from "../configuration";
5
+ import { TenderType } from "../TenderType";
6
+ import { IManualDiscountLine } from "./IManualDiscountLine";
5
7
  import { ManualDiscountLineTotalDecorator } from "./ManualDiscountLineTotalDecorator";
8
+ import { IRewardCardDiscountLine } from "./IRewardCardDiscountLine";
6
9
  export declare const DECORATOR_TYPE_REWARD_CARD_DISCOUNT_TOTAL: string;
7
10
  export declare const REWARD_CARD_TOTAL_DISCOUNT_ANNOTATION_SOURCE: string;
8
- export declare class RewardCardDiscountLineTotalDecorator extends ManualDiscountLineTotalDecorator {
11
+ export declare class RewardCardDiscountLineTotalDecorator extends ManualDiscountLineTotalDecorator implements IRewardCardDiscountLine {
9
12
  static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): RewardCardDiscountLineTotalDecorator;
10
13
  constructor(decoratorLineType: string, decoratedTransactionLine: IManualDiscountLine, totalDiscount: Money, annotationSourceLineNumber?: number);
11
14
  get discountLevel(): ManualDiscountLevel;
@@ -16,5 +19,11 @@ export declare class RewardCardDiscountLineTotalDecorator extends ManualDiscount
16
19
  get tenderId(): string;
17
20
  get pin(): string;
18
21
  get autoPopulateCardNumberFromCustomer(): boolean;
22
+ get authResponse(): IAuthorizationResponse;
23
+ get tenderAmount(): Money;
24
+ get tenderType(): TenderType;
25
+ get authorizationDeviceId(): string;
26
+ get isAuthorized(): boolean;
27
+ get inputSource(): string;
19
28
  protected newTransactionLine(): RewardCardDiscountLineTotalDecorator;
20
29
  }
@@ -40,6 +40,24 @@ class RewardCardDiscountLineTotalDecorator extends ManualDiscountLineTotalDecora
40
40
  get autoPopulateCardNumberFromCustomer() {
41
41
  return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
42
42
  }
43
+ get authResponse() {
44
+ return this.decoratedTransactionLine.authResponse;
45
+ }
46
+ get tenderAmount() {
47
+ return this.decoratedTransactionLine.tenderAmount;
48
+ }
49
+ get tenderType() {
50
+ return this.decoratedTransactionLine.tenderType;
51
+ }
52
+ get authorizationDeviceId() {
53
+ return this.decoratedTransactionLine.authorizationDeviceId;
54
+ }
55
+ get isAuthorized() {
56
+ return this.decoratedTransactionLine.isAuthorized;
57
+ }
58
+ get inputSource() {
59
+ return this.decoratedTransactionLine.inputSource;
60
+ }
43
61
  newTransactionLine() {
44
62
  return new RewardCardDiscountLineTotalDecorator(this.lineDecoratorType, this.decoratedTransactionLine, this.totalDiscount, this.annotationSourceLineNumber);
45
63
  }
@@ -3,7 +3,11 @@ import { VoidSource } from "../Constants";
3
3
  import { RewardCardDiscountLine } from "./RewardCardDiscountLine";
4
4
  import { ManualDiscountLevel } from "../configuration";
5
5
  import { VoidedDiscountLineDecorator } from "./VoidedDiscountLineDecorator";
6
- export declare class VoidedRewardCardDiscountLineDecorator extends VoidedDiscountLineDecorator {
6
+ import { IRewardCardDiscountLine } from "./IRewardCardDiscountLine";
7
+ import { IAuthorizationResponse } from "@aptos-scp/scp-types-commerce-devices";
8
+ import { Money } from "@aptos-scp/scp-component-business-core";
9
+ import { TenderType } from "../TenderType";
10
+ export declare class VoidedRewardCardDiscountLineDecorator extends VoidedDiscountLineDecorator implements IRewardCardDiscountLine {
7
11
  static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): VoidedRewardCardDiscountLineDecorator;
8
12
  constructor(voidSource: VoidSource, discountLine: RewardCardDiscountLine, annotationSourceLineNumber: number);
9
13
  get discountLevel(): ManualDiscountLevel;
@@ -14,5 +18,11 @@ export declare class VoidedRewardCardDiscountLineDecorator extends VoidedDiscoun
14
18
  get pin(): string;
15
19
  get rewardCardName(): string;
16
20
  get autoPopulateCardNumberFromCustomer(): boolean;
21
+ get inputSource(): string;
22
+ get authResponse(): IAuthorizationResponse;
23
+ get tenderAmount(): Money;
24
+ get tenderType(): TenderType;
25
+ get authorizationDeviceId(): string;
26
+ get isAuthorized(): boolean;
17
27
  protected newTransactionLine(): VoidedRewardCardDiscountLineDecorator;
18
28
  }
@@ -38,6 +38,24 @@ class VoidedRewardCardDiscountLineDecorator extends VoidedDiscountLineDecorator_
38
38
  get autoPopulateCardNumberFromCustomer() {
39
39
  return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
40
40
  }
41
+ get inputSource() {
42
+ return this.decoratedTransactionLine.inputSource;
43
+ }
44
+ get authResponse() {
45
+ return this.decoratedTransactionLine.authResponse;
46
+ }
47
+ get tenderAmount() {
48
+ return this.decoratedTransactionLine.tenderAmount;
49
+ }
50
+ get tenderType() {
51
+ return this.decoratedTransactionLine.tenderType;
52
+ }
53
+ get authorizationDeviceId() {
54
+ return this.decoratedTransactionLine.authorizationDeviceId;
55
+ }
56
+ get isAuthorized() {
57
+ return this.decoratedTransactionLine.isAuthorized;
58
+ }
41
59
  newTransactionLine() {
42
60
  return new VoidedRewardCardDiscountLineDecorator(this.voidSource, this.decoratedTransactionLine, this.annotationSourceLineNumber);
43
61
  }
@@ -1,4 +1,5 @@
1
1
  export * from "./IManualDiscountLine";
2
+ export * from "./IRewardCardDiscountLine";
2
3
  export * from "./IPromotionCouponLine";
3
4
  export * from "./BaseManualDiscountLine";
4
5
  export * from "./LoyaltyDiscountLine";
@@ -17,6 +18,7 @@ export * from "./BaseManualDiscountLineDecorator";
17
18
  export * from "./ExpiredCouponOverrideLine";
18
19
  export * from "./RewardCardDiscountLineTotalDecorator";
19
20
  export * from "./RewardCardDiscountLine";
21
+ export * from "./RewardCardDiscountLineDecorator";
20
22
  export * from "./VoidedRewardCardDiscountLineDecorator";
21
23
  export * from "./PromotionCouponLine";
22
24
  export * from "./employee/";
@@ -20,6 +20,7 @@ __export(require("./BaseManualDiscountLineDecorator"));
20
20
  __export(require("./ExpiredCouponOverrideLine"));
21
21
  __export(require("./RewardCardDiscountLineTotalDecorator"));
22
22
  __export(require("./RewardCardDiscountLine"));
23
+ __export(require("./RewardCardDiscountLineDecorator"));
23
24
  __export(require("./VoidedRewardCardDiscountLineDecorator"));
24
25
  __export(require("./PromotionCouponLine"));
25
26
  __export(require("./employee/"));
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.17.0",
3
+ "version": "2.19.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",
@@ -63,7 +63,7 @@
63
63
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
64
64
  "@aptos-scp/scp-types-core-config": "^2.2.1",
65
65
  "@aptos-scp/scp-types-commerce-devices": "^6.0.0",
66
- "@aptos-scp/scp-types-commerce-transaction": "^1.82.0",
66
+ "@aptos-scp/scp-types-commerce-transaction": "^1.83.0",
67
67
  "@aptos-scp/scp-types-customer": "^3.7.0",
68
68
  "@aptos-scp/scp-types-einvoice": "^1.17.0",
69
69
  "@aptos-scp/scp-types-inventory": "^2.0.0",
@@ -85,7 +85,7 @@
85
85
  "@aptos-scp/scp-component-user": "^1.4.0",
86
86
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
87
87
  "@aptos-scp/scp-types-commerce-devices": "^6.3.0",
88
- "@aptos-scp/scp-types-commerce-transaction": "^1.82.0",
88
+ "@aptos-scp/scp-types-commerce-transaction": "^1.83.0",
89
89
  "@aptos-scp/scp-types-core": "^1.0.5",
90
90
  "@aptos-scp/scp-types-core-config": "^2.2.1",
91
91
  "@aptos-scp/scp-types-currency-conversion": "^1.2.0",