UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

117 lines (96 loc) 4.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/VasV2PaymentsPost201ResponseOrderInformationJurisdiction', 'model/VasV2PaymentsPost201ResponseOrderInformationTaxDetails'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./VasV2PaymentsPost201ResponseOrderInformationJurisdiction'), require('./VasV2PaymentsPost201ResponseOrderInformationTaxDetails')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.VasV2PaymentsPost201ResponseOrderInformationLineItems = factory(root.CyberSource.ApiClient, root.CyberSource.VasV2PaymentsPost201ResponseOrderInformationJurisdiction, root.CyberSource.VasV2PaymentsPost201ResponseOrderInformationTaxDetails); } }(this, function(ApiClient, VasV2PaymentsPost201ResponseOrderInformationJurisdiction, VasV2PaymentsPost201ResponseOrderInformationTaxDetails) { 'use strict'; /** * The VasV2PaymentsPost201ResponseOrderInformationLineItems model module. * @module model/VasV2PaymentsPost201ResponseOrderInformationLineItems * @version 0.0.1 */ /** * Constructs a new <code>VasV2PaymentsPost201ResponseOrderInformationLineItems</code>. * @alias module:model/VasV2PaymentsPost201ResponseOrderInformationLineItems * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>VasV2PaymentsPost201ResponseOrderInformationLineItems</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/VasV2PaymentsPost201ResponseOrderInformationLineItems} obj Optional instance to populate. * @return {module:model/VasV2PaymentsPost201ResponseOrderInformationLineItems} The populated <code>VasV2PaymentsPost201ResponseOrderInformationLineItems</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('taxDetails')) { obj['taxDetails'] = ApiClient.convertToType(data['taxDetails'], [VasV2PaymentsPost201ResponseOrderInformationTaxDetails]); } if (data.hasOwnProperty('jurisdiction')) { obj['jurisdiction'] = ApiClient.convertToType(data['jurisdiction'], [VasV2PaymentsPost201ResponseOrderInformationJurisdiction]); } if (data.hasOwnProperty('exemptAmount')) { obj['exemptAmount'] = ApiClient.convertToType(data['exemptAmount'], 'String'); } if (data.hasOwnProperty('taxableAmount')) { obj['taxableAmount'] = ApiClient.convertToType(data['taxableAmount'], 'String'); } if (data.hasOwnProperty('taxAmount')) { obj['taxAmount'] = ApiClient.convertToType(data['taxAmount'], 'String'); } } return obj; } /** * @member {Array.<module:model/VasV2PaymentsPost201ResponseOrderInformationTaxDetails>} taxDetails */ exports.prototype['taxDetails'] = undefined; /** * @member {Array.<module:model/VasV2PaymentsPost201ResponseOrderInformationJurisdiction>} jurisdiction */ exports.prototype['jurisdiction'] = undefined; /** * Exempt amount for the lineItem. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`. * @member {String} exemptAmount */ exports.prototype['exemptAmount'] = undefined; /** * Portion of the item amount that is taxable. * @member {String} taxableAmount */ exports.prototype['taxableAmount'] = undefined; /** * Total tax for the item. This value is the sum of all taxes applied to the item. * @member {String} taxAmount */ exports.prototype['taxAmount'] = undefined; return exports; }));