Source: customers/CustomerAssociationRequest.js

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

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

/** CustomerAssociationRequest will be used in case of creating the customer and associating customer with order when paymentRef is passed or create the customer when the tokenRef is passed. */
/**
* @constructor
* @memberof customers
*/
var CustomerAssociationRequest = function() {
  this._class_ = CustomerAssociationRequest;
  this.paymentRef = undefined;
  this.tokenRequestRef = undefined;
  this.customer = undefined;
};


/**
* Set the field value
* Payment UUID needs to be passed to create the customer if card transaction is performed and will be used to fetch the payment details.
*
* @memberof customers.CustomerAssociationRequest
* @param {base.Reference} paymentRef 
*/
CustomerAssociationRequest.prototype.setPaymentRef = function(paymentRef) {
  this.paymentRef = paymentRef;
};

/**
* Get the field value
* Payment UUID needs to be passed to create the customer if card transaction is performed and will be used to fetch the payment details.
* @memberof customers.CustomerAssociationRequest
* @return {base.Reference} 
*/
CustomerAssociationRequest.prototype.getPaymentRef = function() {
  return this.paymentRef;
};

/**
* Set the field value
* Token UUID needs to be passed if Customer is getting created after the token request or card verification request.
*
* @memberof customers.CustomerAssociationRequest
* @param {base.Reference} tokenRequestRef 
*/
CustomerAssociationRequest.prototype.setTokenRequestRef = function(tokenRequestRef) {
  this.tokenRequestRef = tokenRequestRef;
};

/**
* Get the field value
* Token UUID needs to be passed if Customer is getting created after the token request or card verification request.
* @memberof customers.CustomerAssociationRequest
* @return {base.Reference} 
*/
CustomerAssociationRequest.prototype.getTokenRequestRef = function() {
  return this.tokenRequestRef;
};

/**
* Set the field value
* Customer Object which will contain the First Name and the Last Name of the Customer.
*
* @memberof customers.CustomerAssociationRequest
* @param {customers.Customer} customer 
*/
CustomerAssociationRequest.prototype.setCustomer = function(customer) {
  this.customer = customer;
};

/**
* Get the field value
* Customer Object which will contain the First Name and the Last Name of the Customer.
* @memberof customers.CustomerAssociationRequest
* @return {customers.Customer} 
*/
CustomerAssociationRequest.prototype.getCustomer = function() {
  return this.customer;
};

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

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

CustomerAssociationRequest._meta_ =  {fields:  {}};
CustomerAssociationRequest._meta_._class_ =  CustomerAssociationRequest;
CustomerAssociationRequest._meta_.fields["paymentRef"] = {};
CustomerAssociationRequest._meta_.fields["paymentRef"].type = base_Reference;
CustomerAssociationRequest._meta_.fields["tokenRequestRef"] = {};
CustomerAssociationRequest._meta_.fields["tokenRequestRef"].type = base_Reference;
CustomerAssociationRequest._meta_.fields["customer"] = {};
CustomerAssociationRequest._meta_.fields["customer"].type = customers_Customer;

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