UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

115 lines (94 loc) 5.52 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/PtsV2PaymentsPost201ResponseTokenInformationCustomer', 'model/PtsV2PaymentsPost201ResponseTokenInformationInstrumentIdentifier', 'model/PtsV2PaymentsPost201ResponseTokenInformationPaymentInstrument', 'model/PtsV2PaymentsPost201ResponseTokenInformationShippingAddress'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./PtsV2PaymentsPost201ResponseTokenInformationCustomer'), require('./PtsV2PaymentsPost201ResponseTokenInformationInstrumentIdentifier'), require('./PtsV2PaymentsPost201ResponseTokenInformationPaymentInstrument'), require('./PtsV2PaymentsPost201ResponseTokenInformationShippingAddress')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.PtsV2PaymentsPost201ResponseTokenInformation = factory(root.CyberSource.ApiClient, root.CyberSource.PtsV2PaymentsPost201ResponseTokenInformationCustomer, root.CyberSource.PtsV2PaymentsPost201ResponseTokenInformationInstrumentIdentifier, root.CyberSource.PtsV2PaymentsPost201ResponseTokenInformationPaymentInstrument, root.CyberSource.PtsV2PaymentsPost201ResponseTokenInformationShippingAddress); } }(this, function(ApiClient, PtsV2PaymentsPost201ResponseTokenInformationCustomer, PtsV2PaymentsPost201ResponseTokenInformationInstrumentIdentifier, PtsV2PaymentsPost201ResponseTokenInformationPaymentInstrument, PtsV2PaymentsPost201ResponseTokenInformationShippingAddress) { 'use strict'; /** * The PtsV2PaymentsPost201ResponseTokenInformation model module. * @module model/PtsV2PaymentsPost201ResponseTokenInformation * @version 0.0.1 */ /** * Constructs a new <code>PtsV2PaymentsPost201ResponseTokenInformation</code>. * @alias module:model/PtsV2PaymentsPost201ResponseTokenInformation * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>PtsV2PaymentsPost201ResponseTokenInformation</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/PtsV2PaymentsPost201ResponseTokenInformation} obj Optional instance to populate. * @return {module:model/PtsV2PaymentsPost201ResponseTokenInformation} The populated <code>PtsV2PaymentsPost201ResponseTokenInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('instrumentidentifierNew')) { obj['instrumentidentifierNew'] = ApiClient.convertToType(data['instrumentidentifierNew'], 'Boolean'); } if (data.hasOwnProperty('customer')) { obj['customer'] = PtsV2PaymentsPost201ResponseTokenInformationCustomer.constructFromObject(data['customer']); } if (data.hasOwnProperty('paymentInstrument')) { obj['paymentInstrument'] = PtsV2PaymentsPost201ResponseTokenInformationPaymentInstrument.constructFromObject(data['paymentInstrument']); } if (data.hasOwnProperty('shippingAddress')) { obj['shippingAddress'] = PtsV2PaymentsPost201ResponseTokenInformationShippingAddress.constructFromObject(data['shippingAddress']); } if (data.hasOwnProperty('instrumentIdentifier')) { obj['instrumentIdentifier'] = PtsV2PaymentsPost201ResponseTokenInformationInstrumentIdentifier.constructFromObject(data['instrumentIdentifier']); } } return obj; } /** * A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault. A value of false means the card number or bank account used to create an Instrument Identifier already existed in the token vault. * @member {Boolean} instrumentidentifierNew */ exports.prototype['instrumentidentifierNew'] = undefined; /** * @member {module:model/PtsV2PaymentsPost201ResponseTokenInformationCustomer} customer */ exports.prototype['customer'] = undefined; /** * @member {module:model/PtsV2PaymentsPost201ResponseTokenInformationPaymentInstrument} paymentInstrument */ exports.prototype['paymentInstrument'] = undefined; /** * @member {module:model/PtsV2PaymentsPost201ResponseTokenInformationShippingAddress} shippingAddress */ exports.prototype['shippingAddress'] = undefined; /** * @member {module:model/PtsV2PaymentsPost201ResponseTokenInformationInstrumentIdentifier} instrumentIdentifier */ exports.prototype['instrumentIdentifier'] = undefined; return exports; }));