@felloh-org/lambda-wrapper 1.11.30 → 1.11.31
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.
|
@@ -95,21 +95,26 @@ let Refund = (_dec = (0, _typeorm.Entity)({
|
|
|
95
95
|
_initializerDefineProperty(this, "deleted_at", _descriptor12, this);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
getPublicData() {
|
|
98
|
+
getPublicData(showAuthorisationCode = false) {
|
|
99
99
|
var _this$status, _this$requesting_user, _this$authorised_user, _this$organisation, _this$transaction;
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
const response = {
|
|
102
102
|
amount: this.amount,
|
|
103
103
|
status: this.status && typeof ((_this$status = this.status) === null || _this$status === void 0 ? void 0 : _this$status.getPublicData) === 'function' ? this.status.getPublicData() : null,
|
|
104
104
|
requesting_user: this.requesting_user && typeof ((_this$requesting_user = this.requesting_user) === null || _this$requesting_user === void 0 ? void 0 : _this$requesting_user.getPublicData) === 'function' ? this.requesting_user.getPublicCompactData() : null,
|
|
105
105
|
authorised_user: this.authorised_user && typeof ((_this$authorised_user = this.authorised_user) === null || _this$authorised_user === void 0 ? void 0 : _this$authorised_user.getPublicData) === 'function' ? this.authorised_user.getPublicCompactData() : null,
|
|
106
|
-
authorisation_code: this.authorisation_code,
|
|
107
106
|
authorised_at: this.authorised_at,
|
|
108
107
|
organisation: this.organisation && typeof ((_this$organisation = this.organisation) === null || _this$organisation === void 0 ? void 0 : _this$organisation.getPublicCompactData) === 'function' ? this.organisation.getPublicCompactData() : null,
|
|
109
108
|
completed_at: this.completed_at,
|
|
110
109
|
transaction: this.transaction && typeof ((_this$transaction = this.transaction) === null || _this$transaction === void 0 ? void 0 : _this$transaction.getPublicData) === 'function' ? this.transaction.getPublicData() : null,
|
|
111
110
|
created_at: this.created_at
|
|
112
111
|
};
|
|
112
|
+
|
|
113
|
+
if (showAuthorisationCode === true) {
|
|
114
|
+
response.authorisation_code = this.authorisation_code;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return response;
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
|