cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
254 lines (218 loc) • 12.8 kB
JavaScript
/**
* CyberSource Merged Spec
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
*
* OpenAPI spec version: 0.0.1
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.4.38
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Ptsv2paymentsTravelInformationTransitAirlineLegs = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The Ptsv2paymentsTravelInformationTransitAirlineLegs model module.
* @module model/Ptsv2paymentsTravelInformationTransitAirlineLegs
* @version 0.0.1
*/
/**
* Constructs a new <code>Ptsv2paymentsTravelInformationTransitAirlineLegs</code>.
* @alias module:model/Ptsv2paymentsTravelInformationTransitAirlineLegs
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Ptsv2paymentsTravelInformationTransitAirlineLegs</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Ptsv2paymentsTravelInformationTransitAirlineLegs} obj Optional instance to populate.
* @return {module:model/Ptsv2paymentsTravelInformationTransitAirlineLegs} The populated <code>Ptsv2paymentsTravelInformationTransitAirlineLegs</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('carrierCode')) {
obj['carrierCode'] = ApiClient.convertToType(data['carrierCode'], 'String');
}
if (data.hasOwnProperty('flightNumber')) {
obj['flightNumber'] = ApiClient.convertToType(data['flightNumber'], 'String');
}
if (data.hasOwnProperty('originatingAirportCode')) {
obj['originatingAirportCode'] = ApiClient.convertToType(data['originatingAirportCode'], 'String');
}
if (data.hasOwnProperty('class')) {
obj['class'] = ApiClient.convertToType(data['class'], 'String');
}
if (data.hasOwnProperty('stopoverIndicator')) {
obj['stopoverIndicator'] = ApiClient.convertToType(data['stopoverIndicator'], 'Number');
}
if (data.hasOwnProperty('departureDate')) {
obj['departureDate'] = ApiClient.convertToType(data['departureDate'], 'Number');
}
if (data.hasOwnProperty('destinationAirportCode')) {
obj['destinationAirportCode'] = ApiClient.convertToType(data['destinationAirportCode'], 'String');
}
if (data.hasOwnProperty('fareBasis')) {
obj['fareBasis'] = ApiClient.convertToType(data['fareBasis'], 'String');
}
if (data.hasOwnProperty('departTaxAmount')) {
obj['departTaxAmount'] = ApiClient.convertToType(data['departTaxAmount'], 'String');
}
if (data.hasOwnProperty('conjunctionTicket')) {
obj['conjunctionTicket'] = ApiClient.convertToType(data['conjunctionTicket'], 'String');
}
if (data.hasOwnProperty('exchangeTicketNumber')) {
obj['exchangeTicketNumber'] = ApiClient.convertToType(data['exchangeTicketNumber'], 'String');
}
if (data.hasOwnProperty('couponNumber')) {
obj['couponNumber'] = ApiClient.convertToType(data['couponNumber'], 'String');
}
if (data.hasOwnProperty('departureTime')) {
obj['departureTime'] = ApiClient.convertToType(data['departureTime'], 'Number');
}
if (data.hasOwnProperty('departureTimeMeridian')) {
obj['departureTimeMeridian'] = ApiClient.convertToType(data['departureTimeMeridian'], 'String');
}
if (data.hasOwnProperty('arrivalTime')) {
obj['arrivalTime'] = ApiClient.convertToType(data['arrivalTime'], 'Number');
}
if (data.hasOwnProperty('arrivalTimeMeridian')) {
obj['arrivalTimeMeridian'] = ApiClient.convertToType(data['arrivalTimeMeridian'], 'String');
}
if (data.hasOwnProperty('endorsementsRestrictions')) {
obj['endorsementsRestrictions'] = ApiClient.convertToType(data['endorsementsRestrictions'], 'String');
}
if (data.hasOwnProperty('totalFareAmount')) {
obj['totalFareAmount'] = ApiClient.convertToType(data['totalFareAmount'], 'String');
}
if (data.hasOwnProperty('feeAmount')) {
obj['feeAmount'] = ApiClient.convertToType(data['feeAmount'], 'String');
}
if (data.hasOwnProperty('taxAmount')) {
obj['taxAmount'] = ApiClient.convertToType(data['taxAmount'], 'String');
}
}
return obj;
}
/**
* IATA code for the carrier for this leg of the trip. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {String} carrierCode
*/
exports.prototype['carrierCode'] = undefined;
/**
* Flight number for this leg of the trip. Restrictions are limitations for the ticket based on the type of fare, such as a nonrefundable ticket or a 3-day minimum stay. Format: English characters only. Optional request field for travel legs.
* @member {String} flightNumber
*/
exports.prototype['flightNumber'] = undefined;
/**
* IATA code for the originating airport for this leg of the trip. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {String} originatingAirportCode
*/
exports.prototype['originatingAirportCode'] = undefined;
/**
* IATA code for the class of service for this leg of the trip. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {String} class
*/
exports.prototype['class'] = undefined;
/**
* Code that indicates whether a stopover is allowed on this leg of the trip. Possible values: - `O` (capital letter \"O\") (default): Stopover allowed - `X` (capital letter \"X\"): Stopover not allowed Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {Number} stopoverIndicator
*/
exports.prototype['stopoverIndicator'] = undefined;
/**
* Departure date for the first leg of the trip. Format: `YYYYMMDD`. Format: English characters only. Optional request field for travel legs.
* @member {Number} departureDate
*/
exports.prototype['departureDate'] = undefined;
/**
* IATA code for the destination airport for this leg of the trip. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {String} destinationAirportCode
*/
exports.prototype['destinationAirportCode'] = undefined;
/**
* Code for the fare basis for this leg of the trip. The fare basis is assigned by the carriers and indicates a particular ticket type, such as business class or discounted/nonrefundable. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Format: English characters only. Optional request field for travel legs.auto_rental_regular_mileage_cost
* @member {String} fareBasis
*/
exports.prototype['fareBasis'] = undefined;
/**
* Amount of departure tax for this leg of the trip.
* @member {String} departTaxAmount
*/
exports.prototype['departTaxAmount'] = undefined;
/**
* Ticket that contains additional coupons for this leg of the trip on an itinerary that has more than four segments. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {String} conjunctionTicket
*/
exports.prototype['conjunctionTicket'] = undefined;
/**
* New ticket number that is issued when the ticket is exchanged for this leg of the trip. Restrictions are limitations for the ticket based on the type of fare, such as a nonrefundable ticket or a 3-day minimum stay. Format: English characters only. Optional request field for travel legs.
* @member {String} exchangeTicketNumber
*/
exports.prototype['exchangeTicketNumber'] = undefined;
/**
* Coupon number. Each leg on the ticket requires a separate coupon, and each coupon is identified by the coupon number. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {String} couponNumber
*/
exports.prototype['couponNumber'] = undefined;
/**
* Time of departure for this leg of the trip. The format is military time and HHMM: If not all zeros, then the hours must be `00-23` and the minutes must be `00-59`. Format: English characters only. Optional request field for travel legs.
* @member {Number} departureTime
*/
exports.prototype['departureTime'] = undefined;
/**
* AM or PM for the departure time. Possible values: - A: 12:00 midnight to 11:59 a.m. - P: 12:00 noon to 11:59 p.m Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {String} departureTimeMeridian
*/
exports.prototype['departureTimeMeridian'] = undefined;
/**
* Time of arrival for this leg of the trip. The format is military time and HHMM: If not all zeros, then the hours must be `00-23` and the minutes must be `00-59` Format: English characters only. Optional request field for travel legs.
* @member {Number} arrivalTime
*/
exports.prototype['arrivalTime'] = undefined;
/**
* AM or PM for the arrival time for this leg of the trip. Possible values: - `A`: 12:00 midnight to 11:59 a.m. - `P`: 12:00 noon to 11:59 p.m. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.
* @member {String} arrivalTimeMeridian
*/
exports.prototype['arrivalTimeMeridian'] = undefined;
/**
* Notes or notations about endorsements and restrictions for this leg of the trip. Endorsements can be notations added by the travel agency, including mandatory government-required notations such as value added tax. Restrictions are limitations for the ticket based on the type of fare, such as a nonrefundable ticket or a 3-day minimum stay. Format: English characters only. Optional request field for travel legs.
* @member {String} endorsementsRestrictions
*/
exports.prototype['endorsementsRestrictions'] = undefined;
/**
* Total fare for this leg of the trip. Format: English characters only. Optional request field for travel legs.
* @member {String} totalFareAmount
*/
exports.prototype['totalFareAmount'] = undefined;
/**
* Fee for this leg of the trip, such as an airport fee or country fee. Format: English characters only. Optional request field for travel legs.
* @member {String} feeAmount
*/
exports.prototype['feeAmount'] = undefined;
/**
* Tax for this leg of the trip. Format: English characters only. Optional request field for travel legs.
* @member {String} taxAmount
*/
exports.prototype['taxAmount'] = undefined;
return exports;
}));