cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
128 lines (106 loc) • 4.63 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.Ptsv2paymentsTravelInformationAutoRentalTaxDetails = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The Ptsv2paymentsTravelInformationAutoRentalTaxDetails model module.
* @module model/Ptsv2paymentsTravelInformationAutoRentalTaxDetails
* @version 0.0.1
*/
/**
* Constructs a new <code>Ptsv2paymentsTravelInformationAutoRentalTaxDetails</code>.
* @alias module:model/Ptsv2paymentsTravelInformationAutoRentalTaxDetails
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Ptsv2paymentsTravelInformationAutoRentalTaxDetails</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/Ptsv2paymentsTravelInformationAutoRentalTaxDetails} obj Optional instance to populate.
* @return {module:model/Ptsv2paymentsTravelInformationAutoRentalTaxDetails} The populated <code>Ptsv2paymentsTravelInformationAutoRentalTaxDetails</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
}
if (data.hasOwnProperty('rate')) {
obj['rate'] = ApiClient.convertToType(data['rate'], 'String');
}
if (data.hasOwnProperty('applied')) {
obj['applied'] = ApiClient.convertToType(data['applied'], 'Boolean');
}
if (data.hasOwnProperty('exemptionCode')) {
obj['exemptionCode'] = ApiClient.convertToType(data['exemptionCode'], 'String');
}
if (data.hasOwnProperty('taxType')) {
obj['taxType'] = ApiClient.convertToType(data['taxType'], 'String');
}
if (data.hasOwnProperty('taxSummary')) {
obj['taxSummary'] = ApiClient.convertToType(data['taxSummary'], 'String');
}
}
return obj;
}
/**
* Indicates the amount of tax based on the `type` field as described in the table below:
* @member {String} amount
*/
exports.prototype['amount'] = undefined;
/**
* Rate of VAT or other tax for the order. Example 0.040 (=4%) Valid range: 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated)
* @member {String} rate
*/
exports.prototype['rate'] = undefined;
/**
* Flag that indicates whether the tax amount (`travelInformation.autoRental.taxDetails.amount`) is included in the request. Possible values: - `false`: tax amount is not included in the request. - `true`: tax amount is included in the request.
* @member {Boolean} applied
*/
exports.prototype['applied'] = undefined;
/**
* Status code for exemption from sales and use tax. This field is a pass-through, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor.
* @member {String} exemptionCode
*/
exports.prototype['exemptionCode'] = undefined;
/**
* Different taxes the rental agency applies to the rental agreement such as tourist tax, airport tax, or rental tax.
* @member {String} taxType
*/
exports.prototype['taxType'] = undefined;
/**
* Summary of all tax types
* @member {String} taxSummary
*/
exports.prototype['taxSummary'] = undefined;
return exports;
}));