new Plugin(args)
For a comprehensive list of methods visit the Plugin Development page.
Parameters:
Name | Type | Description |
---|---|---|
args |
Object
|
New / Overwriting attributes for the Plugin. |
Members
Methods
(async) validateToken(args) → {Boolean}
Check the validity of an integration token.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
- Type:
-
Boolean
- The token validity True/False
tokenTemplate()
Returns the the token template of a plugin. Properties are dynamic since every attribute should correspond to a token key, every attribute should contain at least the type (ie text) a regExp and a description. The regExp property gets decomposed into both source and flags as strings.
(async) getProfile(args) → {Profile}
Returns the profile details of the account.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
(async) updateProfile(args) → {boolean}
Updates profile information
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
- Type:
-
boolean
- True/False success status.
(async) createLocation(args) → {Object|string}
Create a Location
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
-
- Type:
-
Object
retVal - An object containing return values.
-
- Type:
-
string
retVal.locationId - The new location unique identifier.
(async) updateLocation(args) → {boolean}
Update a Location
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
- Type:
-
boolean
- True/False success status.
(async) getProducts(args) → {Object|Array.Product}
Get the list of products for a given location
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
-
- Type:
-
Object
retVal - An object containing return values.
-
- Type:
-
Array.Product
retVal.products - An array of matching products.
(async) createProduct(args) → {Object|string}
Create a Product
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
-
- Type:
-
Object
retVal - An object containing return values.
-
- Type:
-
string
retVal.locationId - The new location unique identifier.
(async) updateProduct(args) → {boolean}
Update a Product
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
- Type:
-
boolean
- True/False success status.
(async) searchBooking(args) → {object|Array.<Booking>}
Search for bookings with a criteria.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Booking search arguments.
|
Returns:
-
- Type:
-
object
retVal - the return object.
-
- Type:
-
Array.<Booking>
retVal.bookings - Array of Bookings matching the criteria.
(async) searchProducts(args) → {object|Array.<Hotel>|Array.<Product>}
Search for bookable products
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Product search arguments.
|
Returns:
-
- Type:
-
object
retVal - the return object.
-
- Type:
-
Array.<Hotel>
retVal.hotels - Array of bookable hotels.
-
- Type:
-
Array.<Product>
retVal.products - Array of bookable activities.
(async) searchAvailability(args) → {object|Array.<Availability>}
Search for availability of products winthin dates of travel.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
-
- Type:
-
object
retVal - the return object
-
- Type:
-
Array.<Availability>
retVal.availability - Array of availability objects
(async) availabilityCalendar(args) → {object|Array.<Availability>}
Retrieve an availability calendar over a date range
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability search arguments.
|
Returns:
-
- Type:
-
object
retVal - the return object
-
- Type:
-
Array.<Availability>
retVal.availability - Array of availability objects
(async) searchQuote(args) → {object|Quote}
Quote an availability.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Availability quote arguments.
|
Returns:
-
- Type:
-
object
retVal - the return object.
-
- Type:
-
Quote
retVal.quote - A Quote Object instance.
(async) createBooking(args) → {object|Booking}
Create a Booking
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Booking arguments.
|
Returns:
-
- Type:
-
object
retVal - the return object.
-
- Type:
-
Booking
retVal.booking - A Booking object.
(async) searchProductsForItinerary(args) → {object|Array.<ItineraryProduct>}
Search for bookable products
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
|
Returns:
-
- Type:
-
object
retVal - the return object.
-
- Type:
-
Array.<ItineraryProduct>
retVal.products - An array of products spec objects.
(async) searchAvailabilityForItinerary(args) → {SearchAvailabilityForItineraryResponse}
Search for product availability
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
|
Returns:
(async) addServiceToItinerary(args) → {AddServiceToItineraryResponse}
Create an itinerary
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
|
Returns:
(async) getCreateItineraryFields(args) → {object|Array.<CreateItineraryCustomField>}
Some additional fields available for the addServiceToItinerary call
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
args |
Object
|
|
Returns:
-
- Type:
-
object
retVal - the return object.
-
- Type:
-
Array.<CreateItineraryCustomField>
retVal.customFields - An array of custom fields spec objects.
(async) searchItineraries(args) → {object|Array.<ItineraryBooking>}
Search for itineraries
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
|
Returns:
-
- Type:
-
object
retVal - the return object.
-
- Type:
-
Array.<ItineraryBooking>
retVal.bookings - An array of itinerary bookings matching search criteria.
(async) queryAllotment(args) → {object|Array.<Allotment>}
Query Allotment
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
Allotment query arguments.
|
Returns:
-
- Type:
-
object
retVal - the return object.
-
- Type:
-
Array.<Allotment>
retVal.allotment - An array of allotment spec objects.