UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

146 lines (122 loc) 4.85 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'], 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.Ptsv2intentsOrderInformationAmountDetails = factory(root.CyberSource.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * The Ptsv2intentsOrderInformationAmountDetails model module. * @module model/Ptsv2intentsOrderInformationAmountDetails * @version 0.0.1 */ /** * Constructs a new <code>Ptsv2intentsOrderInformationAmountDetails</code>. * @alias module:model/Ptsv2intentsOrderInformationAmountDetails * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>Ptsv2intentsOrderInformationAmountDetails</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/Ptsv2intentsOrderInformationAmountDetails} obj Optional instance to populate. * @return {module:model/Ptsv2intentsOrderInformationAmountDetails} The populated <code>Ptsv2intentsOrderInformationAmountDetails</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('totalAmount')) { obj['totalAmount'] = ApiClient.convertToType(data['totalAmount'], 'String'); } if (data.hasOwnProperty('currency')) { obj['currency'] = ApiClient.convertToType(data['currency'], 'String'); } if (data.hasOwnProperty('discountAmount')) { obj['discountAmount'] = ApiClient.convertToType(data['discountAmount'], 'String'); } if (data.hasOwnProperty('shippingAmount')) { obj['shippingAmount'] = ApiClient.convertToType(data['shippingAmount'], 'String'); } if (data.hasOwnProperty('shippingDiscountAmount')) { obj['shippingDiscountAmount'] = ApiClient.convertToType(data['shippingDiscountAmount'], 'String'); } if (data.hasOwnProperty('taxAmount')) { obj['taxAmount'] = ApiClient.convertToType(data['taxAmount'], 'String'); } if (data.hasOwnProperty('insuranceAmount')) { obj['insuranceAmount'] = ApiClient.convertToType(data['insuranceAmount'], 'String'); } if (data.hasOwnProperty('dutyAmount')) { obj['dutyAmount'] = ApiClient.convertToType(data['dutyAmount'], 'String'); } } return obj; } /** * Grand total for the order. This value cannot be negative. You can include a decimal point (.), but you cannot include any other special characters. CyberSource truncates the amount to the correct number of decimal places * @member {String} totalAmount */ exports.prototype['totalAmount'] = undefined; /** * Currency used for the order * @member {String} currency */ exports.prototype['currency'] = undefined; /** * Discount amount for the transaction. * @member {String} discountAmount */ exports.prototype['discountAmount'] = undefined; /** * Aggregate shipping charges for the transactions. * @member {String} shippingAmount */ exports.prototype['shippingAmount'] = undefined; /** * Shipping discount amount for the transaction. * @member {String} shippingDiscountAmount */ exports.prototype['shippingDiscountAmount'] = undefined; /** * Total tax amount. * @member {String} taxAmount */ exports.prototype['taxAmount'] = undefined; /** * Amount being charged for the insurance fee. * @member {String} insuranceAmount */ exports.prototype['insuranceAmount'] = undefined; /** * Amount being charged as duty amount. * @member {String} dutyAmount */ exports.prototype['dutyAmount'] = undefined; return exports; }));