-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: added ticketing request to AirServiceInternal with parser.
- Loading branch information
Showing
4 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var proxy = require('proxyquire'); | ||
var sinon = require('sinon'); | ||
var assert = require('assert'); | ||
|
||
var Parser = require('../../lib/Air/AirParser'); | ||
var ticketingJson = require('../FakeResponses/Air/ticketing.rsp.json'); | ||
|
||
describe('#AirParser', function () { | ||
describe('AIR_TICKET_REQUEST()', function () { | ||
it('should test air ticket response parser.', function () { | ||
var parsedResponse = Parser.AIR_TICKET_REQUEST(ticketingJson); | ||
assert(parsedResponse === true, 'Incorrect parsing of ticketing response.'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"air:AirTicketingRsp":[{"$":{"TraceId":"","TransactionId":"FD9280E70A07425CC17136550D6BCEBD","ResponseTime":"1366","xmlns:air":"http://www.travelport.com/schema/air_v33_0","xmlns:common_v33_0":"http://www.travelport.com/schema/common_v33_0"},"common_v33_0:ResponseMessage":[{"_":"PNR A3TGVW Fare 1 - ELECTRONIC TKT GENERATED TTL FARE EUR 28.62 SUPPORTING DOCUMENTS GENERATED MIR GENERATED - TTL FARE EUR 28.62 ------------------------------------- ITINERARY/INVOICE GENERATED","$":{"Code":"0","Type":"Info","ProviderCode":"1G"}},{"_":"OK:Ticket issued","$":{"Code":"0","Type":"Info","ProviderCode":"1G"}}],"air:ETR":[{"$":{"Key":"p5e20A9hSi2IsV0soVpafQ==","BasePrice":"USD10.00","Taxes":"EUR19.62","EquivalentBasePrice":"EUR9.00","Refundable":"false","Exchangeable":"false","IssuedDate":"2016-07-18T00:00:00.000+03:00","ProviderCode":"1G","ProviderLocatorCode":"A3TGVW","IATANumber":"67320772","PseudoCityCode":"36D5","PlatingCarrier":"PS","ElStat":"A"},"air:AirReservationLocatorCode":["P3HRG7"],"common_v33_0:AgencyInfo":[{"common_v33_0:AgentAction":[{"$":{"ActionType":"Created","AgentCode":"UAPI3210545979-0A952404","BranchCode":"P2660143","AgencyCode":"S1828245","EventTime":"2016-07-18T00:00:00.000+03:00"}}]}],"common_v33_0:BookingTraveler":[{"$":{"Key":"twrE9aJPQCGAcvl5OoLeUA=="},"common_v33_0:BookingTravelerName":[{"$":{"First":"PHILIPMR","Last":"VOLOV"}}],"common_v33_0:SSR":[{"$":{"Key":"bNS0mDItQFCKhaqXE7ZSrg==","SegmentRef":"d+tvaOHHQkizGd9s0FzDsQ==","Status":"HK","Type":"TKNE","FreeText":"5665267479857C1","Carrier":"PS","ProviderReservationInfoRef":"zpUWcG+5TXCBo7Kr6keVJA==","ElStat":"A"}}]}],"common_v33_0:FormOfPayment":[{"$":{"Key":"oZHmtQtkRECiI6CACn6Gyg==","Type":"Cash","Reusable":"false","ProfileKey":"3DCx0/RTQba0fmzwGx3YDQ=="}}],"common_v33_0:Payment":[{"$":{"Key":"7bcZJR4rQP+53jnf4RDXkQ==","Type":"Itinerary","Amount":"EUR28.62","FormOfPaymentRef":"oZHmtQtkRECiI6CACn6Gyg=="}}],"common_v33_0:SupplierLocator":[{"$":{"SupplierCode":"PS","SupplierLocatorCode":"R21HC"}}],"air:FareCalc":["IEV PS LWO Q5.00 5.00 USD10.00END XT 2.52HF13.50YR"],"air:Ticket":[{"$":{"Key":"q3/flx2/RGykiZeFBd7Epg==","TicketNumber":"5665267479857","TicketStatus":"N","ElStat":"A"},"air:Coupon":[{"$":{"Key":"N+lxZ31LTvust/6W0J0mVA==","CouponNumber":"1","MarketingCarrier":"PS","MarketingFlightNumber":"35","Origin":"KBP","Destination":"LWO","DepartureTime":"2016-08-10T15:30:00.000+03:00","StopoverCode":"true","BookingClass":"B","FareBasis":"B01PROU1","NotValidBefore":"2016-08-10","NotValidAfter":"2016-08-10","Status":"O","SegmentGroup":"0","MarriageGroup":"0","ElStat":"A"}}]}],"air:AirPricingInfo":[{"$":{"Key":"jcGF2wxlTVqHVG+pKXZClQ==","TotalPrice":"EUR28.62","BasePrice":"USD10.00","ApproximateTotalPrice":"EUR28.62","ApproximateBasePrice":"EUR9.00","EquivalentBasePrice":"EUR9.00","Taxes":"EUR19.62","LatestTicketingTime":"2016-07-18T23:59:00.000+03:00","TrueLastDateToTicket":"2016-07-28T23:59:00.000+03:00","PricingMethod":"Guaranteed","ETicketability":"Yes","ProviderReservationInfoRef":"zpUWcG+5TXCBo7Kr6keVJA==","AirPricingInfoGroup":"1","Ticketed":"true","PricingType":"StoredFare","FareCalculationInd":"G"},"air:FareInfo":[{"$":{"Key":"7p5LVRLnRMqe6lXU3GI0UQ==","FareBasis":"B01PROU1","PassengerTypeCode":"ADT","Origin":"KBP","Destination":"LWO","EffectiveDate":"2016-07-18T00:00:00.000+03:00","NotValidBefore":"2016-08-10","NotValidAfter":"2016-08-10"},"common_v33_0:Endorsement":[{"$":{"Value":"NON END/NO REF/CHNG REST"}}],"air:BaggageAllowance":[{"air:NumberOfPieces":["1"]}]}],"air:BookingInfo":[{"$":{"BookingCode":"B","CabinClass":"Economy","FareInfoRef":"7p5LVRLnRMqe6lXU3GI0UQ=="}}],"air:TaxInfo":[{"$":{"Category":"UA","Amount":"EUR1.35","Key":"KJZQRoC2QAuDzKzkxSy52Q=="}},{"$":{"Category":"YK","Amount":"EUR2.25","Key":"M2vMg5pZRg+hPvF4X46wfw=="}},{"$":{"Category":"HF","Amount":"EUR2.52","Key":"RBDZBOCuSeW1pEaGhuvIhg=="}},{"$":{"Category":"YR","Amount":"EUR13.50","Key":"vV1KTFepT8qJ8859IGFUmQ=="}}],"air:FareCalc":["IEV PS LWO Q5.00 5.00B01PROU1 USD10.00END"],"air:PassengerType":[{"$":{"Code":"ADT","BookingTravelerRef":"twrE9aJPQCGAcvl5OoLeUA=="},"air:FareGuaranteeInfo":[{"$":{"GuaranteeType":"Guaranteed"}}]}],"common_v33_0:BookingTravelerRef":[{"$":{"Key":"twrE9aJPQCGAcvl5OoLeUA=="}}],"air:ChangePenalty":[{"air:Amount":["USD0.00"]}],"air:CancelPenalty":[{"air:Amount":["USD0.00"]}]}],"air:BaggageAllowances":[{"air:BaggageAllowanceInfo":[{"$":{"TravelerType":"ADT","Origin":"IEV","Destination":"LWO","Carrier":"PS"},"air:URLInfo":[{"air:URL":["MYTRIPANDMORE.COM/BAGGAGEDETAILSPS.BAGG"]}],"air:TextInfo":[{"air:Text":["1P","BAGGAGE DISCOUNTS MAY APPLY BASED ON FREQUENT FLYER STATUS/ ONLINE CHECKIN/FORM OF PAYMENT/MILITARY/ETC."]}],"air:BagDetails":[{"$":{"ApplicableBags":"1stChecked"},"air:BaggageRestriction":[{"air:TextInfo":[{"air:Text":["BAGGAGE CHARGES DATA NOT AVAILABLE"]}]}]},{"$":{"ApplicableBags":"2ndChecked"},"air:BaggageRestriction":[{"air:TextInfo":[{"air:Text":["BAGGAGE CHARGES DATA NOT AVAILABLE"]}]}]}]}],"air:CarryOnAllowanceInfo":[{"$":{"Origin":"IEV","Destination":"LWO","Carrier":"PS"},"air:TextInfo":[{"air:Text":["BAGGAGE ALLOWANCE DATA NOT AVAILABLE"]}]}]}]}]}]} |