Source: order/DisplayOrder.js

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

var order_DisplayPayment = require("../order/DisplayPayment");
var order_DisplayDiscount = require("../order/DisplayDiscount");
var order_DisplayLineItem = require("../order/DisplayLineItem");

/**
* @constructor
* @memberof order
*/
var DisplayOrder = function() {
  this._class_ = DisplayOrder;
  this.id = undefined;
  this.currency = undefined;
  this.employee = undefined;
  this.subtotal = undefined;
  this.tax = undefined;
  this.total = undefined;
  this.title = undefined;
  this.note = undefined;
  this.isVat = undefined;
  this.serviceChargeName = undefined;
  this.serviceChargeAmount = undefined;
  this.discounts = undefined;
  this.lineItems = undefined;
  this.amountRemaining = undefined;
  this.payments = undefined;
};


/**
* Set the field value
* Unique identifier
*
* @memberof order.DisplayOrder
* @param {String} id 
*/
DisplayOrder.prototype.setId = function(id) {
  this.id = id;
};

/**
* Get the field value
* Unique identifier
* @memberof order.DisplayOrder
* @return {String} 
*/
DisplayOrder.prototype.getId = function() {
  return this.id;
};

/**
* Set the field value
* Currency of this order
*
* @memberof order.DisplayOrder
* @param {String} currency 
*/
DisplayOrder.prototype.setCurrency = function(currency) {
  this.currency = currency;
};

/**
* Get the field value
* Currency of this order
* @memberof order.DisplayOrder
* @return {String} 
*/
DisplayOrder.prototype.getCurrency = function() {
  return this.currency;
};

/**
* Set the field value
* The employee associated with this order
*
* @memberof order.DisplayOrder
* @param {String} employee 
*/
DisplayOrder.prototype.setEmployee = function(employee) {
  this.employee = employee;
};

/**
* Get the field value
* The employee associated with this order
* @memberof order.DisplayOrder
* @return {String} 
*/
DisplayOrder.prototype.getEmployee = function() {
  return this.employee;
};

/**
* Set the field value
* Formatted subtotal of the order
*
* @memberof order.DisplayOrder
* @param {String} subtotal 
*/
DisplayOrder.prototype.setSubtotal = function(subtotal) {
  this.subtotal = subtotal;
};

/**
* Get the field value
* Formatted subtotal of the order
* @memberof order.DisplayOrder
* @return {String} 
*/
DisplayOrder.prototype.getSubtotal = function() {
  return this.subtotal;
};

/**
* Set the field value
* Formatted tax of the order
*
* @memberof order.DisplayOrder
* @param {String} tax 
*/
DisplayOrder.prototype.setTax = function(tax) {
  this.tax = tax;
};

/**
* Get the field value
* Formatted tax of the order
* @memberof order.DisplayOrder
* @return {String} 
*/
DisplayOrder.prototype.getTax = function() {
  return this.tax;
};

/**
* Set the field value
* Formatted total of the order
*
* @memberof order.DisplayOrder
* @param {String} total 
*/
DisplayOrder.prototype.setTotal = function(total) {
  this.total = total;
};

/**
* Get the field value
* Formatted total of the order
* @memberof order.DisplayOrder
* @return {String} 
*/
DisplayOrder.prototype.getTotal = function() {
  return this.total;
};

/**
* Set the field value
* @memberof order.DisplayOrder
* @param {Null|String} title 
*/
DisplayOrder.prototype.setTitle = function(title) {
  this.title = title;
};

/**
* Get the field value
* @memberof order.DisplayOrder
* @return {Null|String} 
*/
DisplayOrder.prototype.getTitle = function() {
  return this.title;
};

/**
* Set the field value
* @memberof order.DisplayOrder
* @param {Null|String} note 
*/
DisplayOrder.prototype.setNote = function(note) {
  this.note = note;
};

/**
* Get the field value
* @memberof order.DisplayOrder
* @return {Null|String} 
*/
DisplayOrder.prototype.getNote = function() {
  return this.note;
};

/**
* Set the field value
* This order was created by merchant with VAT enabled.
*
* @memberof order.DisplayOrder
* @param {Boolean} isVat 
*/
DisplayOrder.prototype.setIsVat = function(isVat) {
  this.isVat = isVat;
};

/**
* Get the field value
* This order was created by merchant with VAT enabled.
* @memberof order.DisplayOrder
* @return {Boolean} 
*/
DisplayOrder.prototype.getIsVat = function() {
  return this.isVat;
};

/**
* Set the field value
* Optional service charge name (gratuity) applied to this order
*
* @memberof order.DisplayOrder
* @param {Null|String} serviceChargeName 
*/
DisplayOrder.prototype.setServiceChargeName = function(serviceChargeName) {
  this.serviceChargeName = serviceChargeName;
};

/**
* Get the field value
* Optional service charge name (gratuity) applied to this order
* @memberof order.DisplayOrder
* @return {Null|String} 
*/
DisplayOrder.prototype.getServiceChargeName = function() {
  return this.serviceChargeName;
};

