References
Class Summary
Static Public Class Summary | ||
public |
Flight booking date Details |
|
public |
Date of birth Details - gives the DOB for the passenger |
|
public |
Flight Details - gives the details of the flight |
|
public |
A leg is the smallest unit of travel, in the case of a flight a takeoff immediately followed by a landing at two set points on a particular carrier with a particular flight number. |
|
public |
Passenger count - stores the count of passengers, categorizing them under the head of Infant, Child, adult or senior citizen. |
|
public |
Person Details - saves the basic details about the passenger. |
|
public |
Purchase Data Class - comprising of the Pricing ID from Pricing API and Trip Data(having trip ID and userInfo) from TripData Class, returning us the Purchase object |
|
public |
A segment is one or more consecutive legs on the same flight.The segment(s) constituting the slice. |
|
public |
A slice represents a traveller's intent, the portion of a low-fare search corresponding to a traveler's request to get between two points. |
|
public |
Trip Class - comprises of the Flight duration and Array of Slice object |
|
public |
Trip Data Class - comprising of the Trip ID from Pricing API and Person Details from PersonDetails Class, returns us the Trip data for Purchase object |
Function Summary
Static Public Function Summary | ||
public |
parseRequest(data: object): String parseRequest() parses the public API's request. It stringifies the object data. |
|
public |
parseResponse(responseText: String, request: XMLHttpRequest): Object({json, error}) parseResponse() is for parsing the response received from the request. |
|
public |
request(method: String, path: String, data: object, accessToken: String, headerChange: String): Promise request() Executes the public API's request. With the Data and URL it calls for the sendAndFollow method. |
|
public |
sendAndFollow(method: String, url: String, data: Object, accessToken: String, headerChange: String): Promise sendAndFollow() executes the public API's request. With the params passed from request(), it hits the API to get a response. It parses the object data with the help of parseRequest() and parseResponse() data. |
|
public |
sendRequest(method: String, url: String, requestData: String, accessToken: String, headerChange: String): Promise sendRequest() executes the public API's request and returns the response. |
Typedef Summary
Static Public Typedef Summary | ||
public |
XMLHttpRequest is a global object with a Fake XMLHttpRequest function ( useFakeXMLHttpRequest() ) to run the SDK test cases. |
|
public |
dataObjects is a global object, which returns a new instance of each class. |
|
public |
|
|
public |
dataObjects.date returns a new instance of Date class. |
|
public |
dataObjects.dateOfBirth returns a new instance of DateOfBirth class. |
|
public |
dataObjects.flight returns a new instance of Flight class. |
|
public |
dataObjects.leg returns a new instance of Leg class. |
|
public |
dataObjects.passengerCounts returns a new instance of PassengerCount class. |
|
public |
dataObjects.personInfo returns a new instance of PersonInfo class. |
|
public |
dataObjects.purchaseData returns a new instance of PurchaseData class. |
|
public |
dataObjects.segment returns a new instance of Segment class. |
|
public |
dataObjects.slice returns a new instance of Slice class. |
|
public |
dataObjects.trip returns a new instance of Trip class. |
|
public |
dataObjects.tripData returns a new instance of TripData class. |
|
public |
fBird is another global object including various calls like GET and POST calls. |
|
public |
fBird.get takes the auth Token and does the authentication for the user. |
|
public |
fBird.post returns with a request call on the pricing endpoint. |