UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

120 lines (101 loc) 5.49 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/Ptsv2paymentsOrderInformationAmountDetailsOctsurcharge'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsOrderInformationAmountDetailsOctsurcharge')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Ptsv1pullfundstransferOrderInformationAmountDetails = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsOrderInformationAmountDetailsOctsurcharge); } }(this, function(ApiClient, Ptsv2paymentsOrderInformationAmountDetailsOctsurcharge) { 'use strict'; /** * The Ptsv1pullfundstransferOrderInformationAmountDetails model module. * @module model/Ptsv1pullfundstransferOrderInformationAmountDetails * @version 0.0.1 */ /** * Constructs a new <code>Ptsv1pullfundstransferOrderInformationAmountDetails</code>. * @alias module:model/Ptsv1pullfundstransferOrderInformationAmountDetails * @class * @param totalAmount {String} The total amount of the funds transfer including all fees. This value cannot be negative. You can include a decimal point (.), but no other special characters. * @param currency {String} Use a 3-character alpha currency code for currency of the sender. ISO standard currencies: [http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) Currency must be supported by the processor. */ var exports = function(totalAmount, currency) { var _this = this; _this['totalAmount'] = totalAmount; _this['currency'] = currency; }; /** * Constructs a <code>Ptsv1pullfundstransferOrderInformationAmountDetails</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/Ptsv1pullfundstransferOrderInformationAmountDetails} obj Optional instance to populate. * @return {module:model/Ptsv1pullfundstransferOrderInformationAmountDetails} The populated <code>Ptsv1pullfundstransferOrderInformationAmountDetails</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('serviceFee')) { obj['serviceFee'] = ApiClient.convertToType(data['serviceFee'], 'String'); } if (data.hasOwnProperty('foreignExchangeFee')) { obj['foreignExchangeFee'] = ApiClient.convertToType(data['foreignExchangeFee'], 'String'); } if (data.hasOwnProperty('surcharge')) { obj['surcharge'] = Ptsv2paymentsOrderInformationAmountDetailsOctsurcharge.constructFromObject(data['surcharge']); } } return obj; } /** * The total amount of the funds transfer including all fees. This value cannot be negative. You can include a decimal point (.), but no other special characters. * @member {String} totalAmount */ exports.prototype['totalAmount'] = undefined; /** * Use a 3-character alpha currency code for currency of the sender. ISO standard currencies: [http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) Currency must be supported by the processor. * @member {String} currency */ exports.prototype['currency'] = undefined; /** * When present, this field contains the sender's surcharge as assessed by the originator. Values in this field must be in the same currency and format as defined in the amount field. * @member {String} serviceFee */ exports.prototype['serviceFee'] = undefined; /** * When present, this field contains the sender's foreign exchange markup fee (markup above the wholesale or VisaNet exchange rate as assessed by the originator). Values in this field must be in the same currency and format as defined in the amount field. * @member {String} foreignExchangeFee */ exports.prototype['foreignExchangeFee'] = undefined; /** * @member {module:model/Ptsv2paymentsOrderInformationAmountDetailsOctsurcharge} surcharge */ exports.prototype['surcharge'] = undefined; return exports; }));