/**
* Set the field value
* Optional service charge amount (gratuity) applied to this order
*
* @memberof order.DisplayOrder
* @param {Null|String} serviceChargeAmount 
*/
DisplayOrder.prototype.setServiceChargeAmount = function(serviceChargeAmount) {
  this.serviceChargeAmount = serviceChargeAmount;
};

/**
* Get the field value
* Optional service charge amount (gratuity) applied to this order
* @memberof order.DisplayOrder
* @return {Null|String} 
*/
DisplayOrder.prototype.getServiceChargeAmount = function() {
  return this.serviceChargeAmount;
};

/**
* Set the field value
* @memberof order.DisplayOrder
* @param {Array.<order.DisplayDiscount>} discounts An array of 
*/
DisplayOrder.prototype.setDiscounts = function(discounts) {
  this.discounts = discounts;
};

/**
* Get the field value
* @memberof order.DisplayOrder
* @return {Array.<order.DisplayDiscount>} An array of 
*/
DisplayOrder.prototype.getDiscounts = function() {
  return this.discounts;
};

/**
* Set the field value
* @memberof order.DisplayOrder
* @param {Array.<order.DisplayLineItem>} lineItems An array of 
*/
DisplayOrder.prototype.setLineItems = function(lineItems) {
  this.lineItems = lineItems;
};

/**
* Get the field value
* @memberof order.DisplayOrder
* @return {Array.<order.DisplayLineItem>} An array of 
*/
DisplayOrder.prototype.getLineItems = function() {
  return this.lineItems;
};

/**
* Set the field value
* Formatted amount remaining
*
* @memberof order.DisplayOrder
* @param {String} amountRemaining 
*/
DisplayOrder.prototype.setAmountRemaining = function(amountRemaining) {
  this.amountRemaining = amountRemaining;
};

/**
* Get the field value
* Formatted amount remaining
* @memberof order.DisplayOrder
* @return {String} 
*/
DisplayOrder.prototype.getAmountRemaining = function() {
  return this.amountRemaining;
};

/**
* Set the field value
* Payments that were made for this order
*
* @memberof order.DisplayOrder
* @param {Array.<order.DisplayPayment>} payments An array of 
*/
DisplayOrder.prototype.setPayments = function(payments) {
  this.payments = payments;
};

/**
* Get the field value
* Payments that were made for this order
* @memberof order.DisplayOrder
* @return {Array.<order.DisplayPayment>} An array of 
*/
DisplayOrder.prototype.getPayments = function() {
  return this.payments;
};

/**
* @memberof order.DisplayOrder
* @private
*/
DisplayOrder.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;
};

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

DisplayOrder._meta_ =  {fields:  {}};
DisplayOrder._meta_._class_ =  DisplayOrder;
DisplayOrder._meta_.fields["id"] = {};
DisplayOrder._meta_.fields["id"].type = String;
DisplayOrder._meta_.fields["currency"] = {};
DisplayOrder._meta_.fields["currency"].type = String;
DisplayOrder._meta_.fields["employee"] = {};
DisplayOrder._meta_.fields["employee"].type = String;
DisplayOrder._meta_.fields["subtotal"] = {};
DisplayOrder._meta_.fields["subtotal"].type = String;
DisplayOrder._meta_.fields["tax"] = {};
DisplayOrder._meta_.fields["tax"].type = String;
DisplayOrder._meta_.fields["total"] = {};
DisplayOrder._meta_.fields["total"].type = String;
DisplayOrder._meta_.fields["title"] = {};
DisplayOrder._meta_.fields["title"].type = String;
DisplayOrder._meta_.fields["note"] = {};
DisplayOrder._meta_.fields["note"].type = String;
DisplayOrder._meta_.fields["isVat"] = {};
DisplayOrder._meta_.fields["isVat"].type = Boolean;
DisplayOrder._meta_.fields["serviceChargeName"] = {};
DisplayOrder._meta_.fields["serviceChargeName"].type = String;
DisplayOrder._meta_.fields["serviceChargeAmount"] = {};
DisplayOrder._meta_.fields["serviceChargeAmount"].type = String;
DisplayOrder._meta_.fields["discounts"] = {};
DisplayOrder._meta_.fields["discounts"].type = Array;
DisplayOrder._meta_.fields["discounts"].elementType = order_DisplayDiscount;
DisplayOrder._meta_.fields["lineItems"] = {};
DisplayOrder._meta_.fields["lineItems"].type = Array;
DisplayOrder._meta_.fields["lineItems"].elementType = order_DisplayLineItem;
DisplayOrder._meta_.fields["amountRemaining"] = {};
DisplayOrder._meta_.fields["amountRemaining"].type = String;
DisplayOrder._meta_.fields["payments"] = {};
DisplayOrder._meta_.fields["payments"].type = Array;
DisplayOrder._meta_.fields["payments"].elementType = order_DisplayPayment;

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