cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
142 lines (118 loc) • 6.66 kB
JavaScript
/**
* 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/PtsV2CreateOrderPost201ResponseBuyerInformation', 'model/PtsV2CreateOrderPost201ResponseProcessorInformation', 'model/PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation', 'model/PtsV2PaymentsOrderPost201ResponsePaymentInformation'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./PtsV2CreateOrderPost201ResponseBuyerInformation'), require('./PtsV2CreateOrderPost201ResponseProcessorInformation'), require('./PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation'), require('./PtsV2PaymentsOrderPost201ResponsePaymentInformation'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.PtsV2CreateOrderPost201Response = factory(root.CyberSource.ApiClient, root.CyberSource.PtsV2CreateOrderPost201ResponseBuyerInformation, root.CyberSource.PtsV2CreateOrderPost201ResponseProcessorInformation, root.CyberSource.PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation, root.CyberSource.PtsV2PaymentsOrderPost201ResponsePaymentInformation);
}
}(this, function(ApiClient, PtsV2CreateOrderPost201ResponseBuyerInformation, PtsV2CreateOrderPost201ResponseProcessorInformation, PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation, PtsV2PaymentsOrderPost201ResponsePaymentInformation) {
'use strict';
/**
* The PtsV2CreateOrderPost201Response model module.
* @module model/PtsV2CreateOrderPost201Response
* @version 0.0.1
*/
/**
* Constructs a new <code>PtsV2CreateOrderPost201Response</code>.
* @alias module:model/PtsV2CreateOrderPost201Response
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>PtsV2CreateOrderPost201Response</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/PtsV2CreateOrderPost201Response} obj Optional instance to populate.
* @return {module:model/PtsV2CreateOrderPost201Response} The populated <code>PtsV2CreateOrderPost201Response</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('submitTimeUtc')) {
obj['submitTimeUtc'] = ApiClient.convertToType(data['submitTimeUtc'], 'String');
}
if (data.hasOwnProperty('updateTimeUtc')) {
obj['updateTimeUtc'] = ApiClient.convertToType(data['updateTimeUtc'], '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'] = PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation.constructFromObject(data['clientReferenceInformation']);
}
if (data.hasOwnProperty('processorInformation')) {
obj['processorInformation'] = PtsV2CreateOrderPost201ResponseProcessorInformation.constructFromObject(data['processorInformation']);
}
if (data.hasOwnProperty('paymentInformation')) {
obj['paymentInformation'] = PtsV2PaymentsOrderPost201ResponsePaymentInformation.constructFromObject(data['paymentInformation']);
}
if (data.hasOwnProperty('buyerInformation')) {
obj['buyerInformation'] = PtsV2CreateOrderPost201ResponseBuyerInformation.constructFromObject(data['buyerInformation']);
}
}
return obj;
}
/**
* 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. Returned by Cybersource for all services.
* @member {String} submitTimeUtc
*/
exports.prototype['submitTimeUtc'] = undefined;
/**
* The date and time when the request was last updated. **Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.).
* @member {String} updateTimeUtc
*/
exports.prototype['updateTimeUtc'] = undefined;
/**
* The status of the submitted transaction. Possible values: - CREATED - SAVED - APPROVED - VOIDED - COMPLETED - PAYER_ACTION_REQUIRED
* @member {String} status
*/
exports.prototype['status'] = undefined;
/**
* Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response.
* @member {String} reconciliationId
*/
exports.prototype['reconciliationId'] = undefined;
/**
* @member {module:model/PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation} clientReferenceInformation
*/
exports.prototype['clientReferenceInformation'] = undefined;
/**
* @member {module:model/PtsV2CreateOrderPost201ResponseProcessorInformation} processorInformation
*/
exports.prototype['processorInformation'] = undefined;
/**
* @member {module:model/PtsV2PaymentsOrderPost201ResponsePaymentInformation} paymentInformation
*/
exports.prototype['paymentInformation'] = undefined;
/**
* @member {module:model/PtsV2CreateOrderPost201ResponseBuyerInformation} buyerInformation
*/
exports.prototype['buyerInformation'] = undefined;
return exports;
}));