UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

135 lines (112 loc) 6.19 kB
/** * 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', 'model/Riskv1decisionsTravelInformationLegs', 'model/Riskv1decisionsTravelInformationPassengers'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Riskv1decisionsTravelInformationLegs'), require('./Riskv1decisionsTravelInformationPassengers')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Riskv1decisionsTravelInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Riskv1decisionsTravelInformationLegs, root.CyberSource.Riskv1decisionsTravelInformationPassengers); } }(this, function(ApiClient, Riskv1decisionsTravelInformationLegs, Riskv1decisionsTravelInformationPassengers) { 'use strict'; /** * The Riskv1decisionsTravelInformation model module. * @module model/Riskv1decisionsTravelInformation * @version 0.0.1 */ /** * Constructs a new <code>Riskv1decisionsTravelInformation</code>. * @alias module:model/Riskv1decisionsTravelInformation * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Riskv1decisionsTravelInformation</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/Riskv1decisionsTravelInformation} obj Optional instance to populate. * @return {module:model/Riskv1decisionsTravelInformation} The populated <code>Riskv1decisionsTravelInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('actualFinalDestination')) { obj['actualFinalDestination'] = ApiClient.convertToType(data['actualFinalDestination'], 'String'); } if (data.hasOwnProperty('completeRoute')) { obj['completeRoute'] = ApiClient.convertToType(data['completeRoute'], 'String'); } if (data.hasOwnProperty('departureTime')) { obj['departureTime'] = ApiClient.convertToType(data['departureTime'], 'String'); } if (data.hasOwnProperty('journeyType')) { obj['journeyType'] = ApiClient.convertToType(data['journeyType'], 'String'); } if (data.hasOwnProperty('legs')) { obj['legs'] = ApiClient.convertToType(data['legs'], [Riskv1decisionsTravelInformationLegs]); } if (data.hasOwnProperty('numberOfPassengers')) { obj['numberOfPassengers'] = ApiClient.convertToType(data['numberOfPassengers'], 'Number'); } if (data.hasOwnProperty('passengers')) { obj['passengers'] = ApiClient.convertToType(data['passengers'], [Riskv1decisionsTravelInformationPassengers]); } } return obj; } /** * IATA Code for the actual final destination that the customer intends to travel to. It should be a destination on the completeRoute. * @member {String} actualFinalDestination */ exports.prototype['actualFinalDestination'] = undefined; /** * Concatenation of individual travel legs in the format ORIG1-DEST1[:ORIG2-DEST2...:ORIGn-DESTn], for example, SFO-JFK:JFK-LHR:LHR-CDG. For airport codes, see the IATA Airline and Airport Code Search. Note In your request, send either the complete route or the individual legs (_leg#_orig and _leg#_dest). If you send all the fields, the value of _complete_route takes precedence over that of the _leg# fields. * @member {String} completeRoute */ exports.prototype['completeRoute'] = undefined; /** * Departure date and time of the first leg of the trip. Use one of the following formats: - yyyy-MM-dd HH:mm z - yyyy-MM-dd hh:mm a z - yyyy-MM-dd hh:mma z HH = hour in 24-hour format hh = hour in 12-hour format a = am or pm (case insensitive) z = time zone of the departing flight, for example: If the airline is based in city A, but the flight departs from city B, z is the time zone of city B at the time of departure. Important For travel information, use GMT instead of UTC, or use the local time zone. Examples 2011-03-20 11:30 PM PDT 2011-03-20 11:30pm GMT 2011-03-20 11:30pm GMT-05:00 Eastern Standard Time: GMT-05:00 or EST Note When specifying an offset from GMT, the format must be exactly as specified in the example. Insert no spaces between the time zone and the offset. * @member {String} departureTime */ exports.prototype['departureTime'] = undefined; /** * Type of travel, for example one way or round trip. * @member {String} journeyType */ exports.prototype['journeyType'] = undefined; /** * @member {Array.<module:model/Riskv1decisionsTravelInformationLegs>} legs */ exports.prototype['legs'] = undefined; /** * Number of passengers for whom the ticket was issued. If you do not include this field in your request, CyberSource uses a default value of 1. Required for American Express SafeKey (U.S.) for travel-related requests. * @member {Number} numberOfPassengers */ exports.prototype['numberOfPassengers'] = undefined; /** * @member {Array.<module:model/Riskv1decisionsTravelInformationPassengers>} passengers */ exports.prototype['passengers'] = undefined; return exports; }));