cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
122 lines (101 loc) • 4.25 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.InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels = factory(root.CyberSource.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels model module.
* @module model/InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels
* @version 0.0.1
*/
/**
* Constructs a new <code>InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels</code>.
* @alias module:model/InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels</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/InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels} obj Optional instance to populate.
* @return {module:model/InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels} The populated <code>InvoicingV2InvoicesPost201ResponseInvoiceInformationCustomLabels</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('key')) {
obj['key'] = ApiClient.convertToType(data['key'], 'String');
}
if (data.hasOwnProperty('value')) {
obj['value'] = ApiClient.convertToType(data['value'], 'String');
}
if (data.hasOwnProperty('hidden')) {
obj['hidden'] = ApiClient.convertToType(data['hidden'], 'Boolean');
}
if (data.hasOwnProperty('hiddenForInvoice')) {
obj['hiddenForInvoice'] = ApiClient.convertToType(data['hiddenForInvoice'], 'Boolean');
}
if (data.hasOwnProperty('hiddenForItem')) {
obj['hiddenForItem'] = ApiClient.convertToType(data['hiddenForItem'], 'Boolean');
}
}
return obj;
}
/**
* The invoice field key. Possible values: - billTo - invoiceNumber - customerId - companyName - description - shipping - partialPayment - discount - tax
* @member {String} key
*/
exports.prototype['key'] = undefined;
/**
* The new (overridden) field name
* @member {String} value
*/
exports.prototype['value'] = undefined;
/**
* Hides the specified field. This field is applicable for keys: - customerId - companyName - description - shipping - partialPayment
* @member {Boolean} hidden
* @default false
*/
exports.prototype['hidden'] = false;
/**
* Hides the field at invoice level. This field is applicable for keys: - discount - tax
* @member {Boolean} hiddenForInvoice
* @default false
*/
exports.prototype['hiddenForInvoice'] = false;
/**
* Hides the field at invoice item level. This field is applicable for keys: - discount - tax
* @member {Boolean} hiddenForItem
* @default false
*/
exports.prototype['hiddenForItem'] = false;
return exports;
}));