@aptos-scp/scp-component-store-selling-features-domain-model 2.7.0 → 2.7.2
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.
|
@@ -112,7 +112,7 @@ export declare class TenderType {
|
|
|
112
112
|
static getOriginalRefundableTenders(container: Container, accountingCurrency: string, originalTransactionsDetails: IOriginalTransactionDetails[], balanceDue: Money, itemTypes?: string[], orderTypes?: string[], isRefund?: boolean, productAttributeTypes?: string[], displayInfo?: any): IOriginalTender[];
|
|
113
113
|
static getDefaultConfiguredTenderType(container: Container, accountingCurrency: string): TenderType;
|
|
114
114
|
static createFromJsonObject(tenderTypeFromJson: any): TenderType;
|
|
115
|
-
constructor(id: string, tenderName: string, tenderTypeName: string, tenderAuthCategory: TenderAuthCategory, additionalTenderAuthCategories: TenderAuthCategory[], cardType: CardType, signatureCapturePolicy: TenderSignatureCapturePolicy, signatureCaptureFloorLimit: Money, printDeclineTenderDetails: boolean, printDeclineTenderReceipt: boolean, printStoreTenderReceipt: boolean, allowPostVoid: boolean, allowCallForAuthorization: boolean, allowRefund: AllowRefund[],
|
|
115
|
+
constructor(id: string, tenderName: string, tenderTypeName: string, tenderAuthCategory: TenderAuthCategory, additionalTenderAuthCategories: TenderAuthCategory[], cardType: CardType, signatureCapturePolicy: TenderSignatureCapturePolicy, signatureCaptureFloorLimit: Money, printDeclineTenderDetails: boolean, printDeclineTenderReceipt: boolean, printStoreTenderReceipt: boolean, allowPostVoid: boolean, allowCallForAuthorization: boolean, allowRefund: AllowRefund[], pluralTenderName?: string, fiscalCode?: string, fiscalType?: string, tenderLabel?: ILabel, actions?: ITenderActions, overTenderRule?: OverTenderRule, subType?: TenderSubType, customCardType?: string, promptOnPartialApproval?: string, pinRules?: IPinRules, subscriptionEntryMethods?: EntryMethod[], changeBehavior?: string, isForeignTender?: boolean, currencyCode?: string, eligibleForTaxLottery?: boolean, printVoidTenderDetails?: boolean, printVoidTenderReceipt?: boolean, cashoutThreshold?: Money, signatureCapturePolicyForCallForAuth?: TenderSignatureCapturePolicy);
|
|
116
116
|
signatureRequired(tenderAmount: Money, authResponse: IAuthorizationResponse): boolean;
|
|
117
117
|
getChangeTenderType(container: Container, accountingCurrency: string, balanceDue?: Money, tenderAmount?: Money, authorizationFailed?: boolean, changeDueAmount?: Money): TenderType[];
|
|
118
118
|
get id(): string;
|
|
@@ -34,7 +34,7 @@ var TenderSignatureCapturePolicy;
|
|
|
34
34
|
TenderSignatureCapturePolicy["AuthResponseOrConfiguration"] = "AuthResponseOrConfiguration";
|
|
35
35
|
})(TenderSignatureCapturePolicy = exports.TenderSignatureCapturePolicy || (exports.TenderSignatureCapturePolicy = {}));
|
|
36
36
|
class TenderType {
|
|
37
|
-
constructor(id, tenderName, tenderTypeName, tenderAuthCategory, additionalTenderAuthCategories, cardType, signatureCapturePolicy, signatureCaptureFloorLimit, printDeclineTenderDetails, printDeclineTenderReceipt, printStoreTenderReceipt, allowPostVoid, allowCallForAuthorization, allowRefund,
|
|
37
|
+
constructor(id, tenderName, tenderTypeName, tenderAuthCategory, additionalTenderAuthCategories, cardType, signatureCapturePolicy, signatureCaptureFloorLimit, printDeclineTenderDetails, printDeclineTenderReceipt, printStoreTenderReceipt, allowPostVoid, allowCallForAuthorization, allowRefund, pluralTenderName, fiscalCode, fiscalType, tenderLabel, actions, overTenderRule, subType, customCardType, promptOnPartialApproval, pinRules, subscriptionEntryMethods, changeBehavior, isForeignTender, currencyCode, eligibleForTaxLottery, printVoidTenderDetails, printVoidTenderReceipt, cashoutThreshold, signatureCapturePolicyForCallForAuth) {
|
|
38
38
|
this._id = id;
|
|
39
39
|
this._tenderName = tenderName;
|
|
40
40
|
this._tenderTypeName = tenderTypeName;
|
|
@@ -332,7 +332,7 @@ class TenderType {
|
|
|
332
332
|
if (tenderTypeFromJson) {
|
|
333
333
|
tenderType = new TenderType(tenderTypeFromJson._id, tenderTypeFromJson._tenderName, tenderTypeFromJson._tenderTypeName, Constants_1.TenderAuthCategory[tenderTypeFromJson._tenderAuthCategory], tenderTypeFromJson._additionalTenderAuthCategories, scp_types_commerce_devices_1.CardType[tenderTypeFromJson._cardType], TenderSignatureCapturePolicy[tenderTypeFromJson._signatureCapturePolicy], tenderTypeFromJson._signatureCaptureFloorLimit
|
|
334
334
|
? new scp_component_business_core_1.Money(tenderTypeFromJson._signatureCaptureFloorLimit)
|
|
335
|
-
: undefined, tenderTypeFromJson._printDeclineTenderDetails, tenderTypeFromJson._printDeclineTenderReceipt, tenderTypeFromJson._printStoreTenderReceipt, tenderTypeFromJson._allowPostVoid, tenderTypeFromJson._allowCallForAuthorization, tenderTypeFromJson._allowRefund,
|
|
335
|
+
: undefined, tenderTypeFromJson._printDeclineTenderDetails, tenderTypeFromJson._printDeclineTenderReceipt, tenderTypeFromJson._printStoreTenderReceipt, tenderTypeFromJson._allowPostVoid, tenderTypeFromJson._allowCallForAuthorization, tenderTypeFromJson._allowRefund, tenderTypeFromJson._pluralTenderName, tenderTypeFromJson._fiscalCode, tenderTypeFromJson._fiscalType, tenderTypeFromJson._tenderLabel, tenderTypeFromJson._actions, tenderTypeFromJson._overTenderRule, tenderTypeFromJson._subType, tenderTypeFromJson._customCardType, tenderTypeFromJson._promptOnPartialApproval, tenderTypeFromJson._pinRules, tenderTypeFromJson._subscriptionEntryMethods, tenderTypeFromJson._changeBehavior, tenderTypeFromJson._isForeignTender, tenderTypeFromJson._currencyCode, tenderTypeFromJson._eligibleForTaxLottery, tenderTypeFromJson._printVoidTenderDetails, tenderTypeFromJson._printVoidTenderReceipt, tenderTypeFromJson._cashoutThreshold ? new scp_component_business_core_1.Money(tenderTypeFromJson._cashoutThreshold) : undefined, TenderSignatureCapturePolicy[tenderTypeFromJson._signatureCapturePolicyForCallForAuth]);
|
|
336
336
|
}
|
|
337
337
|
else if (tenderTypeFromJson === null) {
|
|
338
338
|
tenderType = null;
|
|
@@ -340,9 +340,10 @@ class TenderType {
|
|
|
340
340
|
return tenderType;
|
|
341
341
|
}
|
|
342
342
|
signatureRequired(tenderAmount, authResponse) {
|
|
343
|
+
var _a;
|
|
343
344
|
let sigRequired = false;
|
|
344
345
|
//if the auth type is updateAuthorization then use signatureCapturePolicyForCallForAuth
|
|
345
|
-
const signatureCapturePolicy = authResponse.requestType === scp_types_commerce_devices_1.PaymentRequestType.UpdateAuthorization
|
|
346
|
+
const signatureCapturePolicy = ((_a = authResponse) === null || _a === void 0 ? void 0 : _a.requestType) === scp_types_commerce_devices_1.PaymentRequestType.UpdateAuthorization
|
|
346
347
|
? this.signatureCapturePolicyForCallForAuth
|
|
347
348
|
: this.signatureCapturePolicy;
|
|
348
349
|
switch (signatureCapturePolicy) {
|
|
@@ -515,9 +516,9 @@ class TenderType {
|
|
|
515
516
|
.filter((configuredTender) => tenderIsActive(configuredTender, isRefund, withTransaction, withReference, withMappedTender, withOfflineTransaction, accountingCurrency))
|
|
516
517
|
.map((configuredTender) => new TenderType(configuredTender.tenderId, configuredTender.tenderName, configuredTender.tenderType, Constants_1.TenderAuthCategory[configuredTender.tenderAuthCategory], configuredTender.additionalTenderAuthCategories, scp_types_commerce_devices_1.CardType[configuredTender.cardType], TenderSignatureCapturePolicy[configuredTender.signatureCapturePolicy], configuredTender.hasOwnProperty("signatureCaptureFloorLimit")
|
|
517
518
|
? new scp_component_business_core_1.Money(configuredTender.signatureCaptureFloorLimit, accountingCurrency)
|
|
518
|
-
: undefined, configuredTender.printDeclineTenderDetails, configuredTender.printDeclineTenderReceipt, configuredTender.printStoreTenderReceipt, configuredTender.allowPostVoid, configuredTender.allowCallForAuthorization !== false, configuredTender.allowRefund,
|
|
519
|
+
: undefined, configuredTender.printDeclineTenderDetails, configuredTender.printDeclineTenderReceipt, configuredTender.printStoreTenderReceipt, configuredTender.allowPostVoid, configuredTender.allowCallForAuthorization !== false, configuredTender.allowRefund, configuredTender.pluralTenderName, configuredTender.fiscalCode, configuredTender.fiscalType, configuredTender.tenderLabel, configuredTender.actions, configuredTender.overTenderRule && Constants_1.OverTenderRule[configuredTender.overTenderRule], configuredTender.subType, configuredTender.customCardType, configuredTender.promptOnPartialApproval, configuredTender.pinRules, configuredTender.subscriptionEntryMethods, configuredTender.changeBehavior, configuredTender.isForeignTender, configuredTender.currencyCode, configuredTender.eligibleForTaxLottery, configuredTender.printVoidTenderDetails, configuredTender.printVoidTenderReceipt, configuredTender.hasOwnProperty("cashoutThreshold")
|
|
519
520
|
? new scp_component_business_core_1.Money(configuredTender.cashoutThreshold, accountingCurrency)
|
|
520
|
-
: undefined));
|
|
521
|
+
: undefined, TenderSignatureCapturePolicy[configuredTender.signatureCapturePolicyForCallForAuth]));
|
|
521
522
|
return activeTenders;
|
|
522
523
|
}
|
|
523
524
|
static filterActiveTenderIds(tenderIds, configuredTenders, isRefund, withTransaction, withOfflineTransaction, accountingCurrency) {
|
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.7.
|
|
3
|
+
"version": "2.7.2",
|
|
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",
|