UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

159 lines (133 loc) 5.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/InlineResponse20010Billing', 'model/InlineResponse20011Records', 'model/InlineResponse2009EmbeddedTotals'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./InlineResponse20010Billing'), require('./InlineResponse20011Records'), require('./InlineResponse2009EmbeddedTotals')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.InlineResponse20011 = factory(root.CyberSource.ApiClient, root.CyberSource.InlineResponse20010Billing, root.CyberSource.InlineResponse20011Records, root.CyberSource.InlineResponse2009EmbeddedTotals); } }(this, function(ApiClient, InlineResponse20010Billing, InlineResponse20011Records, InlineResponse2009EmbeddedTotals) { 'use strict'; /** * The InlineResponse20011 model module. * @module model/InlineResponse20011 * @version 0.0.1 */ /** * Constructs a new <code>InlineResponse20011</code>. * @alias module:model/InlineResponse20011 * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>InlineResponse20011</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/InlineResponse20011} obj Optional instance to populate. * @return {module:model/InlineResponse20011} The populated <code>InlineResponse20011</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('version')) { obj['version'] = ApiClient.convertToType(data['version'], 'String'); } if (data.hasOwnProperty('reportCreatedDate')) { obj['reportCreatedDate'] = ApiClient.convertToType(data['reportCreatedDate'], 'String'); } if (data.hasOwnProperty('batchId')) { obj['batchId'] = ApiClient.convertToType(data['batchId'], 'String'); } if (data.hasOwnProperty('batchSource')) { obj['batchSource'] = ApiClient.convertToType(data['batchSource'], 'String'); } if (data.hasOwnProperty('batchCaEndpoints')) { obj['batchCaEndpoints'] = ApiClient.convertToType(data['batchCaEndpoints'], 'String'); } if (data.hasOwnProperty('batchCreatedDate')) { obj['batchCreatedDate'] = ApiClient.convertToType(data['batchCreatedDate'], 'String'); } if (data.hasOwnProperty('merchantReference')) { obj['merchantReference'] = ApiClient.convertToType(data['merchantReference'], 'String'); } if (data.hasOwnProperty('totals')) { obj['totals'] = InlineResponse2009EmbeddedTotals.constructFromObject(data['totals']); } if (data.hasOwnProperty('billing')) { obj['billing'] = InlineResponse20010Billing.constructFromObject(data['billing']); } if (data.hasOwnProperty('records')) { obj['records'] = ApiClient.convertToType(data['records'], [InlineResponse20011Records]); } } return obj; } /** * @member {String} version */ exports.prototype['version'] = undefined; /** * ISO-8601 format: yyyy-MM-ddTHH:mm:ssZ * @member {String} reportCreatedDate */ exports.prototype['reportCreatedDate'] = undefined; /** * Unique identification number assigned to the submitted request. * @member {String} batchId */ exports.prototype['batchId'] = undefined; /** * Valid Values: * SCHEDULER * TOKEN_API * CREDIT_CARD_FILE_UPLOAD * AMEX_REGSITRY * AMEX_REGISTRY_API * AMEX_MAINTENANCE * @member {String} batchSource */ exports.prototype['batchSource'] = undefined; /** * @member {String} batchCaEndpoints */ exports.prototype['batchCaEndpoints'] = undefined; /** * ISO-8601 format: yyyy-MM-ddTHH:mm:ssZ * @member {String} batchCreatedDate */ exports.prototype['batchCreatedDate'] = undefined; /** * Reference used by merchant to identify batch. * @member {String} merchantReference */ exports.prototype['merchantReference'] = undefined; /** * @member {module:model/InlineResponse2009EmbeddedTotals} totals */ exports.prototype['totals'] = undefined; /** * @member {module:model/InlineResponse20010Billing} billing */ exports.prototype['billing'] = undefined; /** * @member {Array.<module:model/InlineResponse20011Records>} records */ exports.prototype['records'] = undefined; return exports; }));