@felloh-org/lambda-wrapper 1.6.8 → 1.6.10

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/dist/index.js CHANGED
@@ -495,6 +495,12 @@ Object.defineProperty(exports, "TransactionTypeEntity", {
495
495
  return _transactionType.default;
496
496
  }
497
497
  });
498
+ Object.defineProperty(exports, "TransactionWebhookModel", {
499
+ enumerable: true,
500
+ get: function () {
501
+ return _transaction7.default;
502
+ }
503
+ });
498
504
  Object.defineProperty(exports, "USER_STATUS", {
499
505
  enumerable: true,
500
506
  get: function () {
@@ -718,6 +724,8 @@ var _response = _interopRequireWildcard(require("./model/response"));
718
724
 
719
725
  var _status = _interopRequireWildcard(require("./model/status"));
720
726
 
727
+ var _transaction7 = _interopRequireDefault(require("./model/webhook/transaction"));
728
+
721
729
  var _http = _interopRequireDefault(require("./service/http"));
722
730
 
723
731
  var _logger = _interopRequireDefault(require("./service/logger"));
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ class TransactionWebhook {
9
+ constructor(transaction) {
10
+ this.transaction = transaction;
11
+ }
12
+
13
+ get() {
14
+ var _this$transaction, _this$transaction2, _this$transaction3, _this$transaction3$bo, _this$transaction4, _this$transaction4$bo, _this$transaction5, _this$transaction5$pa, _this$transaction6, _this$transaction6$or, _this$transaction7, _this$transaction8, _this$transaction8$st, _this$transaction9, _this$transaction10;
15
+
16
+ return {
17
+ transaction: {
18
+ id: (_this$transaction = this.transaction) === null || _this$transaction === void 0 ? void 0 : _this$transaction.id
19
+ },
20
+ amount: (_this$transaction2 = this.transaction) === null || _this$transaction2 === void 0 ? void 0 : _this$transaction2.amount,
21
+ booking: {
22
+ id: (_this$transaction3 = this.transaction) === null || _this$transaction3 === void 0 ? void 0 : (_this$transaction3$bo = _this$transaction3.booking) === null || _this$transaction3$bo === void 0 ? void 0 : _this$transaction3$bo.id,
23
+ booking_reference: (_this$transaction4 = this.transaction) === null || _this$transaction4 === void 0 ? void 0 : (_this$transaction4$bo = _this$transaction4.booking) === null || _this$transaction4$bo === void 0 ? void 0 : _this$transaction4$bo.booking_reference
24
+ },
25
+ payment_link: {
26
+ id: (_this$transaction5 = this.transaction) === null || _this$transaction5 === void 0 ? void 0 : (_this$transaction5$pa = _this$transaction5.payment_link) === null || _this$transaction5$pa === void 0 ? void 0 : _this$transaction5$pa.id
27
+ },
28
+ provider: {
29
+ name: (_this$transaction6 = this.transaction) === null || _this$transaction6 === void 0 ? void 0 : (_this$transaction6$or = _this$transaction6.organisation_payment_provider) === null || _this$transaction6$or === void 0 ? void 0 : _this$transaction6$or.name,
30
+ reference: (_this$transaction7 = this.transaction) === null || _this$transaction7 === void 0 ? void 0 : _this$transaction7.provider_reference
31
+ },
32
+ status: (_this$transaction8 = this.transaction) === null || _this$transaction8 === void 0 ? void 0 : (_this$transaction8$st = _this$transaction8.status) === null || _this$transaction8$st === void 0 ? void 0 : _this$transaction8$st.id,
33
+ completed_at: (_this$transaction9 = this.transaction) === null || _this$transaction9 === void 0 ? void 0 : _this$transaction9.completed_at,
34
+ currency: (_this$transaction10 = this.transaction) === null || _this$transaction10 === void 0 ? void 0 : _this$transaction10.currency
35
+ };
36
+ }
37
+
38
+ }
39
+
40
+ exports.default = TransactionWebhook;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {