Source: payments/CardlessPaymentData.js

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

var payments_CardlessPaymentDataType = require("../payments/CardlessPaymentDataType");
var payments_CardlessPaymentNetwork = require("../payments/CardlessPaymentNetwork");

/** Data for a payment that is processed using a QR code or barcode. */
/**
* @constructor
* @memberof payments
*/
var CardlessPaymentData = function() {
  this._class_ = CardlessPaymentData;
  this.paymentNetwork = undefined;
  this.paymentType = undefined;
  this.paymentData = undefined;
};


/**
* Set the field value
* Payment network
*
* @memberof payments.CardlessPaymentData
* @param {payments.CardlessPaymentNetwork} paymentNetwork 
*/
CardlessPaymentData.prototype.setPaymentNetwork = function(paymentNetwork) {
  this.paymentNetwork = paymentNetwork;
};

/**
* Get the field value
* Payment network
* @memberof payments.CardlessPaymentData
* @return {payments.CardlessPaymentNetwork} 
*/
CardlessPaymentData.prototype.getPaymentNetwork = function() {
  return this.paymentNetwork;
};

/**
* Set the field value
* Payment method
*
* @memberof payments.CardlessPaymentData
* @param {payments.CardlessPaymentDataType} paymentType 
*/
CardlessPaymentData.prototype.setPaymentType = function(paymentType) {
  this.paymentType = paymentType;
};

/**
* Get the field value
* Payment method
* @memberof payments.CardlessPaymentData
* @return {payments.CardlessPaymentDataType} 
*/
CardlessPaymentData.prototype.getPaymentType = function() {
  return this.paymentType;
};

/**
* Set the field value
* QR code or barcode data
*
* @memberof payments.CardlessPaymentData
* @param {String} paymentData 
*/
CardlessPaymentData.prototype.setPaymentData = function(paymentData) {
  this.paymentData = paymentData;
};

/**
* Get the field value
* QR code or barcode data
* @memberof payments.CardlessPaymentData
* @return {String} 
*/
CardlessPaymentData.prototype.getPaymentData = function() {
  return this.paymentData;
};

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

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

CardlessPaymentData._meta_ =  {fields:  {}};
CardlessPaymentData._meta_._class_ =  CardlessPaymentData;
CardlessPaymentData._meta_.fields["paymentNetwork"] = {};
CardlessPaymentData._meta_.fields["paymentNetwork"].type = payments_CardlessPaymentNetwork;
CardlessPaymentData._meta_.fields["paymentType"] = {};
CardlessPaymentData._meta_.fields["paymentType"].type = payments_CardlessPaymentDataType;
CardlessPaymentData._meta_.fields["paymentData"] = {};
CardlessPaymentData._meta_.fields["paymentData"].type = String;

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