cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
170 lines (142 loc) • 5.46 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'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries model module.
* @module model/ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries
* @version 0.0.1
*/
/**
* Constructs a new <code>ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries</code>.
* @alias module:model/ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries</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/ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries} obj Optional instance to populate.
* @return {module:model/ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries} The populated <code>ReportingV3PaymentBatchSummariesGet200ResponsePaymentBatchSummaries</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('currencyCode')) {
obj['currencyCode'] = ApiClient.convertToType(data['currencyCode'], 'String');
}
if (data.hasOwnProperty('paymentSubTypeDescription')) {
obj['paymentSubTypeDescription'] = ApiClient.convertToType(data['paymentSubTypeDescription'], 'String');
}
if (data.hasOwnProperty('startTime')) {
obj['startTime'] = ApiClient.convertToType(data['startTime'], 'Date');
}
if (data.hasOwnProperty('endTime')) {
obj['endTime'] = ApiClient.convertToType(data['endTime'], 'Date');
}
if (data.hasOwnProperty('salesCount')) {
obj['salesCount'] = ApiClient.convertToType(data['salesCount'], 'Number');
}
if (data.hasOwnProperty('salesAmount')) {
obj['salesAmount'] = ApiClient.convertToType(data['salesAmount'], 'String');
}
if (data.hasOwnProperty('creditCount')) {
obj['creditCount'] = ApiClient.convertToType(data['creditCount'], 'Number');
}
if (data.hasOwnProperty('creditAmount')) {
obj['creditAmount'] = ApiClient.convertToType(data['creditAmount'], 'String');
}
if (data.hasOwnProperty('accountName')) {
obj['accountName'] = ApiClient.convertToType(data['accountName'], 'String');
}
if (data.hasOwnProperty('accountId')) {
obj['accountId'] = ApiClient.convertToType(data['accountId'], 'String');
}
if (data.hasOwnProperty('merchantId')) {
obj['merchantId'] = ApiClient.convertToType(data['merchantId'], 'String');
}
if (data.hasOwnProperty('merchantName')) {
obj['merchantName'] = ApiClient.convertToType(data['merchantName'], 'String');
}
}
return obj;
}
/**
* @member {String} currencyCode
*/
exports.prototype['currencyCode'] = undefined;
/**
* @member {String} paymentSubTypeDescription
*/
exports.prototype['paymentSubTypeDescription'] = undefined;
/**
* @member {Date} startTime
*/
exports.prototype['startTime'] = undefined;
/**
* @member {Date} endTime
*/
exports.prototype['endTime'] = undefined;
/**
* @member {Number} salesCount
*/
exports.prototype['salesCount'] = undefined;
/**
* @member {String} salesAmount
*/
exports.prototype['salesAmount'] = undefined;
/**
* @member {Number} creditCount
*/
exports.prototype['creditCount'] = undefined;
/**
* @member {String} creditAmount
*/
exports.prototype['creditAmount'] = undefined;
/**
* @member {String} accountName
*/
exports.prototype['accountName'] = undefined;
/**
* @member {String} accountId
*/
exports.prototype['accountId'] = undefined;
/**
* @member {String} merchantId
*/
exports.prototype['merchantId'] = undefined;
/**
* @member {String} merchantName
*/
exports.prototype['merchantName'] = undefined;
return exports;
}));