@pmcretail/mapper-library 0.0.51 → 0.0.52

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.
@@ -4334,14 +4334,16 @@
4334
4334
  return this;
4335
4335
  };
4336
4336
  WebReturnMagento2RestV1MapperBuilderClass.prototype.refundRequest = function () {
4337
- var _a;
4338
4337
  appLogger_service.AppLoggerService.logDebug(this.className, "refundRequest", "Mapping started...");
4339
- this.webReturnObject.refundRequest = ((_a = this.orderDetails.items) === null || _a === void 0 ? void 0 : _a.filter(function (product) { return (product === null || product === void 0 ? void 0 : product.base_price) && (product.qty_refunded || 0) > 0; }).map(function (product, index) { return ({
4338
+ this.webReturnObject.refundRequest = (this.orderDetails.items || [])
4339
+ .filter(function (product) { return product === null || product === void 0 ? void 0 : product.base_price; })
4340
+ .map(function (product, index) { return ({
4340
4341
  itemLineId: index + 1,
4341
4342
  refundedQuantity: product.qty_refunded || 0,
4342
4343
  refundWithPromotion: true,
4343
4344
  quantity: product.qty_ordered || 0
4344
- }); })) || [];
4345
+ }); })
4346
+ .filter(function (product) { return product.refundedQuantity !== 0; });
4345
4347
  appLogger_service.AppLoggerService.logDebug(this.className, "refundRequest", "Mapped " + this.webReturnObject.refundRequest.length + " refund items.");
4346
4348
  appLogger_service.AppLoggerService.logDebug(this.className, "refundRequest", "Mapping ended...");
4347
4349
  return this;