UNPKG

cybersource-rest-client-typescript

Version:
149 lines (124 loc) 5.63 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.3.0 * * Do not edit the class manually. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['ApiClient', 'model/Upv1capturecontextsCaptureMandate', 'model/Upv1capturecontextsCheckoutApiInitialization', 'model/Upv1capturecontextsOrderInformation'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Upv1capturecontextsCaptureMandate'), require('./Upv1capturecontextsCheckoutApiInitialization'), require('./Upv1capturecontextsOrderInformation')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.GenerateUnifiedCheckoutCaptureContextRequest = factory(root.CyberSource.ApiClient, root.CyberSource.Upv1capturecontextsCaptureMandate, root.CyberSource.Upv1capturecontextsCheckoutApiInitialization, root.CyberSource.Upv1capturecontextsOrderInformation); } }(this, function(ApiClient, Upv1capturecontextsCaptureMandate, Upv1capturecontextsCheckoutApiInitialization, Upv1capturecontextsOrderInformation) { 'use strict'; /** * The GenerateUnifiedCheckoutCaptureContextRequest model module. * @module model/GenerateUnifiedCheckoutCaptureContextRequest * @version 0.0.1 */ /** * Constructs a new <code>GenerateUnifiedCheckoutCaptureContextRequest</code>. * @alias module:model/GenerateUnifiedCheckoutCaptureContextRequest * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>GenerateUnifiedCheckoutCaptureContextRequest</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/GenerateUnifiedCheckoutCaptureContextRequest} obj Optional instance to populate. * @return {module:model/GenerateUnifiedCheckoutCaptureContextRequest} The populated <code>GenerateUnifiedCheckoutCaptureContextRequest</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('targetOrigins')) { obj['targetOrigins'] = ApiClient.convertToType(data['targetOrigins'], ['String']); } if (data.hasOwnProperty('clientVersion')) { obj['clientVersion'] = ApiClient.convertToType(data['clientVersion'], 'String'); } if (data.hasOwnProperty('allowedCardNetworks')) { obj['allowedCardNetworks'] = ApiClient.convertToType(data['allowedCardNetworks'], ['String']); } if (data.hasOwnProperty('allowedPaymentTypes')) { obj['allowedPaymentTypes'] = ApiClient.convertToType(data['allowedPaymentTypes'], ['String']); } if (data.hasOwnProperty('country')) { obj['country'] = ApiClient.convertToType(data['country'], 'String'); } if (data.hasOwnProperty('locale')) { obj['locale'] = ApiClient.convertToType(data['locale'], 'String'); } if (data.hasOwnProperty('captureMandate')) { obj['captureMandate'] = Upv1capturecontextsCaptureMandate.constructFromObject(data['captureMandate']); } if (data.hasOwnProperty('orderInformation')) { obj['orderInformation'] = Upv1capturecontextsOrderInformation.constructFromObject(data['orderInformation']); } if (data.hasOwnProperty('checkoutApiInitialization')) { obj['checkoutApiInitialization'] = Upv1capturecontextsCheckoutApiInitialization.constructFromObject(data['checkoutApiInitialization']); } } return obj; } /** * @member {Array.<String>} targetOrigins */ exports.prototype['targetOrigins'] = undefined; /** * version number of Unified Checkout being used * @member {String} clientVersion */ exports.prototype['clientVersion'] = undefined; /** * @member {Array.<String>} allowedCardNetworks */ exports.prototype['allowedCardNetworks'] = undefined; /** * @member {Array.<String>} allowedPaymentTypes */ exports.prototype['allowedPaymentTypes'] = undefined; /** * Country the purchase is originating from (e.g. country of the merchant). Use the two- character ISO Standard * @member {String} country */ exports.prototype['country'] = undefined; /** * Localization of the User experience conforming to the ISO 639-1 language standards and two-character ISO Standard Country Code * @member {String} locale */ exports.prototype['locale'] = undefined; /** * @member {module:model/Upv1capturecontextsCaptureMandate} captureMandate */ exports.prototype['captureMandate'] = undefined; /** * @member {module:model/Upv1capturecontextsOrderInformation} orderInformation */ exports.prototype['orderInformation'] = undefined; /** * @member {module:model/Upv1capturecontextsCheckoutApiInitialization} checkoutApiInitialization */ exports.prototype['checkoutApiInitialization'] = undefined; return exports; }));