cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
114 lines (93 loc) • 4.38 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/Vasv2taxBuyerInformation', 'model/Vasv2taxClientReferenceInformation', 'model/Vasv2taxMerchantInformation', 'model/Vasv2taxOrderInformation', 'model/Vasv2taxTaxInformation'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Vasv2taxBuyerInformation'), require('./Vasv2taxClientReferenceInformation'), require('./Vasv2taxMerchantInformation'), require('./Vasv2taxOrderInformation'), require('./Vasv2taxTaxInformation'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.TaxRequest = factory(root.CyberSource.ApiClient, root.CyberSource.Vasv2taxBuyerInformation, root.CyberSource.Vasv2taxClientReferenceInformation, root.CyberSource.Vasv2taxMerchantInformation, root.CyberSource.Vasv2taxOrderInformation, root.CyberSource.Vasv2taxTaxInformation);
}
}(this, function(ApiClient, Vasv2taxBuyerInformation, Vasv2taxClientReferenceInformation, Vasv2taxMerchantInformation, Vasv2taxOrderInformation, Vasv2taxTaxInformation) {
'use strict';
/**
* The TaxRequest model module.
* @module model/TaxRequest
* @version 0.0.1
*/
/**
* Constructs a new <code>TaxRequest</code>.
* @alias module:model/TaxRequest
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>TaxRequest</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/TaxRequest} obj Optional instance to populate.
* @return {module:model/TaxRequest} The populated <code>TaxRequest</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('clientReferenceInformation')) {
obj['clientReferenceInformation'] = Vasv2taxClientReferenceInformation.constructFromObject(data['clientReferenceInformation']);
}
if (data.hasOwnProperty('taxInformation')) {
obj['taxInformation'] = Vasv2taxTaxInformation.constructFromObject(data['taxInformation']);
}
if (data.hasOwnProperty('orderInformation')) {
obj['orderInformation'] = Vasv2taxOrderInformation.constructFromObject(data['orderInformation']);
}
if (data.hasOwnProperty('merchantInformation')) {
obj['merchantInformation'] = Vasv2taxMerchantInformation.constructFromObject(data['merchantInformation']);
}
if (data.hasOwnProperty('buyerInformation')) {
obj['buyerInformation'] = Vasv2taxBuyerInformation.constructFromObject(data['buyerInformation']);
}
}
return obj;
}
/**
* @member {module:model/Vasv2taxClientReferenceInformation} clientReferenceInformation
*/
exports.prototype['clientReferenceInformation'] = undefined;
/**
* @member {module:model/Vasv2taxTaxInformation} taxInformation
*/
exports.prototype['taxInformation'] = undefined;
/**
* @member {module:model/Vasv2taxOrderInformation} orderInformation
*/
exports.prototype['orderInformation'] = undefined;
/**
* @member {module:model/Vasv2taxMerchantInformation} merchantInformation
*/
exports.prototype['merchantInformation'] = undefined;
/**
* @member {module:model/Vasv2taxBuyerInformation} buyerInformation
*/
exports.prototype['buyerInformation'] = undefined;
return exports;
}));