@vendit-dev/thirdparty-adapters 0.7.27 → 0.7.29

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.
@@ -262,15 +262,22 @@ var makePaymentInfo = function (_a) {
262
262
  return paymentInfo;
263
263
  };
264
264
  var refineReservationData = function (infoTravelXML) {
265
- var _a, _b;
266
- var _c = infoTravelXML.AllotmentBookingReport, TransactionType = _c.TransactionType, RisaplsInformation = _c.RisaplsInformation, BasicInformation = _c.BasicInformation, BasicRateInformation = _c.BasicRateInformation, SalesOfficeInformation = _c.SalesOfficeInformation;
267
- var _d = TransactionType.DataID.split('-'), ID = _d[0], REVISION = _d[1];
265
+ var _a;
266
+ var _b = infoTravelXML.AllotmentBookingReport, TransactionType = _b.TransactionType, RisaplsInformation = _b.RisaplsInformation, BasicInformation = _b.BasicInformation, BasicRateInformation = _b.BasicRateInformation, SalesOfficeInformation = _b.SalesOfficeInformation;
267
+ var _c = TransactionType.DataID.split('-'), ID = _c[0], REVISION = _c[1];
268
268
  var isGroupReservation = BasicInformation.TotalRoomCount > 1;
269
269
  var RisaplsCommonInformation = RisaplsInformation.RisaplsCommonInformation, AgentNativeInformation = RisaplsInformation.AgentNativeInformation;
270
270
  var RoomAndRoomRateInformation = RisaplsCommonInformation.RoomAndRoomRateInformation, Allotment = RisaplsCommonInformation.Allotment, Member = RisaplsCommonInformation.Member, OtherInfo = RisaplsCommonInformation.OtherInfo, Basic = RisaplsCommonInformation.Basic, BasicRate = RisaplsCommonInformation.BasicRate, Option = RisaplsCommonInformation.Option;
271
- var isFullyPaid = !!((_a = AgentNativeInformation === null || AgentNativeInformation === void 0 ? void 0 : AgentNativeInformation.Extendmytrip) === null || _a === void 0 ? void 0 : _a.SettlementDiv)
272
- && !((_b = AgentNativeInformation === null || AgentNativeInformation === void 0 ? void 0 : AgentNativeInformation.Extend) === null || _b === void 0 ? void 0 : _b.AmountClaimed)
273
- && (BasicRateInformation === null || BasicRateInformation === void 0 ? void 0 : BasicRateInformation.Payment) !== 'Hotel Collect';
271
+ var settlementDiv = (_a = AgentNativeInformation === null || AgentNativeInformation === void 0 ? void 0 : AgentNativeInformation.Extendmytrip) === null || _a === void 0 ? void 0 : _a.SettlementDiv;
272
+ /**
273
+ * settlementDiv가 없는 경우에는 지불된 것으로 간주
274
+ * settlementDiv가 있는 경우, 현장결제, 지정없음, 부분결제가 아닌 경우에는 지불된 것으로 간주
275
+ */
276
+ var isFullyPaid = BasicRateInformation.Payment !== 'Hotel Collect' &&
277
+ (typeof settlementDiv === 'undefined' ||
278
+ (settlementDiv !== tl_lincoln_types_1.SettlementDiv.ON_SITE_PAYMENT &&
279
+ settlementDiv !== tl_lincoln_types_1.SettlementDiv.NONE &&
280
+ settlementDiv !== tl_lincoln_types_1.SettlementDiv.PARTIAL_SETTLEMENT));
274
281
  var roomAndRoomRateInformations = (0, tl_lincoln_types_1.makeArray)(RoomAndRoomRateInformation);
275
282
  var groupedRooms = groupByRoomWithTotalCounts(roomAndRoomRateInformations, BasicInformation.TotalRoomCount);
276
283
  var status = getReservationStatusFromDataClassification(TransactionType.DataClassification);
@@ -350,9 +357,9 @@ var refineReservationData = function (infoTravelXML) {
350
357
  / BasicInformation.TotalRoomCount
351
358
  || ((_b = datas[0].RoomInformation) === null || _b === void 0 ? void 0 : _b.PerRoomPaxCount)
352
359
  : (_d = (_c = roomsSortedByDate[0]) === null || _c === void 0 ? void 0 : _c.RoomInformation) === null || _d === void 0 ? void 0 : _d.PerRoomPaxCount,
353
- guestName: "".concat(BasicInformation.GuestOrGroupNameSingleByte
354
- || BasicInformation.GuestOrGroupNameKanjiName
355
- || 'Anonymous').concat(isGroupReservation ? " ".concat(index + 1) : ''),
360
+ guestName: "".concat(BasicInformation.GuestOrGroupNameKanjiName ||
361
+ BasicInformation.GuestOrGroupNameSingleByte ||
362
+ 'Anonymous').concat(isGroupReservation ? " ".concat(index + 1) : ''),
356
363
  externalPlatformCode: SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCode,
357
364
  externalPlatformName: (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName)
358
365
  || (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeName),
@@ -151,6 +151,9 @@ var TlLincoln = /** @class */ (function () {
151
151
  }
152
152
  _b = result['S:Envelope']['S:Body']['ns2:executeResponse'].return, rmTypeList = _b.rmTypeList, netRmTypeGroupList = _b.netRmTypeGroupList, netAgtRmTypeList = _b.netAgtRmTypeList;
153
153
  aggregateRoomTypeGroups = function (rmTypeCode) {
154
+ if (!netRmTypeGroupList) {
155
+ return [];
156
+ }
154
157
  var groups = (0, tl_lincoln_types_1.isArray)(netRmTypeGroupList)
155
158
  ? netRmTypeGroupList.filter(function (group) { return group.rmTypeCode === rmTypeCode; })
156
159
  : [netRmTypeGroupList];
@@ -98,7 +98,7 @@ export interface Extendmytrip {
98
98
  Reference?: string;
99
99
  TotalMaleCount?: number;
100
100
  TotalFemaleCount?: number;
101
- SettlementDiv?: number;
101
+ SettlementDiv?: SettlementDiv;
102
102
  CancellationCharge?: string;
103
103
  CancellationNotice?: string;
104
104
  }
@@ -580,4 +580,22 @@ export interface TlLincolnCredentials {
580
580
  pmsUserId: string;
581
581
  pmsPassword: string;
582
582
  }
583
+ /**
584
+ * 「0」:지정없음
585
+ * 「1」:법인이용
586
+ * 「2」:카드결제완료
587
+ * 「3」:현장결제
588
+ * 「4」:여행사
589
+ * 「5」:일부 정산
590
+ * 「6」:에이전트 정산
591
+ * */
592
+ export declare enum SettlementDiv {
593
+ NONE = 0,
594
+ CORPORATE = 1,
595
+ CARD_PAYMENT_COMPLETED = 2,
596
+ ON_SITE_PAYMENT = 3,
597
+ TRAVEL_AGENCY = 4,
598
+ PARTIAL_SETTLEMENT = 5,
599
+ AGENT_SETTLEMENT = 6
600
+ }
583
601
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdjustmentSaleStatus = exports.AdjustmentProcedureCode = exports.AgtTypeCode = exports.makeArray = exports.isArray = void 0;
3
+ exports.SettlementDiv = exports.AdjustmentSaleStatus = exports.AdjustmentProcedureCode = exports.AgtTypeCode = exports.makeArray = exports.isArray = void 0;
4
4
  function isArray(value) {
5
5
  return Array.isArray(value);
6
6
  }
@@ -30,3 +30,22 @@ var AdjustmentSaleStatus;
30
30
  AdjustmentSaleStatus[AdjustmentSaleStatus["STOP"] = 2] = "STOP";
31
31
  AdjustmentSaleStatus[AdjustmentSaleStatus["NO_CHANGE"] = 3] = "NO_CHANGE";
32
32
  })(AdjustmentSaleStatus = exports.AdjustmentSaleStatus || (exports.AdjustmentSaleStatus = {}));
33
+ /**
34
+ * 「0」:지정없음
35
+ * 「1」:법인이용
36
+ * 「2」:카드결제완료
37
+ * 「3」:현장결제
38
+ * 「4」:여행사
39
+ * 「5」:일부 정산
40
+ * 「6」:에이전트 정산
41
+ * */
42
+ var SettlementDiv;
43
+ (function (SettlementDiv) {
44
+ SettlementDiv[SettlementDiv["NONE"] = 0] = "NONE";
45
+ SettlementDiv[SettlementDiv["CORPORATE"] = 1] = "CORPORATE";
46
+ SettlementDiv[SettlementDiv["CARD_PAYMENT_COMPLETED"] = 2] = "CARD_PAYMENT_COMPLETED";
47
+ SettlementDiv[SettlementDiv["ON_SITE_PAYMENT"] = 3] = "ON_SITE_PAYMENT";
48
+ SettlementDiv[SettlementDiv["TRAVEL_AGENCY"] = 4] = "TRAVEL_AGENCY";
49
+ SettlementDiv[SettlementDiv["PARTIAL_SETTLEMENT"] = 5] = "PARTIAL_SETTLEMENT";
50
+ SettlementDiv[SettlementDiv["AGENT_SETTLEMENT"] = 6] = "AGENT_SETTLEMENT";
51
+ })(SettlementDiv = exports.SettlementDiv || (exports.SettlementDiv = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.7.27",
3
+ "version": "0.7.29",
4
4
  "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {