UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

101 lines (82 loc) 5.04 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/Ucv1sessionsPaymentConfigurationsTMSTOKENCustomer', 'model/Ucv1sessionsPaymentConfigurationsTMSTOKENInstrumentIdentifiers', 'model/Ucv1sessionsPaymentConfigurationsTMSTOKENPaymentInstruments'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Ucv1sessionsPaymentConfigurationsTMSTOKENCustomer'), require('./Ucv1sessionsPaymentConfigurationsTMSTOKENInstrumentIdentifiers'), require('./Ucv1sessionsPaymentConfigurationsTMSTOKENPaymentInstruments')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Ucv1sessionsPaymentConfigurationsTMSTOKEN = factory(root.CyberSource.ApiClient, root.CyberSource.Ucv1sessionsPaymentConfigurationsTMSTOKENCustomer, root.CyberSource.Ucv1sessionsPaymentConfigurationsTMSTOKENInstrumentIdentifiers, root.CyberSource.Ucv1sessionsPaymentConfigurationsTMSTOKENPaymentInstruments); } }(this, function(ApiClient, Ucv1sessionsPaymentConfigurationsTMSTOKENCustomer, Ucv1sessionsPaymentConfigurationsTMSTOKENInstrumentIdentifiers, Ucv1sessionsPaymentConfigurationsTMSTOKENPaymentInstruments) { 'use strict'; /** * The Ucv1sessionsPaymentConfigurationsTMSTOKEN model module. * @module model/Ucv1sessionsPaymentConfigurationsTMSTOKEN * @version 0.0.1 */ /** * Constructs a new <code>Ucv1sessionsPaymentConfigurationsTMSTOKEN</code>. * Allows a single Token Management Service (TMS) token to be presented within the Unified Checkout user interface. This enables customers to complete a payment using an existing stored credential. Supported token types: - customer - instrumentIdentifiers - paymentInstruments **Important note:** If a customer token ID is provided and token creation (tokenCreate) is enabled for a paymentInstrument or instrumentIdentifier within the Complete Mandate, Unified Checkout will create a new payment instrument or instrument identifier and associate it with the specified customer token. * @alias module:model/Ucv1sessionsPaymentConfigurationsTMSTOKEN * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Ucv1sessionsPaymentConfigurationsTMSTOKEN</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/Ucv1sessionsPaymentConfigurationsTMSTOKEN} obj Optional instance to populate. * @return {module:model/Ucv1sessionsPaymentConfigurationsTMSTOKEN} The populated <code>Ucv1sessionsPaymentConfigurationsTMSTOKEN</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('customer')) { obj['customer'] = Ucv1sessionsPaymentConfigurationsTMSTOKENCustomer.constructFromObject(data['customer']); } if (data.hasOwnProperty('paymentInstruments')) { obj['paymentInstruments'] = ApiClient.convertToType(data['paymentInstruments'], [Ucv1sessionsPaymentConfigurationsTMSTOKENPaymentInstruments]); } if (data.hasOwnProperty('instrumentIdentifiers')) { obj['instrumentIdentifiers'] = ApiClient.convertToType(data['instrumentIdentifiers'], [Ucv1sessionsPaymentConfigurationsTMSTOKENInstrumentIdentifiers]); } } return obj; } /** * @member {module:model/Ucv1sessionsPaymentConfigurationsTMSTOKENCustomer} customer */ exports.prototype['customer'] = undefined; /** * List of existing payment instrument tokens associated with the customer. * @member {Array.<module:model/Ucv1sessionsPaymentConfigurationsTMSTOKENPaymentInstruments>} paymentInstruments */ exports.prototype['paymentInstruments'] = undefined; /** * List of existing instrument identifier tokens. If not supplied, the default token type for the merchant's token vault is used. * @member {Array.<module:model/Ucv1sessionsPaymentConfigurationsTMSTOKENInstrumentIdentifiers>} instrumentIdentifiers */ exports.prototype['instrumentIdentifiers'] = undefined; return exports; }));