cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
155 lines (130 loc) • 5.78 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.VasV2PaymentsPost201ResponseOrderInformationJurisdiction = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The VasV2PaymentsPost201ResponseOrderInformationJurisdiction model module.
* @module model/VasV2PaymentsPost201ResponseOrderInformationJurisdiction
* @version 0.0.1
*/
/**
* Constructs a new <code>VasV2PaymentsPost201ResponseOrderInformationJurisdiction</code>.
* @alias module:model/VasV2PaymentsPost201ResponseOrderInformationJurisdiction
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>VasV2PaymentsPost201ResponseOrderInformationJurisdiction</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/VasV2PaymentsPost201ResponseOrderInformationJurisdiction} obj Optional instance to populate.
* @return {module:model/VasV2PaymentsPost201ResponseOrderInformationJurisdiction} The populated <code>VasV2PaymentsPost201ResponseOrderInformationJurisdiction</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String');
}
if (data.hasOwnProperty('taxName')) {
obj['taxName'] = ApiClient.convertToType(data['taxName'], 'String');
}
if (data.hasOwnProperty('taxAmount')) {
obj['taxAmount'] = ApiClient.convertToType(data['taxAmount'], 'String');
}
if (data.hasOwnProperty('taxable')) {
obj['taxable'] = ApiClient.convertToType(data['taxable'], 'String');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('code')) {
obj['code'] = ApiClient.convertToType(data['code'], 'String');
}
if (data.hasOwnProperty('rate')) {
obj['rate'] = ApiClient.convertToType(data['rate'], 'String');
}
if (data.hasOwnProperty('region')) {
obj['region'] = ApiClient.convertToType(data['region'], 'String');
}
if (data.hasOwnProperty('country')) {
obj['country'] = ApiClient.convertToType(data['country'], 'String');
}
}
return obj;
}
/**
* Type of tax jurisdiction for the item. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`. Possible values: - `city` - `county` - `state` - `country` - `special`
* @member {String} type
*/
exports.prototype['type'] = undefined;
/**
* Name of the jurisdiction tax for the item. For example, CA State Tax. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`.
* @member {String} taxName
*/
exports.prototype['taxName'] = undefined;
/**
* Jurisdiction tax amount for the item. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`.
* @member {String} taxAmount
*/
exports.prototype['taxAmount'] = undefined;
/**
* Jurisdiction taxable amount for the item, not including product level exemptions. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`.
* @member {String} taxable
*/
exports.prototype['taxable'] = undefined;
/**
* Free-text description of the jurisdiction for the item. For example, San Mateo County. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`.
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
* Jurisdiction code assigned by the tax provider. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`.
* @member {String} code
*/
exports.prototype['code'] = undefined;
/**
* Jurisdiction tax rate for the item. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`.
* @member {String} rate
*/
exports.prototype['rate'] = undefined;
/**
* Free-text description of the jurisdiction region for the item. For example, CA (California State) or GB (Great Britain). Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`.
* @member {String} region
*/
exports.prototype['region'] = undefined;
/**
* Tax jurisdiction country for the item. Returned only if the `taxInformation.showTaxPerLineItem` field is set to `Yes`.
* @member {String} country
*/
exports.prototype['country'] = undefined;
return exports;
}));