Source: inventory/TaxRate.js

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */

var base_Reference = require("../base/Reference");

/**
* @constructor
* @memberof inventory
*/
var TaxRate = function() {
  this._class_ = TaxRate;
  this.id = undefined;
  this.lineItemRef = undefined;
  this.name = undefined;
  this.rate = undefined;
  this.isDefault = undefined;
  this.items = undefined;
};


/**
* Set the field value
* @memberof inventory.TaxRate
* @param {String} id 
*/
TaxRate.prototype.setId = function(id) {
  this.id = id;
};

/**
* Get the field value
* @memberof inventory.TaxRate
* @return {String} 
*/
TaxRate.prototype.getId = function() {
  return this.id;
};

/**
* Set the field value
* The line item with which the tax rate is associated
*
* @memberof inventory.TaxRate
* @param {base.Reference} lineItemRef 
*/
TaxRate.prototype.setLineItemRef = function(lineItemRef) {
  this.lineItemRef = lineItemRef;
};

/**
* Get the field value
* The line item with which the tax rate is associated
* @memberof inventory.TaxRate
* @return {base.Reference} 
*/
TaxRate.prototype.getLineItemRef = function() {
  return this.lineItemRef;
};

/**
* Set the field value
* @memberof inventory.TaxRate
* @param {String} name 
*/
TaxRate.prototype.setName = function(name) {
  this.name = name;
};

/**
* Get the field value
* @memberof inventory.TaxRate
* @return {String} 
*/
TaxRate.prototype.getName = function() {
  return this.name;
};

/**
* Set the field value
* @memberof inventory.TaxRate
* @param {Number} rate must be a long integer
*/
TaxRate.prototype.setRate = function(rate) {
  this.rate = rate;
};

/**
* Get the field value
* @memberof inventory.TaxRate
* @return {Number} must be a long integer
*/
TaxRate.prototype.getRate = function() {
  return this.rate;
};

/**
* Set the field value
* @memberof inventory.TaxRate
* @param {Boolean} isDefault 
*/
TaxRate.prototype.setIsDefault = function(isDefault) {
  this.isDefault = isDefault;
};

/**
* Get the field value
* @memberof inventory.TaxRate
* @return {Boolean} 
*/
TaxRate.prototype.getIsDefault = function() {
  return this.isDefault;
};

/**
* Set the field value
* Items associated with this tax rate
*
* @memberof inventory.TaxRate
* @param {Array.<base.Reference>} items An array of 
*/
TaxRate.prototype.setItems = function(items) {
  this.items = items;
};

/**
* Get the field value
* Items associated with this tax rate
* @memberof inventory.TaxRate
* @return {Array.<base.Reference>} An array of 
*/
TaxRate.prototype.getItems = function() {
  return this.items;
};

/**
* @memberof inventory.TaxRate
* @private
*/
TaxRate.prototype.getMetaInfo = function(fieldName) {
  var curclass = this._class_;
  do {
    var fieldMetaInfo = curclass._meta_.fields[fieldName];
    if(fieldMetaInfo) {
      return fieldMetaInfo;
    }
    if(curclass._meta_._superMeta_) {
      curclass = curclass._meta_._superMeta_._class_;
    } else {
      curclass = null;
    }
  } while(curclass);
  return null;
};

TaxRate.prototype.toString = function() {
  return JSON.stringify(this);
};

TaxRate._meta_ =  {fields:  {}};
TaxRate._meta_._class_ =  TaxRate;
TaxRate._meta_.fields["id"] = {};
TaxRate._meta_.fields["id"].type = String;
TaxRate._meta_.fields["lineItemRef"] = {};
TaxRate._meta_.fields["lineItemRef"].type = base_Reference;
TaxRate._meta_.fields["name"] = {};
TaxRate._meta_.fields["name"].type = String;
TaxRate._meta_.fields["rate"] = {};
TaxRate._meta_.fields["rate"].type = Number;
TaxRate._meta_.fields["isDefault"] = {};
TaxRate._meta_.fields["isDefault"].type = Boolean;
TaxRate._meta_.fields["items"] = {};
TaxRate._meta_.fields["items"].type = Array;
TaxRate._meta_.fields["items"].elementType = base_Reference;

//
// Expose the module.
//
if ('undefined' !== typeof module) {
module.exports = TaxRate;
}