UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

107 lines (87 loc) 5 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/Bavsv1accountvalidationsPaymentInformationBank', 'model/Bavsv1accountvalidationsPaymentInformationCustomer', 'model/Bavsv1accountvalidationsPaymentInformationInstrumentIdentifier', 'model/Bavsv1accountvalidationsPaymentInformationPaymentInstrument'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Bavsv1accountvalidationsPaymentInformationBank'), require('./Bavsv1accountvalidationsPaymentInformationCustomer'), require('./Bavsv1accountvalidationsPaymentInformationInstrumentIdentifier'), require('./Bavsv1accountvalidationsPaymentInformationPaymentInstrument')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Bavsv1accountvalidationsPaymentInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Bavsv1accountvalidationsPaymentInformationBank, root.CyberSource.Bavsv1accountvalidationsPaymentInformationCustomer, root.CyberSource.Bavsv1accountvalidationsPaymentInformationInstrumentIdentifier, root.CyberSource.Bavsv1accountvalidationsPaymentInformationPaymentInstrument); } }(this, function(ApiClient, Bavsv1accountvalidationsPaymentInformationBank, Bavsv1accountvalidationsPaymentInformationCustomer, Bavsv1accountvalidationsPaymentInformationInstrumentIdentifier, Bavsv1accountvalidationsPaymentInformationPaymentInstrument) { 'use strict'; /** * The Bavsv1accountvalidationsPaymentInformation model module. * @module model/Bavsv1accountvalidationsPaymentInformation * @version 0.0.1 */ /** * Constructs a new <code>Bavsv1accountvalidationsPaymentInformation</code>. * Payment information for account validation. Either tokenized payment data or bank account details must be provided, but not both. When token information is provided, the bank object becomes optional. Only one token type may be included per request. * @alias module:model/Bavsv1accountvalidationsPaymentInformation * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Bavsv1accountvalidationsPaymentInformation</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/Bavsv1accountvalidationsPaymentInformation} obj Optional instance to populate. * @return {module:model/Bavsv1accountvalidationsPaymentInformation} The populated <code>Bavsv1accountvalidationsPaymentInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('customer')) { obj['customer'] = Bavsv1accountvalidationsPaymentInformationCustomer.constructFromObject(data['customer']); } if (data.hasOwnProperty('paymentInstrument')) { obj['paymentInstrument'] = Bavsv1accountvalidationsPaymentInformationPaymentInstrument.constructFromObject(data['paymentInstrument']); } if (data.hasOwnProperty('instrumentIdentifier')) { obj['instrumentIdentifier'] = Bavsv1accountvalidationsPaymentInformationInstrumentIdentifier.constructFromObject(data['instrumentIdentifier']); } if (data.hasOwnProperty('bank')) { obj['bank'] = Bavsv1accountvalidationsPaymentInformationBank.constructFromObject(data['bank']); } } return obj; } /** * @member {module:model/Bavsv1accountvalidationsPaymentInformationCustomer} customer */ exports.prototype['customer'] = undefined; /** * @member {module:model/Bavsv1accountvalidationsPaymentInformationPaymentInstrument} paymentInstrument */ exports.prototype['paymentInstrument'] = undefined; /** * @member {module:model/Bavsv1accountvalidationsPaymentInformationInstrumentIdentifier} instrumentIdentifier */ exports.prototype['instrumentIdentifier'] = undefined; /** * @member {module:model/Bavsv1accountvalidationsPaymentInformationBank} bank */ exports.prototype['bank'] = undefined; return exports; }));