@aptos-scp/scp-component-store-selling-features-domain-model 1.42.1 → 1.43.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.
@@ -9,7 +9,7 @@ export declare class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator {
9
9
  */
10
10
  adjustmentAmount: Money;
11
11
  private _ruleId;
12
- private _percent;
12
+ private _percentAdjustment;
13
13
  private _discountAmount;
14
14
  private _sublines;
15
15
  private _newExtendedAmount;
@@ -23,7 +23,7 @@ export declare class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator {
23
23
  private _isFastDiscount;
24
24
  private _presentation;
25
25
  private _aggregationId;
26
- constructor(decoratorType: string, replacementUnitPrice: Price, newExtendedAmount: Money, feeLine: IFeeLine, lineSavings: Money, adjustmentAmount: Money, annotationDescription: string, annotationSourceType: string, discountAmount?: Money, percent?: string, discountName?: string, discountDescription?: string, discountType?: VerboseDiscountType, sublines?: IFeeSubline[], replacementAmount?: Money, isEmployeeDiscount?: boolean, ruleId?: string, extendedAmountBeforeAdjustment?: Money, isFastDiscount?: boolean, presentation?: IFeeLine, aggregationId?: string);
26
+ constructor(decoratorType: string, replacementUnitPrice: Price, newExtendedAmount: Money, feeLine: IFeeLine, lineSavings: Money, adjustmentAmount: Money, annotationDescription: string, annotationSourceType: string, discountAmount?: Money, percentAdjustment?: string, discountName?: string, discountDescription?: string, discountType?: VerboseDiscountType, sublines?: IFeeSubline[], replacementAmount?: Money, isEmployeeDiscount?: boolean, ruleId?: string, extendedAmountBeforeAdjustment?: Money, isFastDiscount?: boolean, presentation?: IFeeLine, aggregationId?: string);
27
27
  get unitPriceBeforeDiscounts(): Price;
28
28
  /**
29
29
  * Percent adjustment if a percentage was applied
@@ -44,7 +44,6 @@ export declare class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator {
44
44
  get replacementUnitPrice(): Price;
45
45
  get replacementAmount(): Money;
46
46
  get newExtendedAmount(): Money;
47
- get percent(): string;
48
47
  get unitPrice(): Price;
49
48
  get unitPriceExcludingTransactionDiscounts(): Price;
50
49
  get extendedAmount(): Money;
@@ -4,7 +4,7 @@ const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-sto
4
4
  const ErrorCodes_1 = require("../../../config/ErrorCodes");
5
5
  const BaseFeeLineDecorator_1 = require("./BaseFeeLineDecorator");
6
6
  class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator_1.BaseFeeLineDecorator {
7
- constructor(decoratorType, replacementUnitPrice, newExtendedAmount, feeLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, discountAmount, percent, discountName, discountDescription, discountType, sublines, replacementAmount, isEmployeeDiscount, ruleId, extendedAmountBeforeAdjustment, isFastDiscount, presentation, aggregationId) {
7
+ constructor(decoratorType, replacementUnitPrice, newExtendedAmount, feeLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, discountAmount, percentAdjustment, discountName, discountDescription, discountType, sublines, replacementAmount, isEmployeeDiscount, ruleId, extendedAmountBeforeAdjustment, isFastDiscount, presentation, aggregationId) {
8
8
  super(decoratorType, feeLine, annotationDescription, annotationSourceType, undefined, undefined, undefined, lineSavings);
9
9
  if (!replacementUnitPrice) {
10
10
  throw new scp_component_store_selling_core_1.PosError(`The replacement unit price is required on FeeLineBaseDiscountDecorator.`, ErrorCodes_1.SSF_DECORATOR_ERROR_CODE);
@@ -25,7 +25,7 @@ class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator_1.BaseFeeLineDec
25
25
  this._discountDescription = discountDescription;
26
26
  this._discountType = discountType;
27
27
  this._discountAmount = discountAmount;
28
- this._percent = percent;
28
+ this._percentAdjustment = percentAdjustment;
29
29
  this._sublines = sublines;
30
30
  this._isEmployeeDiscount = isEmployeeDiscount;
31
31
  this._ruleId = ruleId;
@@ -47,7 +47,7 @@ class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator_1.BaseFeeLineDec
47
47
  * @returns {number}
48
48
  */
49
49
  get percentAdjustment() {
50
- return this._percent;
50
+ return this._percentAdjustment;
51
51
  }
52
52
  /**
53
53
  * The amount of the modification, applied to the extended amount, if an amount off discount was applied
@@ -85,9 +85,6 @@ class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator_1.BaseFeeLineDec
85
85
  get newExtendedAmount() {
86
86
  return this._newExtendedAmount;
87
87
  }
88
- get percent() {
89
- return this._percent;
90
- }
91
88
  get unitPrice() {
92
89
  return this._replacementUnitPrice;
93
90
  }
@@ -137,7 +134,7 @@ class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator_1.BaseFeeLineDec
137
134
  newFeeLineBaseDiscountDecorator._discountDescription = this._discountDescription;
138
135
  newFeeLineBaseDiscountDecorator._discountType = this._discountType;
139
136
  newFeeLineBaseDiscountDecorator._discountAmount = this._discountAmount;
140
- newFeeLineBaseDiscountDecorator._percent = this._percent;
137
+ newFeeLineBaseDiscountDecorator._percentAdjustment = this._percentAdjustment;
141
138
  newFeeLineBaseDiscountDecorator._sublines = this._sublines;
142
139
  newFeeLineBaseDiscountDecorator._ruleId = this._ruleId;
143
140
  newFeeLineBaseDiscountDecorator._isEmployeeDiscount = this._isEmployeeDiscount;
@@ -148,7 +145,7 @@ class FeeLineBaseDiscountDecorator extends BaseFeeLineDecorator_1.BaseFeeLineDec
148
145
  return newFeeLineBaseDiscountDecorator;
149
146
  }
150
147
  newTransactionLine() {
151
- return new FeeLineBaseDiscountDecorator(this.lineDecoratorType, this._replacementUnitPrice, this._newExtendedAmount, this.decoratedTransactionLine, this.lineSavings, this.adjustmentAmount, this.annotationDescription, this.annotationSourceType, this._discountAmount, this._percent, this._discountName, this._discountDescription, this._discountType, this._sublines, this._replacementAmount, this._isEmployeeDiscount, this._ruleId, this._extendedAmountBeforeAdjustment, this._isFastDiscount, this._presentation, this._aggregationId);
148
+ return new FeeLineBaseDiscountDecorator(this.lineDecoratorType, this._replacementUnitPrice, this._newExtendedAmount, this.decoratedTransactionLine, this.lineSavings, this.adjustmentAmount, this.annotationDescription, this.annotationSourceType, this._discountAmount, this._percentAdjustment, this._discountName, this._discountDescription, this._discountType, this._sublines, this._replacementAmount, this._isEmployeeDiscount, this._ruleId, this._extendedAmountBeforeAdjustment, this._isFastDiscount, this._presentation, this._aggregationId);
152
149
  }
153
150
  }
154
151
  exports.FeeLineBaseDiscountDecorator = FeeLineBaseDiscountDecorator;
@@ -21,7 +21,7 @@ export declare class FeeLinePromotionDecorator extends FeeLineBaseDiscountDecora
21
21
  private _rewardCouponId;
22
22
  private _sourceIndicator;
23
23
  static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): FeeLinePromotionDecorator;
24
- constructor(ruleId: string, promotionType: string, replacementUnitPrice: Price, newExtendedAmount: Money, feeLine: IFeeLine, lineSavings: Money, adjustmentAmount: Money, annotationDescription: string, annotationSourceType: string, promoName?: string, promoDescription?: string, promotionId?: string, discountAmount?: Money, percent?: string, discountName?: string, discountDescription?: string, discountType?: DiscountType, rewardCouponId?: string, sublines?: IFeeSubline[], replacementAmount?: Money, couponCode?: string, isAutoCoupon?: boolean, sourceIndicator?: SourceIndicator, extendedAmountBeforeAdjustment?: Money, singleUseCoupon?: string, presentation?: IFeeLine, aggregationId?: string, isEmployeeDiscount?: boolean, campaign?: ICampaignInformation);
24
+ constructor(ruleId: string, promotionType: string, replacementUnitPrice: Price, newExtendedAmount: Money, feeLine: IFeeLine, lineSavings: Money, adjustmentAmount: Money, annotationDescription: string, annotationSourceType: string, promoName?: string, promoDescription?: string, promotionId?: string, discountAmount?: Money, percentAdjustment?: string, discountName?: string, discountDescription?: string, discountType?: DiscountType, rewardCouponId?: string, sublines?: IFeeSubline[], replacementAmount?: Money, couponCode?: string, isAutoCoupon?: boolean, sourceIndicator?: SourceIndicator, extendedAmountBeforeAdjustment?: Money, singleUseCoupon?: string, presentation?: IFeeLine, aggregationId?: string, isEmployeeDiscount?: boolean, campaign?: ICampaignInformation);
25
25
  get sourceIndicator(): SourceIndicator;
26
26
  get promoName(): string;
27
27
  get promoDescription(): string;
@@ -9,8 +9,8 @@ function isFeeLinePromotionDecorator(transactionLine) {
9
9
  }
10
10
  exports.isFeeLinePromotionDecorator = isFeeLinePromotionDecorator;
11
11
  class FeeLinePromotionDecorator extends FeeLineBaseDiscountDecorator_1.FeeLineBaseDiscountDecorator {
12
- constructor(ruleId, promotionType, replacementUnitPrice, newExtendedAmount, feeLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, promoName, promoDescription, promotionId, discountAmount, percent, discountName, discountDescription, discountType, rewardCouponId, sublines, replacementAmount, couponCode, isAutoCoupon, sourceIndicator, extendedAmountBeforeAdjustment, singleUseCoupon, presentation, aggregationId, isEmployeeDiscount, campaign) {
13
- super(exports.DECORATOR_TYPE_FEE_LINE_PROMO, replacementUnitPrice, newExtendedAmount, feeLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, discountAmount, percent, discountName, discountDescription, discountType, sublines, replacementAmount, isEmployeeDiscount, ruleId, extendedAmountBeforeAdjustment, undefined, presentation, aggregationId);
12
+ constructor(ruleId, promotionType, replacementUnitPrice, newExtendedAmount, feeLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, promoName, promoDescription, promotionId, discountAmount, percentAdjustment, discountName, discountDescription, discountType, rewardCouponId, sublines, replacementAmount, couponCode, isAutoCoupon, sourceIndicator, extendedAmountBeforeAdjustment, singleUseCoupon, presentation, aggregationId, isEmployeeDiscount, campaign) {
13
+ super(exports.DECORATOR_TYPE_FEE_LINE_PROMO, replacementUnitPrice, newExtendedAmount, feeLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, discountAmount, percentAdjustment, discountName, discountDescription, discountType, sublines, replacementAmount, isEmployeeDiscount, ruleId, extendedAmountBeforeAdjustment, undefined, presentation, aggregationId);
14
14
  this.adjustmentAmount = adjustmentAmount;
15
15
  this._promoName = promoName;
16
16
  this._promoDescription = promoDescription;
@@ -48,7 +48,7 @@ class FeeLinePromotionDecorator extends FeeLineBaseDiscountDecorator_1.FeeLineBa
48
48
  if (transactionLineJsonObj._discountAmount) {
49
49
  discountAmount = scp_component_business_core_1.Money.fromJSON(transactionLineJsonObj._discountAmount);
50
50
  }
51
- const percent = transactionLineJsonObj._percent;
51
+ const percentAdjustment = transactionLineJsonObj._percentAdjustment;
52
52
  const rewardCouponId = transactionLineJsonObj._rewardCouponId;
53
53
  const lineSavings = BaseFeeLineDecorator_1.BaseFeeLineDecorator.getLineSavingsFromJsonObject(transactionLineJsonObj);
54
54
  const annotationDescription = BaseFeeLineDecorator_1.BaseFeeLineDecorator.getAnnotationDescriptionFromJsonObject(transactionLineJsonObj);
@@ -67,7 +67,7 @@ class FeeLinePromotionDecorator extends FeeLineBaseDiscountDecorator_1.FeeLineBa
67
67
  const aggregationId = transactionLineJsonObj._aggregationId;
68
68
  const isEmployeeDiscount = transactionLineJsonObj._isEmployeeDiscount;
69
69
  const campaign = transactionLineJsonObj._campaign;
70
- const feeLinePromotionDecorator = new FeeLinePromotionDecorator(ruleId, promotionType, replacementUnitPrice, newExtendedAmount, decoratedFeeLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, promoName, promoDescription, promotionId, discountAmount, percent, discountName, discountDescription, discountType, rewardCouponId, sublines, replacementAmount, couponCode, isAutoCoupon, sourceIndicator, extendedAmountBeforeAdjustment, singleUseCoupon, presentation, aggregationId, isEmployeeDiscount, campaign);
70
+ const feeLinePromotionDecorator = new FeeLinePromotionDecorator(ruleId, promotionType, replacementUnitPrice, newExtendedAmount, decoratedFeeLine, lineSavings, adjustmentAmount, annotationDescription, annotationSourceType, promoName, promoDescription, promotionId, discountAmount, percentAdjustment, discountName, discountDescription, discountType, rewardCouponId, sublines, replacementAmount, couponCode, isAutoCoupon, sourceIndicator, extendedAmountBeforeAdjustment, singleUseCoupon, presentation, aggregationId, isEmployeeDiscount, campaign);
71
71
  return feeLinePromotionDecorator;
72
72
  }
73
73
  get sourceIndicator() {
@@ -119,7 +119,7 @@ class FeeLinePromotionDecorator extends FeeLineBaseDiscountDecorator_1.FeeLineBa
119
119
  return newFeeLinePromotionDecorator;
120
120
  }
121
121
  newTransactionLine() {
122
- return new FeeLinePromotionDecorator(this.ruleId, this._promotionType, this.replacementUnitPrice, this.newExtendedAmount, this.decoratedTransactionLine, this.lineSavings, this.adjustmentAmount, this.annotationDescription, this.annotationSourceType, this._promoName, this._promoDescription, this._promotionId, this.discountAmount, this.percent, this.discountName, this.discountDescription, this.discountType, this._rewardCouponId, this.sublines, this.replacementAmount, this.couponCode, this.isAutoCoupon, this.sourceIndicator, this.extendedAmountBeforeAdjustment, this.singleUseCoupon, this.presentation, this.aggregationId, this.isEmployeeDiscount, this.campaign);
122
+ return new FeeLinePromotionDecorator(this.ruleId, this._promotionType, this.replacementUnitPrice, this.newExtendedAmount, this.decoratedTransactionLine, this.lineSavings, this.adjustmentAmount, this.annotationDescription, this.annotationSourceType, this._promoName, this._promoDescription, this._promotionId, this.discountAmount, this.percentAdjustment, this.discountName, this.discountDescription, this.discountType, this._rewardCouponId, this.sublines, this.replacementAmount, this.couponCode, this.isAutoCoupon, this.sourceIndicator, this.extendedAmountBeforeAdjustment, this.singleUseCoupon, this.presentation, this.aggregationId, this.isEmployeeDiscount, this.campaign);
123
123
  }
124
124
  }
125
125
  exports.FeeLinePromotionDecorator = FeeLinePromotionDecorator;
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.42.1",
3
+ "version": "1.43.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",