@aptos-scp/scp-component-store-selling-features-domain-model 3.3.0 → 3.4.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 +1 -0
- package/lib/domain/UIBusinessEventTypes.js +1 -0
- package/lib/domain/model/Constants.d.ts +8 -2
- package/lib/domain/model/Constants.js +6 -0
- package/lib/domain/model/MerchandiseTransaction.d.ts +4 -1
- package/lib/domain/model/MerchandiseTransaction.js +12 -2
- package/lib/domain/model/PaymentNotificationSession.d.ts +23 -0
- package/lib/domain/model/PaymentNotificationSession.js +59 -0
- package/lib/domain/model/index.d.ts +1 -0
- package/lib/domain/model/index.js +1 -0
- package/lib/domain/model/tender/valueCard/Interfaces.d.ts +2 -2
- package/lib/domain/model/tender/valueCard/Interfaces.js +2 -2
- package/package.json +1 -1
|
@@ -343,3 +343,4 @@ export declare const COUNTRY_BOX_START_TRANSACTION_EVENT: string;
|
|
|
343
343
|
export declare const COUNTRY_BOX_FINISH_TRANSACTION_EVENT: string;
|
|
344
344
|
export declare const FULFILLMENT_AUTHORIZATION_EVENT: string;
|
|
345
345
|
export declare const COUNTRY_BOX_REPORT_GENERATION_EVENT: string;
|
|
346
|
+
export declare const PAYMENT_NOTIFICATION_START_EVENT: string;
|
|
@@ -350,4 +350,5 @@ exports.COUNTRY_BOX_START_TRANSACTION_EVENT = "CountryBoxStartTransactionEvent";
|
|
|
350
350
|
exports.COUNTRY_BOX_FINISH_TRANSACTION_EVENT = "CountryBoxFinishTransactionEvent";
|
|
351
351
|
exports.FULFILLMENT_AUTHORIZATION_EVENT = "FulfillmentAuthorization";
|
|
352
352
|
exports.COUNTRY_BOX_REPORT_GENERATION_EVENT = "CountryBoxReportGenerationEvent";
|
|
353
|
+
exports.PAYMENT_NOTIFICATION_START_EVENT = "PaymentNotificationStart";
|
|
353
354
|
//# sourceMappingURL=UIBusinessEventTypes.js.map
|
|
@@ -288,6 +288,7 @@ export declare enum UiInputKey {
|
|
|
288
288
|
SINGLE_USE_COUPON_NUMBER = "input_singleUseCouponNumber",
|
|
289
289
|
SKIP_PASSWORD_CHANGE = "input_skipPasswordChange",
|
|
290
290
|
SKIP_CONFIRM_CLOSE = "input_skipConfirmClose",
|
|
291
|
+
STORE_COUNTRY_DISPLAY_NAME = "storeCountryDisplayName",
|
|
291
292
|
STORE_ITEM = "input_item",
|
|
292
293
|
STORE_ITEM_KEY = "input_itemKey",
|
|
293
294
|
STORE_ITEM_KEY_TYPE = "input_itemKeyType",
|
|
@@ -477,7 +478,9 @@ export declare enum UiInputKey {
|
|
|
477
478
|
FEE_LINE_FOR_REFUND = "input_feeLineForRefund",
|
|
478
479
|
FEE_REFUND_SOURCE = "input_feeRefundSource",
|
|
479
480
|
FEE_REFUNDABLE_AMOUNT = "input_feeRefundableAmount",
|
|
480
|
-
ITEM_TERMS_AND_CONDITIONS_ACCEPTED = "input_itemTermsAndConditionsAccepted"
|
|
481
|
+
ITEM_TERMS_AND_CONDITIONS_ACCEPTED = "input_itemTermsAndConditionsAccepted",
|
|
482
|
+
PAYMENT_AUTHORIZATION_REQUEST = "input_paymentAuthorizationRequest",
|
|
483
|
+
PAYMENT_AUTHORIZATION_RESPONSE = "input_paymentAuthorizationResponse"
|
|
481
484
|
}
|
|
482
485
|
export declare enum CollectedDataKey {
|
|
483
486
|
Abort = "abort",
|
|
@@ -940,6 +943,7 @@ export declare enum CollectedDataKey {
|
|
|
940
943
|
DeviceId = "deviceId",
|
|
941
944
|
RetailLocationId = "retailLocationId",
|
|
942
945
|
TenantId = "tenantId",
|
|
946
|
+
StoreCountryDisplayName = "storeCountryDisplayName",
|
|
943
947
|
StoreName = "storeName",
|
|
944
948
|
TransactionStartDateTime = "transactionStartDateTime",
|
|
945
949
|
TransactionEndDateTime = "transactionEndDateTime",
|
|
@@ -1026,7 +1030,8 @@ export declare enum CollectedDataKey {
|
|
|
1026
1030
|
CustomerInputMode = "customerInputMode",
|
|
1027
1031
|
PreAuthCapture = "preAuthCapture",
|
|
1028
1032
|
PreOrder = "preOrder",
|
|
1029
|
-
PreOrderAvailableDate = "preOrderAvailableDate"
|
|
1033
|
+
PreOrderAvailableDate = "preOrderAvailableDate",
|
|
1034
|
+
PaymentAuthorizationResponse = "paymentAuthorizationResponse"
|
|
1030
1035
|
}
|
|
1031
1036
|
export declare enum ItemLookupType {
|
|
1032
1037
|
ProductInquiryDetail = "ProductInquiryDetail",
|
|
@@ -1053,6 +1058,7 @@ export declare const TRANSACTION_RESUMING_ON_STARTUP_EVENT: string;
|
|
|
1053
1058
|
export declare const STORED_VALUE_REVERSAL_COMPLETED_EVENT_TYPE: string;
|
|
1054
1059
|
export declare const STORED_VALUE_CERTIFICATE_REVERSAL_COMPLETED_EVENT_TYPE: string;
|
|
1055
1060
|
export declare const PAYMENT_AUTH_INITIALIZE_START_EVENT_TYPE: string;
|
|
1061
|
+
export declare const PAYMENT_AUTH_CANCEL_START_EVENT_TYPE: string;
|
|
1056
1062
|
export declare const PAYMENT_AUTH_START_EVENT_TYPE: string;
|
|
1057
1063
|
export declare const TENDER_CHANGE_CANCEL_EVENT_TYPE: string;
|
|
1058
1064
|
export declare const CASH_DRAWER_SELECTED_EVENT: string;
|
|
@@ -289,6 +289,7 @@ var UiInputKey;
|
|
|
289
289
|
UiInputKey["SINGLE_USE_COUPON_NUMBER"] = "input_singleUseCouponNumber";
|
|
290
290
|
UiInputKey["SKIP_PASSWORD_CHANGE"] = "input_skipPasswordChange";
|
|
291
291
|
UiInputKey["SKIP_CONFIRM_CLOSE"] = "input_skipConfirmClose";
|
|
292
|
+
UiInputKey["STORE_COUNTRY_DISPLAY_NAME"] = "storeCountryDisplayName";
|
|
292
293
|
UiInputKey["STORE_ITEM"] = "input_item";
|
|
293
294
|
UiInputKey["STORE_ITEM_KEY"] = "input_itemKey";
|
|
294
295
|
UiInputKey["STORE_ITEM_KEY_TYPE"] = "input_itemKeyType";
|
|
@@ -479,6 +480,8 @@ var UiInputKey;
|
|
|
479
480
|
UiInputKey["FEE_REFUND_SOURCE"] = "input_feeRefundSource";
|
|
480
481
|
UiInputKey["FEE_REFUNDABLE_AMOUNT"] = "input_feeRefundableAmount";
|
|
481
482
|
UiInputKey["ITEM_TERMS_AND_CONDITIONS_ACCEPTED"] = "input_itemTermsAndConditionsAccepted";
|
|
483
|
+
UiInputKey["PAYMENT_AUTHORIZATION_REQUEST"] = "input_paymentAuthorizationRequest";
|
|
484
|
+
UiInputKey["PAYMENT_AUTHORIZATION_RESPONSE"] = "input_paymentAuthorizationResponse";
|
|
482
485
|
})(UiInputKey = exports.UiInputKey || (exports.UiInputKey = {}));
|
|
483
486
|
//
|
|
484
487
|
// Keys for use in relaying data collectedData (qualification) and nonContextualData (action).
|
|
@@ -947,6 +950,7 @@ var CollectedDataKey;
|
|
|
947
950
|
CollectedDataKey["DeviceId"] = "deviceId";
|
|
948
951
|
CollectedDataKey["RetailLocationId"] = "retailLocationId";
|
|
949
952
|
CollectedDataKey["TenantId"] = "tenantId";
|
|
953
|
+
CollectedDataKey["StoreCountryDisplayName"] = "storeCountryDisplayName";
|
|
950
954
|
CollectedDataKey["StoreName"] = "storeName";
|
|
951
955
|
CollectedDataKey["TransactionStartDateTime"] = "transactionStartDateTime";
|
|
952
956
|
CollectedDataKey["TransactionEndDateTime"] = "transactionEndDateTime";
|
|
@@ -1034,6 +1038,7 @@ var CollectedDataKey;
|
|
|
1034
1038
|
CollectedDataKey["PreAuthCapture"] = "preAuthCapture";
|
|
1035
1039
|
CollectedDataKey["PreOrder"] = "preOrder";
|
|
1036
1040
|
CollectedDataKey["PreOrderAvailableDate"] = "preOrderAvailableDate";
|
|
1041
|
+
CollectedDataKey["PaymentAuthorizationResponse"] = "paymentAuthorizationResponse";
|
|
1037
1042
|
})(CollectedDataKey = exports.CollectedDataKey || (exports.CollectedDataKey = {}));
|
|
1038
1043
|
var ItemLookupType;
|
|
1039
1044
|
(function (ItemLookupType) {
|
|
@@ -1064,6 +1069,7 @@ exports.TRANSACTION_RESUMING_ON_STARTUP_EVENT = "Transaction.ResumingOnStartup";
|
|
|
1064
1069
|
exports.STORED_VALUE_REVERSAL_COMPLETED_EVENT_TYPE = "StoredValue.ReversalCompleted";
|
|
1065
1070
|
exports.STORED_VALUE_CERTIFICATE_REVERSAL_COMPLETED_EVENT_TYPE = "StoredValueCertificate.ReversalCompleted";
|
|
1066
1071
|
exports.PAYMENT_AUTH_INITIALIZE_START_EVENT_TYPE = "PaymentAuth.InitializeStart";
|
|
1072
|
+
exports.PAYMENT_AUTH_CANCEL_START_EVENT_TYPE = "PaymentAuth.CancelStart";
|
|
1067
1073
|
exports.PAYMENT_AUTH_START_EVENT_TYPE = "PaymentAuth.Start";
|
|
1068
1074
|
exports.TENDER_CHANGE_CANCEL_EVENT_TYPE = "TenderChange.Cancel";
|
|
1069
1075
|
exports.CASH_DRAWER_SELECTED_EVENT = "CashDrawer.Selected";
|
|
@@ -176,8 +176,9 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
|
|
|
176
176
|
private _fiscalError?;
|
|
177
177
|
private _countryBoxFiscalError?;
|
|
178
178
|
private _hasFiscalizationCompleted?;
|
|
179
|
+
private _storeCountryNameForReceipt?;
|
|
179
180
|
static createFromJsonObj(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory, transactionReferenceFormatter: ITransactionReferenceFormatter): MerchandiseTransaction;
|
|
180
|
-
constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, accountingCurrency: string, transactionReferenceFormatter: ITransactionReferenceFormatter, governmentIssuedIds?: GovernmentBusinessId[], performingUser?: IUser, transactionId?: string, giftReceiptMode?: GiftReceiptMode, giftReceipt?: boolean, totalsBeforeVoid?: TotalsBeforeVoid, unusedCoupons?: Coupon[], employeeCustomer?: IEmployee, invoiceNumber?: string, invoiceSequenceNumber?: number, taxLotteryNumber?: string, order?: Order, invoiceSequenceNumberGenerator?: string, taxLotteryCustomerCode?: string, taxScanCodeData?: string, fiscalSignature?: IFiscalSignature, requiresVoid?: boolean, eInvoiceReference?: string, prepaidTendersToApply?: IPrepaidTenderToApply[], digestValue?: string, potentialPromotions?: PotentialPromotion[]);
|
|
181
|
+
constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, accountingCurrency: string, transactionReferenceFormatter: ITransactionReferenceFormatter, governmentIssuedIds?: GovernmentBusinessId[], performingUser?: IUser, transactionId?: string, giftReceiptMode?: GiftReceiptMode, giftReceipt?: boolean, totalsBeforeVoid?: TotalsBeforeVoid, unusedCoupons?: Coupon[], employeeCustomer?: IEmployee, invoiceNumber?: string, invoiceSequenceNumber?: number, taxLotteryNumber?: string, order?: Order, invoiceSequenceNumberGenerator?: string, taxLotteryCustomerCode?: string, taxScanCodeData?: string, fiscalSignature?: IFiscalSignature, requiresVoid?: boolean, eInvoiceReference?: string, prepaidTendersToApply?: IPrepaidTenderToApply[], digestValue?: string, potentialPromotions?: PotentialPromotion[], storeCountryNameForReceipt?: string);
|
|
181
182
|
clone(): ITransaction;
|
|
182
183
|
addLine(line: ITransactionLine): ITransaction;
|
|
183
184
|
createOrUpdateOrder(order: Order): ITransaction;
|
|
@@ -266,6 +267,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
|
|
|
266
267
|
get fiscalError(): IFiscalError;
|
|
267
268
|
get countryBoxFiscalError(): ICountryBoxFiscalError;
|
|
268
269
|
get hasFiscalizationCompleted(): boolean;
|
|
270
|
+
get storeCountryNameForReceipt(): string | undefined;
|
|
269
271
|
get tradeType(): MerchandiseTransactionTradeType;
|
|
270
272
|
get taxLotteryNumber(): string;
|
|
271
273
|
get taxLotteryCustomerCode(): string;
|
|
@@ -313,6 +315,7 @@ export declare class MerchandiseTransaction extends RetailTransaction implements
|
|
|
313
315
|
setFiscalError(fiscalError: IFiscalError): ITransaction;
|
|
314
316
|
setCountryBoxFiscalError(countryBoxFiscalError: ICountryBoxFiscalError): ITransaction;
|
|
315
317
|
setHasFiscalizationCompleted(hasFiscalizationCompleted: boolean): ITransaction;
|
|
318
|
+
assignStoreCountryNameForReceipt(storeCountryNameForReceipt: string): ITransaction;
|
|
316
319
|
assignOrderReferenceSequenceNumber(orderReferenceSequenceNumber: number, orderReferenceSequenceNumberGenerator: string): ITransaction;
|
|
317
320
|
assignInvoiceFiscalTransactionNumber(invoiceTransactionNumber: number, invoiceFiscalTransactionNumber: string): ITransaction;
|
|
318
321
|
assignTaxlotteryNumber(taxLotteryNumber: string): ITransaction;
|
|
@@ -24,7 +24,7 @@ exports.isMerchandiseTransaction = (transaction) => {
|
|
|
24
24
|
Ensure that any new property needs to added here as well toJSON methods as well.
|
|
25
25
|
*/
|
|
26
26
|
class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
27
|
-
constructor(deviceIdentity, businessDayDate, transactionNumber, accountingCurrency, transactionReferenceFormatter, governmentIssuedIds, performingUser, transactionId, giftReceiptMode, giftReceipt, totalsBeforeVoid, unusedCoupons, employeeCustomer, invoiceNumber, invoiceSequenceNumber, taxLotteryNumber, order, invoiceSequenceNumberGenerator, taxLotteryCustomerCode, taxScanCodeData, fiscalSignature, requiresVoid, eInvoiceReference, prepaidTendersToApply, digestValue, potentialPromotions) {
|
|
27
|
+
constructor(deviceIdentity, businessDayDate, transactionNumber, accountingCurrency, transactionReferenceFormatter, governmentIssuedIds, performingUser, transactionId, giftReceiptMode, giftReceipt, totalsBeforeVoid, unusedCoupons, employeeCustomer, invoiceNumber, invoiceSequenceNumber, taxLotteryNumber, order, invoiceSequenceNumberGenerator, taxLotteryCustomerCode, taxScanCodeData, fiscalSignature, requiresVoid, eInvoiceReference, prepaidTendersToApply, digestValue, potentialPromotions, storeCountryNameForReceipt) {
|
|
28
28
|
super(deviceIdentity, businessDayDate, transactionNumber, exports.MERCHANDISE_TRANSACTION_TYPE, performingUser, transactionId);
|
|
29
29
|
this._accountingCurrency = accountingCurrency;
|
|
30
30
|
this._transactionTotalDeliveryFee = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
@@ -88,6 +88,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
88
88
|
this._fiscalError = undefined;
|
|
89
89
|
this._countryBoxFiscalError = undefined;
|
|
90
90
|
this._hasFiscalizationCompleted = false;
|
|
91
|
+
this._storeCountryNameForReceipt = storeCountryNameForReceipt;
|
|
91
92
|
this._tradeType = undefined;
|
|
92
93
|
this._denominationRounding = new scp_component_business_core_1.Money(0, accountingCurrency);
|
|
93
94
|
this._order = order;
|
|
@@ -208,6 +209,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
208
209
|
transaction._fiscalError = this._fiscalError;
|
|
209
210
|
transaction._countryBoxFiscalError = this._countryBoxFiscalError;
|
|
210
211
|
transaction._hasFiscalizationCompleted = this._hasFiscalizationCompleted;
|
|
212
|
+
transaction._storeCountryNameForReceipt = this._storeCountryNameForReceipt;
|
|
211
213
|
transaction._tradeType = this._tradeType;
|
|
212
214
|
transaction._taxLotteryNumber = this._taxLotteryNumber;
|
|
213
215
|
transaction._denominationRounding = this._denominationRounding;
|
|
@@ -515,6 +517,9 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
515
517
|
get hasFiscalizationCompleted() {
|
|
516
518
|
return this._hasFiscalizationCompleted;
|
|
517
519
|
}
|
|
520
|
+
get storeCountryNameForReceipt() {
|
|
521
|
+
return this._storeCountryNameForReceipt;
|
|
522
|
+
}
|
|
518
523
|
get tradeType() {
|
|
519
524
|
return this._tradeType;
|
|
520
525
|
}
|
|
@@ -745,6 +750,11 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
745
750
|
newTransaction._hasFiscalizationCompleted = hasFiscalizationCompleted;
|
|
746
751
|
return newTransaction;
|
|
747
752
|
}
|
|
753
|
+
assignStoreCountryNameForReceipt(storeCountryNameForReceipt) {
|
|
754
|
+
const newTransaction = this.clone();
|
|
755
|
+
newTransaction._storeCountryNameForReceipt = storeCountryNameForReceipt.trim();
|
|
756
|
+
return newTransaction;
|
|
757
|
+
}
|
|
748
758
|
assignOrderReferenceSequenceNumber(orderReferenceSequenceNumber, orderReferenceSequenceNumberGenerator) {
|
|
749
759
|
const newTransaction = this.clone();
|
|
750
760
|
newTransaction._orderReferenceSequenceNumber = orderReferenceSequenceNumber;
|
|
@@ -1107,7 +1117,7 @@ class MerchandiseTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
1107
1117
|
};
|
|
1108
1118
|
}
|
|
1109
1119
|
newTransaction() {
|
|
1110
|
-
return new MerchandiseTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this._accountingCurrency, this._transactionReferenceFormatter, this._governmentIssuedIds, this.performingUser, this.transactionId, undefined, undefined, undefined, undefined, this._employeeCustomer, this._invoiceNumber, this._invoiceSequenceNumber, this._taxLotteryNumber, this.order, this._invoiceSequenceNumberGenerator, this._taxLotteryCustomerCode, this.taxScanCodeData, this._fiscalSignature, this._requiresVoid, this._eInvoiceReference, this.prepaidTendersToApply, this._digestValue);
|
|
1120
|
+
return new MerchandiseTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this._accountingCurrency, this._transactionReferenceFormatter, this._governmentIssuedIds, this.performingUser, this.transactionId, undefined, undefined, undefined, undefined, this._employeeCustomer, this._invoiceNumber, this._invoiceSequenceNumber, this._taxLotteryNumber, this.order, this._invoiceSequenceNumberGenerator, this._taxLotteryCustomerCode, this.taxScanCodeData, this._fiscalSignature, this._requiresVoid, this._eInvoiceReference, this.prepaidTendersToApply, this._digestValue, this._potentialPromotions, this._storeCountryNameForReceipt);
|
|
1111
1121
|
}
|
|
1112
1122
|
// eslint-disable-next-line complexity
|
|
1113
1123
|
loadFromJsonObject(transactionJsonObj, transactionLineFactory) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IState } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
export declare const PAYMENT_NOTIFICATION_SESSION: string;
|
|
3
|
+
export declare enum PaymentNotificationSessionState {
|
|
4
|
+
Inactive = "Inactive",
|
|
5
|
+
Initializing = "Initializing",
|
|
6
|
+
InProgress = "InProgress",
|
|
7
|
+
Completed = "Completed"
|
|
8
|
+
}
|
|
9
|
+
export declare class PaymentNotificationSession implements IState {
|
|
10
|
+
private readonly _type;
|
|
11
|
+
private readonly _state;
|
|
12
|
+
private readonly _paymentAuthorizationResponse;
|
|
13
|
+
static createFromJsonObject(paymentNotificationSessionJsonObj: any): PaymentNotificationSession;
|
|
14
|
+
static create(): PaymentNotificationSession;
|
|
15
|
+
get type(): string;
|
|
16
|
+
get state(): PaymentNotificationSessionState;
|
|
17
|
+
get paymentAuthorizationResponse(): any;
|
|
18
|
+
get stateValues(): Readonly<Map<string, any>>;
|
|
19
|
+
initialize(): PaymentNotificationSession;
|
|
20
|
+
inProgress(lastPaymentAuthorizationResponse?: any): PaymentNotificationSession;
|
|
21
|
+
complete(): PaymentNotificationSession;
|
|
22
|
+
private constructor();
|
|
23
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const scp_component_logging_1 = require("@aptos-scp/scp-component-logging");
|
|
4
|
+
const logger = scp_component_logging_1.LogManager.getLogger("com.aptos.storesellingfeatures.domain.model.PaymentNotificationSession");
|
|
5
|
+
exports.PAYMENT_NOTIFICATION_SESSION = "PaymentNotificationSession";
|
|
6
|
+
var PaymentNotificationSessionState;
|
|
7
|
+
(function (PaymentNotificationSessionState) {
|
|
8
|
+
PaymentNotificationSessionState["Inactive"] = "Inactive";
|
|
9
|
+
PaymentNotificationSessionState["Initializing"] = "Initializing";
|
|
10
|
+
PaymentNotificationSessionState["InProgress"] = "InProgress";
|
|
11
|
+
PaymentNotificationSessionState["Completed"] = "Completed";
|
|
12
|
+
})(PaymentNotificationSessionState = exports.PaymentNotificationSessionState || (exports.PaymentNotificationSessionState = {}));
|
|
13
|
+
class PaymentNotificationSession {
|
|
14
|
+
constructor(state, paymentAuthorizationResponse) {
|
|
15
|
+
this._type = exports.PAYMENT_NOTIFICATION_SESSION;
|
|
16
|
+
this._state = state;
|
|
17
|
+
if (state === PaymentNotificationSessionState.Initializing ||
|
|
18
|
+
state === PaymentNotificationSessionState.Completed) {
|
|
19
|
+
this._paymentAuthorizationResponse = undefined;
|
|
20
|
+
}
|
|
21
|
+
else if (paymentAuthorizationResponse) {
|
|
22
|
+
this._paymentAuthorizationResponse = paymentAuthorizationResponse;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
static createFromJsonObject(paymentNotificationSessionJsonObj) {
|
|
26
|
+
logger.traceEntry("createFromJsonObject");
|
|
27
|
+
return new PaymentNotificationSession(paymentNotificationSessionJsonObj._state, paymentNotificationSessionJsonObj._paymentAuthorizationResponse);
|
|
28
|
+
}
|
|
29
|
+
static create() {
|
|
30
|
+
logger.traceEntry("create");
|
|
31
|
+
return new PaymentNotificationSession(PaymentNotificationSessionState.Inactive);
|
|
32
|
+
}
|
|
33
|
+
get type() {
|
|
34
|
+
return this._type;
|
|
35
|
+
}
|
|
36
|
+
get state() {
|
|
37
|
+
return this._state;
|
|
38
|
+
}
|
|
39
|
+
get paymentAuthorizationResponse() {
|
|
40
|
+
return this._paymentAuthorizationResponse;
|
|
41
|
+
}
|
|
42
|
+
get stateValues() {
|
|
43
|
+
return new Map([
|
|
44
|
+
["PaymentNotificationSession.state", this._state],
|
|
45
|
+
["PaymentNotificationSession.paymentAuthorizationResponse", this._paymentAuthorizationResponse],
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
initialize() {
|
|
49
|
+
return new PaymentNotificationSession(PaymentNotificationSessionState.Initializing);
|
|
50
|
+
}
|
|
51
|
+
inProgress(lastPaymentAuthorizationResponse) {
|
|
52
|
+
return new PaymentNotificationSession(PaymentNotificationSessionState.InProgress, lastPaymentAuthorizationResponse);
|
|
53
|
+
}
|
|
54
|
+
complete() {
|
|
55
|
+
return new PaymentNotificationSession(PaymentNotificationSessionState.Completed);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.PaymentNotificationSession = PaymentNotificationSession;
|
|
59
|
+
//# sourceMappingURL=PaymentNotificationSession.js.map
|
|
@@ -38,6 +38,7 @@ export * from "./MerchandiseTransaction";
|
|
|
38
38
|
export * from "./TenderControlTransaction";
|
|
39
39
|
export * from "./ApplicationControlTransaction";
|
|
40
40
|
export * from "./ReceiptSession";
|
|
41
|
+
export * from "./PaymentNotificationSession";
|
|
41
42
|
export * from "./ReprintReceiptTransaction";
|
|
42
43
|
export * from "./ResumeTransactionSession";
|
|
43
44
|
export * from "./StoredValueCardSession";
|
|
@@ -40,6 +40,7 @@ __export(require("./MerchandiseTransaction"));
|
|
|
40
40
|
__export(require("./TenderControlTransaction"));
|
|
41
41
|
__export(require("./ApplicationControlTransaction"));
|
|
42
42
|
__export(require("./ReceiptSession"));
|
|
43
|
+
__export(require("./PaymentNotificationSession"));
|
|
43
44
|
__export(require("./ReprintReceiptTransaction"));
|
|
44
45
|
__export(require("./ResumeTransactionSession"));
|
|
45
46
|
__export(require("./StoredValueCardSession"));
|
|
@@ -48,10 +48,10 @@ export declare enum ValueCardAction {
|
|
|
48
48
|
Inquiry = "inquiry",
|
|
49
49
|
Redeem = "redeem",
|
|
50
50
|
AddValue = "addValue",
|
|
51
|
-
/** AO `valueCardServiceBehaviors.enabledActions` — add-value path during refund
|
|
51
|
+
/** AO `valueCardServiceBehaviors.enabledActions` — add-value path during refund. */
|
|
52
52
|
AddValueDuringRefund = "addValueDuringRefund",
|
|
53
53
|
Issue = "issue",
|
|
54
|
-
/** AO `valueCardServiceBehaviors.enabledActions` — issue path during refund
|
|
54
|
+
/** AO `valueCardServiceBehaviors.enabledActions` — issue path during refund. */
|
|
55
55
|
IssueDuringRefund = "issueDuringRefund",
|
|
56
56
|
VoidRedeem = "voidRedeem",
|
|
57
57
|
VoidIssue = "voidIssue",
|
|
@@ -17,10 +17,10 @@ var ValueCardAction;
|
|
|
17
17
|
ValueCardAction["Inquiry"] = "inquiry";
|
|
18
18
|
ValueCardAction["Redeem"] = "redeem";
|
|
19
19
|
ValueCardAction["AddValue"] = "addValue";
|
|
20
|
-
/** AO `valueCardServiceBehaviors.enabledActions` — add-value path during refund
|
|
20
|
+
/** AO `valueCardServiceBehaviors.enabledActions` — add-value path during refund. */
|
|
21
21
|
ValueCardAction["AddValueDuringRefund"] = "addValueDuringRefund";
|
|
22
22
|
ValueCardAction["Issue"] = "issue";
|
|
23
|
-
/** AO `valueCardServiceBehaviors.enabledActions` — issue path during refund
|
|
23
|
+
/** AO `valueCardServiceBehaviors.enabledActions` — issue path during refund. */
|
|
24
24
|
ValueCardAction["IssueDuringRefund"] = "issueDuringRefund";
|
|
25
25
|
ValueCardAction["VoidRedeem"] = "voidRedeem";
|
|
26
26
|
ValueCardAction["VoidIssue"] = "voidIssue";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-store-selling-features-domain-model",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.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",
|