@aptos-scp/scp-component-store-selling-features-domain-model 2.17.0 → 2.18.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/discounts/IRewardCardDiscountLine.d.ts +23 -0
- package/lib/domain/model/discounts/IRewardCardDiscountLine.js +3 -0
- package/lib/domain/model/discounts/RewardCardDiscountLine.d.ts +17 -12
- package/lib/domain/model/discounts/RewardCardDiscountLine.js +15 -0
- package/lib/domain/model/discounts/RewardCardDiscountLineDecorator.d.ts +32 -0
- package/lib/domain/model/discounts/RewardCardDiscountLineDecorator.js +94 -0
- package/lib/domain/model/discounts/RewardCardDiscountLineTotalDecorator.d.ts +10 -2
- package/lib/domain/model/discounts/RewardCardDiscountLineTotalDecorator.js +15 -0
- package/lib/domain/model/discounts/VoidedRewardCardDiscountLineDecorator.d.ts +10 -1
- package/lib/domain/model/discounts/VoidedRewardCardDiscountLineDecorator.js +15 -0
- package/lib/domain/model/discounts/index.d.ts +2 -0
- package/lib/domain/model/discounts/index.js +1 -0
- package/package.json +3 -3
|
@@ -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,23 @@
|
|
|
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
|
+
/**
|
|
15
|
+
* The tenderId is the id of the tender associated with reward card authorization
|
|
16
|
+
*/
|
|
17
|
+
readonly tenderId: string;
|
|
18
|
+
readonly authResponse: IAuthorizationResponse;
|
|
19
|
+
readonly tenderAmount: Money;
|
|
20
|
+
readonly tenderType: TenderType;
|
|
21
|
+
readonly authorizationDeviceId: string;
|
|
22
|
+
readonly isAuthorized: boolean;
|
|
23
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
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
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
16
18
|
/**
|
|
17
19
|
* The tenderId is the id of the tender associated with reward card authorization
|
|
18
20
|
*/
|
|
19
|
-
|
|
20
|
-
readonly _authResponse: IAuthorizationResponse;
|
|
21
|
-
readonly _tenderType: TenderType;
|
|
21
|
+
private _tenderId;
|
|
22
22
|
/**
|
|
23
23
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
24
24
|
* data collected during the qualification process.
|
|
@@ -40,6 +40,11 @@ export declare class RewardCardDiscountLine extends BaseManualDiscountLine {
|
|
|
40
40
|
get rewardPrintedNumberLabel(): string;
|
|
41
41
|
get tenderId(): string;
|
|
42
42
|
get pin(): string;
|
|
43
|
+
get authResponse(): IAuthorizationResponse;
|
|
44
|
+
get tenderAmount(): Money;
|
|
45
|
+
get tenderType(): TenderType;
|
|
46
|
+
get authorizationDeviceId(): string;
|
|
47
|
+
get isAuthorized(): boolean;
|
|
43
48
|
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);
|
|
44
49
|
protected newTransactionLine(): BaseTransactionLine;
|
|
45
50
|
}
|
|
@@ -80,6 +80,21 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
|
|
|
80
80
|
get pin() {
|
|
81
81
|
return this._pin;
|
|
82
82
|
}
|
|
83
|
+
get authResponse() {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
get tenderAmount() {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
get tenderType() {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
get authorizationDeviceId() {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
get isAuthorized() {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
83
98
|
newTransactionLine() {
|
|
84
99
|
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);
|
|
85
100
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 autoPopulateCardNumberFromCustomer(): boolean;
|
|
19
|
+
get cardNumber(): string;
|
|
20
|
+
get rewardPrintedName(): string;
|
|
21
|
+
get rewardCardName(): string;
|
|
22
|
+
get rewardPrintedNumberLabel(): string;
|
|
23
|
+
get tenderId(): string;
|
|
24
|
+
get pin(): string;
|
|
25
|
+
get authResponse(): IAuthorizationResponse;
|
|
26
|
+
get tenderAmount(): Money;
|
|
27
|
+
get tenderType(): TenderType;
|
|
28
|
+
get authorizationDeviceId(): string;
|
|
29
|
+
get isAuthorized(): boolean;
|
|
30
|
+
protected clone(): RewardCardDiscountLineDecorator;
|
|
31
|
+
protected newTransactionLine(): RewardCardDiscountLineDecorator;
|
|
32
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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 autoPopulateCardNumberFromCustomer() {
|
|
46
|
+
return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
|
|
47
|
+
}
|
|
48
|
+
get cardNumber() {
|
|
49
|
+
return this.decoratedTransactionLine.cardNumber;
|
|
50
|
+
}
|
|
51
|
+
get rewardPrintedName() {
|
|
52
|
+
return this.decoratedTransactionLine.rewardPrintedName;
|
|
53
|
+
}
|
|
54
|
+
get rewardCardName() {
|
|
55
|
+
return this.decoratedTransactionLine.rewardCardName;
|
|
56
|
+
}
|
|
57
|
+
get rewardPrintedNumberLabel() {
|
|
58
|
+
return this.decoratedTransactionLine.rewardPrintedNumberLabel;
|
|
59
|
+
}
|
|
60
|
+
get tenderId() {
|
|
61
|
+
return this.decoratedTransactionLine.tenderId;
|
|
62
|
+
}
|
|
63
|
+
get pin() {
|
|
64
|
+
return this.decoratedTransactionLine.pin;
|
|
65
|
+
}
|
|
66
|
+
get authResponse() {
|
|
67
|
+
return this._authResponse;
|
|
68
|
+
}
|
|
69
|
+
get tenderAmount() {
|
|
70
|
+
return this._tenderAmount;
|
|
71
|
+
}
|
|
72
|
+
get tenderType() {
|
|
73
|
+
return this._tenderType;
|
|
74
|
+
}
|
|
75
|
+
get authorizationDeviceId() {
|
|
76
|
+
return this._authorizationDeviceId;
|
|
77
|
+
}
|
|
78
|
+
get isAuthorized() {
|
|
79
|
+
return !!this._authResponse;
|
|
80
|
+
}
|
|
81
|
+
clone() {
|
|
82
|
+
const newRewardCardRedeemDecorator = super.clone();
|
|
83
|
+
newRewardCardRedeemDecorator._authResponse = this._authResponse;
|
|
84
|
+
newRewardCardRedeemDecorator._tenderAmount = this._tenderAmount;
|
|
85
|
+
newRewardCardRedeemDecorator._tenderType = this._tenderType;
|
|
86
|
+
newRewardCardRedeemDecorator._authorizationDeviceId = this._authorizationDeviceId;
|
|
87
|
+
return newRewardCardRedeemDecorator;
|
|
88
|
+
}
|
|
89
|
+
newTransactionLine() {
|
|
90
|
+
return new RewardCardDiscountLineDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._authResponse, this._tenderAmount, this._tenderType, this._authorizationDeviceId);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.RewardCardDiscountLineDecorator = RewardCardDiscountLineDecorator;
|
|
94
|
+
//# 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 {
|
|
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,10 @@ 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;
|
|
19
27
|
protected newTransactionLine(): RewardCardDiscountLineTotalDecorator;
|
|
20
28
|
}
|
|
@@ -40,6 +40,21 @@ 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
|
+
}
|
|
43
58
|
newTransactionLine() {
|
|
44
59
|
return new RewardCardDiscountLineTotalDecorator(this.lineDecoratorType, this.decoratedTransactionLine, this.totalDiscount, this.annotationSourceLineNumber);
|
|
45
60
|
}
|
|
@@ -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
|
-
|
|
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,10 @@ export declare class VoidedRewardCardDiscountLineDecorator extends VoidedDiscoun
|
|
|
14
18
|
get pin(): string;
|
|
15
19
|
get rewardCardName(): string;
|
|
16
20
|
get autoPopulateCardNumberFromCustomer(): boolean;
|
|
21
|
+
get authResponse(): IAuthorizationResponse;
|
|
22
|
+
get tenderAmount(): Money;
|
|
23
|
+
get tenderType(): TenderType;
|
|
24
|
+
get authorizationDeviceId(): string;
|
|
25
|
+
get isAuthorized(): boolean;
|
|
17
26
|
protected newTransactionLine(): VoidedRewardCardDiscountLineDecorator;
|
|
18
27
|
}
|
|
@@ -38,6 +38,21 @@ class VoidedRewardCardDiscountLineDecorator extends VoidedDiscountLineDecorator_
|
|
|
38
38
|
get autoPopulateCardNumberFromCustomer() {
|
|
39
39
|
return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
|
|
40
40
|
}
|
|
41
|
+
get authResponse() {
|
|
42
|
+
return this.decoratedTransactionLine.authResponse;
|
|
43
|
+
}
|
|
44
|
+
get tenderAmount() {
|
|
45
|
+
return this.decoratedTransactionLine.tenderAmount;
|
|
46
|
+
}
|
|
47
|
+
get tenderType() {
|
|
48
|
+
return this.decoratedTransactionLine.tenderType;
|
|
49
|
+
}
|
|
50
|
+
get authorizationDeviceId() {
|
|
51
|
+
return this.decoratedTransactionLine.authorizationDeviceId;
|
|
52
|
+
}
|
|
53
|
+
get isAuthorized() {
|
|
54
|
+
return this.decoratedTransactionLine.isAuthorized;
|
|
55
|
+
}
|
|
41
56
|
newTransactionLine() {
|
|
42
57
|
return new VoidedRewardCardDiscountLineDecorator(this.voidSource, this.decoratedTransactionLine, this.annotationSourceLineNumber);
|
|
43
58
|
}
|
|
@@ -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.
|
|
3
|
+
"version": "2.18.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.
|
|
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.
|
|
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",
|