Source: payments/AdditionalChargeAmount.js

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

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

/**
* @constructor
* @memberof payments
*/
var AdditionalChargeAmount = function() {
  this._class_ = AdditionalChargeAmount;
  this.id = undefined;
  this.amount = undefined;
  this.type = undefined;
  this.payment = undefined;
  this.refund = undefined;
};


/**
* Set the field value
* Additional charge id
*
* @memberof payments.AdditionalChargeAmount
* @param {String} id 
*/
AdditionalChargeAmount.prototype.setId = function(id) {
  this.id = id;
};

/**
* Get the field value
* Additional charge id
* @memberof payments.AdditionalChargeAmount
* @return {String} 
*/
AdditionalChargeAmount.prototype.getId = function() {
  return this.id;
};

/**
* Set the field value
* Amount of the additional charge
*
* @memberof payments.AdditionalChargeAmount
* @param {Number} amount must be a long integer
*/
AdditionalChargeAmount.prototype.setAmount = function(amount) {
  this.amount = amount;
};

/**
* Get the field value
* Amount of the additional charge
* @memberof payments.AdditionalChargeAmount
* @return {Number} must be a long integer
*/
AdditionalChargeAmount.prototype.getAmount = function() {
  return this.amount;
};

/**
* Set the field value
* The type of additional charge
*
* @memberof payments.AdditionalChargeAmount
* @param {payments.AdditionalChargeType} type 
*/
AdditionalChargeAmount.prototype.setType = function(type) {
  this.type = type;
};

/**
* Get the field value
* The type of additional charge
* @memberof payments.AdditionalChargeAmount
* @return {payments.AdditionalChargeType} 
*/
AdditionalChargeAmount.prototype.getType = function() {
  return this.type;
};

/**
* Set the field value
* Reference to the payment the additional charge belongs to
*
* @memberof payments.AdditionalChargeAmount
* @param {base.Reference} payment 
*/
AdditionalChargeAmount.prototype.setPayment = function(payment) {
  this.payment = payment;
};

/**
* Get the field value
* Reference to the payment the additional charge belongs to
* @memberof payments.AdditionalChargeAmount
* @return {base.Reference} 
*/
AdditionalChargeAmount.prototype.getPayment = function() {
  return this.payment;
};

/**
* Set the field value
* Reference to the payment the additional charge belongs to
*
* @memberof payments.AdditionalChargeAmount
* @param {base.Reference} refund 
*/
AdditionalChargeAmount.prototype.setRefund = function(refund) {
  this.refund = refund;
};

/**
* Get the field value
* Reference to the payment the additional charge belongs to
* @memberof payments.AdditionalChargeAmount
* @return {base.Reference} 
*/
AdditionalChargeAmount.prototype.getRefund = function() {
  return this.refund;
};

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

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

AdditionalChargeAmount._meta_ =  {fields:  {}};
AdditionalChargeAmount._meta_._class_ =  AdditionalChargeAmount;
AdditionalChargeAmount._meta_.fields["id"] = {};
AdditionalChargeAmount._meta_.fields["id"].type = String;
AdditionalChargeAmount._meta_.fields["amount"] = {};
AdditionalChargeAmount._meta_.fields["amount"].type = Number;
AdditionalChargeAmount._meta_.fields["type"] = {};
AdditionalChargeAmount._meta_.fields["type"].type = payments_AdditionalChargeType;
AdditionalChargeAmount._meta_.fields["payment"] = {};
AdditionalChargeAmount._meta_.fields["payment"].type = base_Reference;
AdditionalChargeAmount._meta_.fields["refund"] = {};
AdditionalChargeAmount._meta_.fields["refund"].type = base_Reference;

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