/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
var customers_Customer = require("../customers/Customer");
/** @deprecated *Use CustomerInfo instead* Represents a customer that is linked to an external system. This customer may be persisted in Clover, or it may not. */
/**
* @constructor
* @memberof customers
*/
var RemoteCustomer = function() {
this._class_ = RemoteCustomer;
this.customer = undefined;
this.displayString = undefined;
this.externalId = undefined;
this.externalSystemName = undefined;
this.extras = undefined;
};
/**
* Set the field value
* The customer object that Clover uses. This is the base model for a Clover customer, any additional information external systems need should exist in other fields
*
* @memberof customers.RemoteCustomer
* @param {customers.Customer} customer
*/
RemoteCustomer.prototype.setCustomer = function(customer) {
this.customer = customer;
};
/**
* Get the field value
* The customer object that Clover uses. This is the base model for a Clover customer, any additional information external systems need should exist in other fields
* @memberof customers.RemoteCustomer
* @return {customers.Customer}
*/
RemoteCustomer.prototype.getCustomer = function() {
return this.customer;
};
/**
* Set the field value
* A custom way to display this customer for an external system
*
* @memberof customers.RemoteCustomer
* @param {String} displayString
*/
RemoteCustomer.prototype.setDisplayString = function(displayString) {
this.displayString = displayString;
};
/**
* Get the field value
* A custom way to display this customer for an external system
* @memberof customers.RemoteCustomer
* @return {String}
*/
RemoteCustomer.prototype.getDisplayString = function() {
return this.displayString;
};
/**
* Set the field value
* an id for an external system to use to reference this Customer.
*
* @memberof customers.RemoteCustomer
* @param {String} externalId
*/
RemoteCustomer.prototype.setExternalId = function(externalId) {
this.externalId = externalId;
};
/**
* Get the field value
* an id for an external system to use to reference this Customer.
* @memberof customers.RemoteCustomer
* @return {String}
*/
RemoteCustomer.prototype.getExternalId = function() {
return this.externalId;
};
/**
* Set the field value
* The name of the external system that 'owns' this. It is the system that understands the link from the externalId to the Customer.
*
* @memberof customers.RemoteCustomer
* @param {String} externalSystemName
*/
RemoteCustomer.prototype.setExternalSystemName = function(externalSystemName) {
this.externalSystemName = externalSystemName;
};
/**
* Get the field value
* The name of the external system that 'owns' this. It is the system that understands the link from the externalId to the Customer.
* @memberof customers.RemoteCustomer
* @return {String}
*/
RemoteCustomer.prototype.getExternalSystemName = function() {
return this.externalSystemName;
};
/**
* Set the field value
* Extra data used by external systems.
*
* @memberof customers.RemoteCustomer
* @param {Object.<String,String>} extras A map of <String> to <>
*/
RemoteCustomer.prototype.setExtras = function(extras) {
this.extras = extras;
};
/**
* Get the field value
* Extra data used by external systems.
* @memberof customers.RemoteCustomer
* @return {Object.<String,String>} A map of <String> to <>
*/
RemoteCustomer.prototype.getExtras = function() {
return this.extras;
};
/**
* @memberof customers.RemoteCustomer
* @private
*/
RemoteCustomer.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;
};
RemoteCustomer.prototype.toString = function() {
return JSON.stringify(this);
};
RemoteCustomer._meta_ = {fields: {}};
RemoteCustomer._meta_._class_ = RemoteCustomer;
RemoteCustomer._meta_.fields["customer"] = {};
RemoteCustomer._meta_.fields["customer"].type = customers_Customer;
RemoteCustomer._meta_.fields["displayString"] = {};
RemoteCustomer._meta_.fields["displayString"].type = String;
RemoteCustomer._meta_.fields["externalId"] = {};
RemoteCustomer._meta_.fields["externalId"].type = String;
RemoteCustomer._meta_.fields["externalSystemName"] = {};
RemoteCustomer._meta_.fields["externalSystemName"].type = String;
RemoteCustomer._meta_.fields["extras"] = {};
RemoteCustomer._meta_.fields["extras"].type = Object;
//
// Expose the module.
//
if ('undefined' !== typeof module) {
module.exports = RemoteCustomer;
}