UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

156 lines (130 loc) 8.14 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/Tmsv2tokenizeTokenInformationCustomerBuyerInformation', 'model/Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation', 'model/Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument', 'model/Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress', 'model/Tmsv2tokenizeTokenInformationCustomerEmbedded', 'model/Tmsv2tokenizeTokenInformationCustomerLinks', 'model/Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation', 'model/Tmsv2tokenizeTokenInformationCustomerMetadata', 'model/Tmsv2tokenizeTokenInformationCustomerObjectInformation'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Tmsv2tokenizeTokenInformationCustomerBuyerInformation'), require('./Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation'), require('./Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument'), require('./Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress'), require('./Tmsv2tokenizeTokenInformationCustomerEmbedded'), require('./Tmsv2tokenizeTokenInformationCustomerLinks'), require('./Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation'), require('./Tmsv2tokenizeTokenInformationCustomerMetadata'), require('./Tmsv2tokenizeTokenInformationCustomerObjectInformation')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.PatchCustomerRequest = factory(root.CyberSource.ApiClient, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerBuyerInformation, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerEmbedded, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerLinks, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerMetadata, root.CyberSource.Tmsv2tokenizeTokenInformationCustomerObjectInformation); } }(this, function(ApiClient, Tmsv2tokenizeTokenInformationCustomerBuyerInformation, Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation, Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument, Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress, Tmsv2tokenizeTokenInformationCustomerEmbedded, Tmsv2tokenizeTokenInformationCustomerLinks, Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation, Tmsv2tokenizeTokenInformationCustomerMetadata, Tmsv2tokenizeTokenInformationCustomerObjectInformation) { 'use strict'; /** * The PatchCustomerRequest model module. * @module model/PatchCustomerRequest * @version 0.0.1 */ /** * Constructs a new <code>PatchCustomerRequest</code>. * @alias module:model/PatchCustomerRequest * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>PatchCustomerRequest</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/PatchCustomerRequest} obj Optional instance to populate. * @return {module:model/PatchCustomerRequest} The populated <code>PatchCustomerRequest</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('_links')) { obj['_links'] = Tmsv2tokenizeTokenInformationCustomerLinks.constructFromObject(data['_links']); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'String'); } if (data.hasOwnProperty('objectInformation')) { obj['objectInformation'] = Tmsv2tokenizeTokenInformationCustomerObjectInformation.constructFromObject(data['objectInformation']); } if (data.hasOwnProperty('buyerInformation')) { obj['buyerInformation'] = Tmsv2tokenizeTokenInformationCustomerBuyerInformation.constructFromObject(data['buyerInformation']); } if (data.hasOwnProperty('clientReferenceInformation')) { obj['clientReferenceInformation'] = Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation.constructFromObject(data['clientReferenceInformation']); } if (data.hasOwnProperty('merchantDefinedInformation')) { obj['merchantDefinedInformation'] = ApiClient.convertToType(data['merchantDefinedInformation'], [Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation]); } if (data.hasOwnProperty('defaultPaymentInstrument')) { obj['defaultPaymentInstrument'] = Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument.constructFromObject(data['defaultPaymentInstrument']); } if (data.hasOwnProperty('defaultShippingAddress')) { obj['defaultShippingAddress'] = Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress.constructFromObject(data['defaultShippingAddress']); } if (data.hasOwnProperty('metadata')) { obj['metadata'] = Tmsv2tokenizeTokenInformationCustomerMetadata.constructFromObject(data['metadata']); } if (data.hasOwnProperty('_embedded')) { obj['_embedded'] = Tmsv2tokenizeTokenInformationCustomerEmbedded.constructFromObject(data['_embedded']); } } return obj; } /** * @member {module:model/Tmsv2tokenizeTokenInformationCustomerLinks} _links */ exports.prototype['_links'] = undefined; /** * The Id of the Customer Token. * @member {String} id */ exports.prototype['id'] = undefined; /** * @member {module:model/Tmsv2tokenizeTokenInformationCustomerObjectInformation} objectInformation */ exports.prototype['objectInformation'] = undefined; /** * @member {module:model/Tmsv2tokenizeTokenInformationCustomerBuyerInformation} buyerInformation */ exports.prototype['buyerInformation'] = undefined; /** * @member {module:model/Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation} clientReferenceInformation */ exports.prototype['clientReferenceInformation'] = undefined; /** * Object containing the custom data that the merchant defines. * @member {Array.<module:model/Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation>} merchantDefinedInformation */ exports.prototype['merchantDefinedInformation'] = undefined; /** * @member {module:model/Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument} defaultPaymentInstrument */ exports.prototype['defaultPaymentInstrument'] = undefined; /** * @member {module:model/Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress} defaultShippingAddress */ exports.prototype['defaultShippingAddress'] = undefined; /** * @member {module:model/Tmsv2tokenizeTokenInformationCustomerMetadata} metadata */ exports.prototype['metadata'] = undefined; /** * @member {module:model/Tmsv2tokenizeTokenInformationCustomerEmbedded} _embedded */ exports.prototype['_embedded'] = undefined; return exports; }));