UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

182 lines (153 loc) 8.63 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/PushFunds201ResponseClientReferenceInformation', 'model/PushFunds201ResponseErrorInformation', 'model/PushFunds201ResponseLinks', 'model/PushFunds201ResponseMerchantInformation', 'model/PushFunds201ResponseOrderInformation', 'model/PushFunds201ResponsePaymentInformation', 'model/PushFunds201ResponseProcessingInformation', 'model/PushFunds201ResponseProcessorInformation', 'model/PushFunds201ResponseRecipientInformation'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./PushFunds201ResponseClientReferenceInformation'), require('./PushFunds201ResponseErrorInformation'), require('./PushFunds201ResponseLinks'), require('./PushFunds201ResponseMerchantInformation'), require('./PushFunds201ResponseOrderInformation'), require('./PushFunds201ResponsePaymentInformation'), require('./PushFunds201ResponseProcessingInformation'), require('./PushFunds201ResponseProcessorInformation'), require('./PushFunds201ResponseRecipientInformation')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.PushFunds201Response = factory(root.CyberSource.ApiClient, root.CyberSource.PushFunds201ResponseClientReferenceInformation, root.CyberSource.PushFunds201ResponseErrorInformation, root.CyberSource.PushFunds201ResponseLinks, root.CyberSource.PushFunds201ResponseMerchantInformation, root.CyberSource.PushFunds201ResponseOrderInformation, root.CyberSource.PushFunds201ResponsePaymentInformation, root.CyberSource.PushFunds201ResponseProcessingInformation, root.CyberSource.PushFunds201ResponseProcessorInformation, root.CyberSource.PushFunds201ResponseRecipientInformation); } }(this, function(ApiClient, PushFunds201ResponseClientReferenceInformation, PushFunds201ResponseErrorInformation, PushFunds201ResponseLinks, PushFunds201ResponseMerchantInformation, PushFunds201ResponseOrderInformation, PushFunds201ResponsePaymentInformation, PushFunds201ResponseProcessingInformation, PushFunds201ResponseProcessorInformation, PushFunds201ResponseRecipientInformation) { 'use strict'; /** * The PushFunds201Response model module. * @module model/PushFunds201Response * @version 0.0.1 */ /** * Constructs a new <code>PushFunds201Response</code>. * @alias module:model/PushFunds201Response * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>PushFunds201Response</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/PushFunds201Response} obj Optional instance to populate. * @return {module:model/PushFunds201Response} The populated <code>PushFunds201Response</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'String'); } if (data.hasOwnProperty('submitTimeUtc')) { obj['submitTimeUtc'] = ApiClient.convertToType(data['submitTimeUtc'], 'String'); } if (data.hasOwnProperty('status')) { obj['status'] = ApiClient.convertToType(data['status'], 'String'); } if (data.hasOwnProperty('reconciliationId')) { obj['reconciliationId'] = ApiClient.convertToType(data['reconciliationId'], 'String'); } if (data.hasOwnProperty('clientReferenceInformation')) { obj['clientReferenceInformation'] = PushFunds201ResponseClientReferenceInformation.constructFromObject(data['clientReferenceInformation']); } if (data.hasOwnProperty('recipientInformation')) { obj['recipientInformation'] = PushFunds201ResponseRecipientInformation.constructFromObject(data['recipientInformation']); } if (data.hasOwnProperty('merchantInformation')) { obj['merchantInformation'] = PushFunds201ResponseMerchantInformation.constructFromObject(data['merchantInformation']); } if (data.hasOwnProperty('errorInformation')) { obj['errorInformation'] = PushFunds201ResponseErrorInformation.constructFromObject(data['errorInformation']); } if (data.hasOwnProperty('processorInformation')) { obj['processorInformation'] = PushFunds201ResponseProcessorInformation.constructFromObject(data['processorInformation']); } if (data.hasOwnProperty('orderInformation')) { obj['orderInformation'] = PushFunds201ResponseOrderInformation.constructFromObject(data['orderInformation']); } if (data.hasOwnProperty('paymentInformation')) { obj['paymentInformation'] = PushFunds201ResponsePaymentInformation.constructFromObject(data['paymentInformation']); } if (data.hasOwnProperty('processingInformation')) { obj['processingInformation'] = PushFunds201ResponseProcessingInformation.constructFromObject(data['processingInformation']); } if (data.hasOwnProperty('_links')) { obj['_links'] = PushFunds201ResponseLinks.constructFromObject(data['_links']); } } return obj; } /** * A unique identification number to identify the submitted request. It is also appended to the endpoint of the resource. * @member {String} id */ exports.prototype['id'] = undefined; /** * Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ` **Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC. * @member {String} submitTimeUtc */ exports.prototype['submitTimeUtc'] = undefined; /** * The status of the submitted transaction. Possible values: - AUTHORIZED - DECLINED - SERVER_ERROR - INVALID_REQUEST - PARTIAL_AUTHORIZED * @member {String} status */ exports.prototype['status'] = undefined; /** * Cybersource or merchant generated transaction reference number. This is sent to the processor and is echoed back in the response to the merchant. This is This value is used for reconciliation purposes. * @member {String} reconciliationId */ exports.prototype['reconciliationId'] = undefined; /** * @member {module:model/PushFunds201ResponseClientReferenceInformation} clientReferenceInformation */ exports.prototype['clientReferenceInformation'] = undefined; /** * @member {module:model/PushFunds201ResponseRecipientInformation} recipientInformation */ exports.prototype['recipientInformation'] = undefined; /** * @member {module:model/PushFunds201ResponseMerchantInformation} merchantInformation */ exports.prototype['merchantInformation'] = undefined; /** * @member {module:model/PushFunds201ResponseErrorInformation} errorInformation */ exports.prototype['errorInformation'] = undefined; /** * @member {module:model/PushFunds201ResponseProcessorInformation} processorInformation */ exports.prototype['processorInformation'] = undefined; /** * @member {module:model/PushFunds201ResponseOrderInformation} orderInformation */ exports.prototype['orderInformation'] = undefined; /** * @member {module:model/PushFunds201ResponsePaymentInformation} paymentInformation */ exports.prototype['paymentInformation'] = undefined; /** * @member {module:model/PushFunds201ResponseProcessingInformation} processingInformation */ exports.prototype['processingInformation'] = undefined; /** * @member {module:model/PushFunds201ResponseLinks} _links */ exports.prototype['_links'] = undefined; return exports; }));