@aptos-scp/scp-component-store-selling-features-domain-model 1.55.1 → 1.56.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/model/Constants.d.ts +1 -1
- package/lib/domain/model/Constants.js +1 -1
- package/lib/domain/model/account/IPaymentAccountHolderValidationLine.d.ts +2 -1
- package/lib/domain/model/account/IPaymentAccountLookupLine.d.ts +1 -0
- package/lib/domain/model/account/PaymentAccountHolderValidationLine.d.ts +4 -2
- package/lib/domain/model/account/PaymentAccountHolderValidationLine.js +10 -4
- package/lib/domain/model/account/PaymentAccountLookupLine.d.ts +3 -1
- package/lib/domain/model/account/PaymentAccountLookupLine.js +10 -4
- package/package.json +3 -3
|
@@ -103,7 +103,6 @@ export declare enum UiInputKey {
|
|
|
103
103
|
SAME_AS_BILLTO = "input_sameAsBillTo",
|
|
104
104
|
BILLING = "input_billing",
|
|
105
105
|
CANCEL_PAYMENT_REASON = "input_cancelPaymentReason",
|
|
106
|
-
CARD_HOLDER = "input_cardHolder",
|
|
107
106
|
CASH_DRAWER_STATUS = "input_cashDrawerStatus",
|
|
108
107
|
COMPLETE_RESUME_EVENT = "input_resumeCompleteEvent",
|
|
109
108
|
COUNTRY_CODE = "input_countryCode",
|
|
@@ -659,6 +658,7 @@ export declare enum CollectedDataKey {
|
|
|
659
658
|
TenderPaymentIsCompleted = "tenderPaymentIsCompleted",
|
|
660
659
|
PaginationMetadata = "paginationMetadata",
|
|
661
660
|
PaidAmount = "PaidAmount",
|
|
661
|
+
PaymentAccountLookupLineReference = "paymentAccountLookupLineReference",
|
|
662
662
|
PaidOutReference = "paidOutReference",
|
|
663
663
|
PhoneNumber = "phoneNumber",
|
|
664
664
|
Percent = "percentage",
|
|
@@ -105,7 +105,6 @@ var UiInputKey;
|
|
|
105
105
|
UiInputKey["SAME_AS_BILLTO"] = "input_sameAsBillTo";
|
|
106
106
|
UiInputKey["BILLING"] = "input_billing";
|
|
107
107
|
UiInputKey["CANCEL_PAYMENT_REASON"] = "input_cancelPaymentReason";
|
|
108
|
-
UiInputKey["CARD_HOLDER"] = "input_cardHolder";
|
|
109
108
|
UiInputKey["CASH_DRAWER_STATUS"] = "input_cashDrawerStatus";
|
|
110
109
|
UiInputKey["COMPLETE_RESUME_EVENT"] = "input_resumeCompleteEvent";
|
|
111
110
|
UiInputKey["COUNTRY_CODE"] = "input_countryCode";
|
|
@@ -667,6 +666,7 @@ var CollectedDataKey;
|
|
|
667
666
|
CollectedDataKey["TenderPaymentIsCompleted"] = "tenderPaymentIsCompleted";
|
|
668
667
|
CollectedDataKey["PaginationMetadata"] = "paginationMetadata";
|
|
669
668
|
CollectedDataKey["PaidAmount"] = "PaidAmount";
|
|
669
|
+
CollectedDataKey["PaymentAccountLookupLineReference"] = "paymentAccountLookupLineReference";
|
|
670
670
|
CollectedDataKey["PaidOutReference"] = "paidOutReference";
|
|
671
671
|
CollectedDataKey["PhoneNumber"] = "phoneNumber";
|
|
672
672
|
CollectedDataKey["Percent"] = "percentage";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ITransactionLine } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
2
|
import { ICardHolder } from "@aptos-scp/scp-types-commerce-devices";
|
|
3
|
-
import { PaymentAccountHolderIdentificationType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
|
+
import { ISameTransactionLineReference, PaymentAccountHolderIdentificationType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
4
4
|
export interface IPaymentAccountHolderValidationLine extends ITransactionLine {
|
|
5
5
|
readonly accountHolder: ICardHolder;
|
|
6
6
|
readonly identificationType: PaymentAccountHolderIdentificationType;
|
|
7
7
|
readonly firstAdminDivision: string;
|
|
8
8
|
readonly accountHolderMismatch?: boolean;
|
|
9
|
+
readonly paymentAccountLookupLineReference?: ISameTransactionLineReference;
|
|
9
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
-
import { PaymentAccountHolderIdentificationType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { ISameTransactionLineReference, PaymentAccountHolderIdentificationType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { ICardHolder } from "@aptos-scp/scp-types-commerce-devices";
|
|
4
4
|
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
5
5
|
import { IPaymentAccountHolderValidationLine } from "./IPaymentAccountHolderValidationLine";
|
|
@@ -9,6 +9,7 @@ export declare class PaymentAccountHolderValidationLine extends BaseTransactionL
|
|
|
9
9
|
private readonly _identificationType;
|
|
10
10
|
private readonly _firstAdminDivision;
|
|
11
11
|
private readonly _accountHolderMismatch?;
|
|
12
|
+
private readonly _paymentAccountLookupLineReference?;
|
|
12
13
|
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): PaymentAccountHolderValidationLine;
|
|
13
14
|
static createFromJsonObject(transactionLineJsonObj: any): PaymentAccountHolderValidationLine;
|
|
14
15
|
get couldAffectPricing(): boolean;
|
|
@@ -16,7 +17,8 @@ export declare class PaymentAccountHolderValidationLine extends BaseTransactionL
|
|
|
16
17
|
get identificationType(): PaymentAccountHolderIdentificationType;
|
|
17
18
|
get firstAdminDivision(): string;
|
|
18
19
|
get accountHolderMismatch(): boolean;
|
|
19
|
-
|
|
20
|
+
get paymentAccountLookupLineReference(): ISameTransactionLineReference | undefined;
|
|
21
|
+
constructor(lineNumber: number, lineType: string, accountHolder: ICardHolder, identificationType: PaymentAccountHolderIdentificationType, firstAdminDivision: string, accountHolderMismatch: boolean, paymentAccountLookupLineReference: ISameTransactionLineReference);
|
|
20
22
|
protected newTransactionLine(): PaymentAccountHolderValidationLine;
|
|
21
23
|
}
|
|
22
24
|
export declare function isPaymentAccountHolderValidationLine(transactionLine: ITransactionLine): transactionLine is IPaymentAccountHolderValidationLine;
|
|
@@ -4,12 +4,13 @@ const BaseTransactionLine_1 = require("../BaseTransactionLine");
|
|
|
4
4
|
const Constants_1 = require("../Constants");
|
|
5
5
|
exports.PAYMENT_ACCOUNT_HOLDER_VALIDATION_LINE_TYPE = "PaymentAccountHolderValidation";
|
|
6
6
|
class PaymentAccountHolderValidationLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
7
|
-
constructor(lineNumber, lineType, accountHolder, identificationType, firstAdminDivision, accountHolderMismatch) {
|
|
7
|
+
constructor(lineNumber, lineType, accountHolder, identificationType, firstAdminDivision, accountHolderMismatch, paymentAccountLookupLineReference) {
|
|
8
8
|
super(lineNumber, lineType);
|
|
9
9
|
this._accountHolder = accountHolder;
|
|
10
10
|
this._identificationType = identificationType;
|
|
11
11
|
this._firstAdminDivision = firstAdminDivision;
|
|
12
12
|
this._accountHolderMismatch = accountHolderMismatch;
|
|
13
|
+
this._paymentAccountLookupLineReference = paymentAccountLookupLineReference;
|
|
13
14
|
}
|
|
14
15
|
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
15
16
|
const firstName = collectedData.get(Constants_1.CollectedDataKey.FirstName);
|
|
@@ -21,7 +22,8 @@ class PaymentAccountHolderValidationLine extends BaseTransactionLine_1.BaseTrans
|
|
|
21
22
|
const identificationType = collectedData.get(Constants_1.CollectedDataKey.IdentificationType);
|
|
22
23
|
const firstAdminDivision = collectedData.get(Constants_1.CollectedDataKey.FirstAdminDivision);
|
|
23
24
|
const accountHolderMismatch = collectedData.get(Constants_1.CollectedDataKey.AccountHolderMismatch);
|
|
24
|
-
|
|
25
|
+
const paymentAccountLookupLineReference = collectedData.get(Constants_1.CollectedDataKey.PaymentAccountLookupLineReference);
|
|
26
|
+
return new PaymentAccountHolderValidationLine(lineNumber, lineType, accountHolder, identificationType, firstAdminDivision, accountHolderMismatch, paymentAccountLookupLineReference);
|
|
25
27
|
}
|
|
26
28
|
static createFromJsonObject(transactionLineJsonObj) {
|
|
27
29
|
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
@@ -30,7 +32,8 @@ class PaymentAccountHolderValidationLine extends BaseTransactionLine_1.BaseTrans
|
|
|
30
32
|
const identificationType = transactionLineJsonObj._identificationType;
|
|
31
33
|
const firstAdminDivision = transactionLineJsonObj._firstAdminDivision;
|
|
32
34
|
const accountHolderMismatch = transactionLineJsonObj._accountHolderMismatch;
|
|
33
|
-
|
|
35
|
+
const paymentAccountLookupLineReference = transactionLineJsonObj._paymentAccountLookupLineReference;
|
|
36
|
+
return new PaymentAccountHolderValidationLine(lineNumber, lineType, accountHolder, identificationType, firstAdminDivision, accountHolderMismatch, paymentAccountLookupLineReference);
|
|
34
37
|
}
|
|
35
38
|
get couldAffectPricing() {
|
|
36
39
|
return false;
|
|
@@ -47,8 +50,11 @@ class PaymentAccountHolderValidationLine extends BaseTransactionLine_1.BaseTrans
|
|
|
47
50
|
get accountHolderMismatch() {
|
|
48
51
|
return this._accountHolderMismatch;
|
|
49
52
|
}
|
|
53
|
+
get paymentAccountLookupLineReference() {
|
|
54
|
+
return this._paymentAccountLookupLineReference;
|
|
55
|
+
}
|
|
50
56
|
newTransactionLine() {
|
|
51
|
-
return new PaymentAccountHolderValidationLine(this.lineNumber, this.lineType, this._accountHolder, this._identificationType, this._firstAdminDivision, this._accountHolderMismatch);
|
|
57
|
+
return new PaymentAccountHolderValidationLine(this.lineNumber, this.lineType, this._accountHolder, this._identificationType, this._firstAdminDivision, this._accountHolderMismatch, this._paymentAccountLookupLineReference);
|
|
52
58
|
}
|
|
53
59
|
}
|
|
54
60
|
exports.PaymentAccountHolderValidationLine = PaymentAccountHolderValidationLine;
|
|
@@ -14,6 +14,7 @@ export declare class PaymentAccountLookupLine extends BaseTransactionLine implem
|
|
|
14
14
|
private readonly _referenceNumber?;
|
|
15
15
|
private readonly _authorizationDeviceId?;
|
|
16
16
|
private readonly _accountBalance?;
|
|
17
|
+
private readonly _tenderName?;
|
|
17
18
|
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): PaymentAccountLookupLine;
|
|
18
19
|
static createFromJsonObject(transactionLineJsonObj: any): PaymentAccountLookupLine;
|
|
19
20
|
get couldAffectPricing(): boolean;
|
|
@@ -25,7 +26,8 @@ export declare class PaymentAccountLookupLine extends BaseTransactionLine implem
|
|
|
25
26
|
get referenceNumber(): string;
|
|
26
27
|
get authorizationDeviceId(): string;
|
|
27
28
|
get accountBalance(): IMoney;
|
|
28
|
-
|
|
29
|
+
get tenderName(): string;
|
|
30
|
+
protected constructor(lineNumber: number, lineType: string, cardHolder: ICardHolder, lookupResult?: PaymentAccountLookupResult, lookupResultReason?: string, accountNumber?: string, cardToken?: string, referenceNumber?: string, authorizationDeviceId?: string, accountBalance?: IMoney, tenderName?: string);
|
|
29
31
|
protected newTransactionLine(): PaymentAccountLookupLine;
|
|
30
32
|
}
|
|
31
33
|
export declare function isPaymentAccountLookupLine(transactionLine: ITransactionLine): transactionLine is PaymentAccountLookupLine;
|
|
@@ -6,7 +6,7 @@ const BaseTransactionLine_1 = require("../BaseTransactionLine");
|
|
|
6
6
|
const Constants_1 = require("../Constants");
|
|
7
7
|
exports.PAYMENT_ACCOUNT_LOOKUP_LINE_TYPE = "PaymentAccountLookup";
|
|
8
8
|
class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
9
|
-
constructor(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance) {
|
|
9
|
+
constructor(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName) {
|
|
10
10
|
super(lineNumber, lineType);
|
|
11
11
|
this._cardHolder = cardHolder;
|
|
12
12
|
this._lookupResult = lookupResult;
|
|
@@ -16,6 +16,7 @@ class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine
|
|
|
16
16
|
this._referenceNumber = referenceNumber;
|
|
17
17
|
this._authorizationDeviceId = authorizationDeviceId;
|
|
18
18
|
this._accountBalance = accountBalance;
|
|
19
|
+
this._tenderName = tenderName;
|
|
19
20
|
}
|
|
20
21
|
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
21
22
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -28,7 +29,8 @@ class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine
|
|
|
28
29
|
const referenceNumber = (_f = accountLookupResponse) === null || _f === void 0 ? void 0 : _f.referenceNumber;
|
|
29
30
|
const accountBalance = (_g = accountLookupResponse) === null || _g === void 0 ? void 0 : _g.balance;
|
|
30
31
|
const authorizationDeviceId = collectedData.get(Constants_1.CollectedDataKey.AuthorizationDeviceId);
|
|
31
|
-
|
|
32
|
+
const tenderName = collectedData.get(Constants_1.CollectedDataKey.TenderName);
|
|
33
|
+
return new PaymentAccountLookupLine(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName);
|
|
32
34
|
}
|
|
33
35
|
static createFromJsonObject(transactionLineJsonObj) {
|
|
34
36
|
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
@@ -41,7 +43,8 @@ class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine
|
|
|
41
43
|
const referenceNumber = transactionLineJsonObj._referenceNumber;
|
|
42
44
|
const authorizationDeviceId = transactionLineJsonObj._authorizationDeviceId;
|
|
43
45
|
const accountBalance = transactionLineJsonObj._accountBalance;
|
|
44
|
-
const
|
|
46
|
+
const tenderName = transactionLineJsonObj._tenderName;
|
|
47
|
+
const accountLookupLine = new PaymentAccountLookupLine(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName);
|
|
45
48
|
accountLookupLine.loadFromJsonObject(transactionLineJsonObj);
|
|
46
49
|
return accountLookupLine;
|
|
47
50
|
}
|
|
@@ -72,8 +75,11 @@ class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine
|
|
|
72
75
|
get accountBalance() {
|
|
73
76
|
return this._accountBalance;
|
|
74
77
|
}
|
|
78
|
+
get tenderName() {
|
|
79
|
+
return this._tenderName;
|
|
80
|
+
}
|
|
75
81
|
newTransactionLine() {
|
|
76
|
-
return new PaymentAccountLookupLine(this.lineNumber, this.lineType, this._cardHolder, this._lookupResult, this._lookupResultReason, this._accountNumber, this._cardToken, this._referenceNumber, this._authorizationDeviceId, this._accountBalance);
|
|
82
|
+
return new PaymentAccountLookupLine(this.lineNumber, this.lineType, this._cardHolder, this._lookupResult, this._lookupResultReason, this._accountNumber, this._cardToken, this._referenceNumber, this._authorizationDeviceId, this._accountBalance, this._tenderName);
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
exports.PaymentAccountLookupLine = PaymentAccountLookupLine;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-store-selling-features-domain-model",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.56.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",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@aptos-scp/scp-types-client-registration": "^1.4.0",
|
|
63
63
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
64
64
|
"@aptos-scp/scp-types-commerce-devices": "^4.1.0",
|
|
65
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.75.
|
|
65
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.75.1",
|
|
66
66
|
"@aptos-scp/scp-types-customer": "^3.7.0",
|
|
67
67
|
"@aptos-scp/scp-types-einvoice": "^1.17.0",
|
|
68
68
|
"@aptos-scp/scp-types-inventory": "^2.0.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
85
85
|
"@aptos-scp/scp-types-client-registration": "^1.4.0",
|
|
86
86
|
"@aptos-scp/scp-types-commerce-devices": "^4.1.0",
|
|
87
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.75.
|
|
87
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.75.1",
|
|
88
88
|
"@aptos-scp/scp-types-core": "^1.0.5",
|
|
89
89
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
90
90
|
"@aptos-scp/scp-types-currency-conversion": "^1.2.0",
|