/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
var device_BuildType = require("../device/BuildType");
var base_Reference = require("../base/Reference");
/**
* @constructor
* @memberof device
*/
var Device = function() {
this._class_ = Device;
this.id = undefined;
this.name = undefined;
this.model = undefined;
this.merchant = undefined;
this.orderPrefix = undefined;
this.terminalPrefix = undefined;
this.serial = undefined;
this.buildNumber = undefined;
this.secureId = undefined;
this.buildType = undefined;
this.cpuId = undefined;
this.imei = undefined;
this.imsi = undefined;
this.simIccid = undefined;
this.deviceCertificate = undefined;
this.pedCertificate = undefined;
this.deviceTypeName = undefined;
this.pinDisabled = false;
this.offlinePayments = false;
this.offlinePaymentsAll = false;
this.offlinePaymentsLimit = undefined;
this.offlinePaymentsPromptThreshold = undefined;
this.offlinePaymentsTotalPaymentsLimit = undefined;
this.offlinePaymentsLimitDefault = undefined;
this.offlinePaymentsPromptThresholdDefault = undefined;
this.offlinePaymentsTotalPaymentsLimitDefault = undefined;
this.offlinePaymentsMaxLimit = undefined;
this.offlinePaymentsMaxTotalPaymentsLimit = undefined;
this.showOfflinePayments = undefined;
this.maxOfflineDays = undefined;
this.allowStoreAndForward = undefined;
this.secureReports = undefined;
};
/**
* Set the field value
* Unique identifier
*
* @memberof device.Device
* @param {String} id
*/
Device.prototype.setId = function(id) {
this.id = id;
};
/**
* Get the field value
* Unique identifier
* @memberof device.Device
* @return {String}
*/
Device.prototype.getId = function() {
return this.id;
};
/**
* Set the field value
* Name of the device (if entered)
*
* @memberof device.Device
* @param {String} name
*/
Device.prototype.setName = function(name) {
this.name = name;
};
/**
* Get the field value
* Name of the device (if entered)
* @memberof device.Device
* @return {String}
*/
Device.prototype.getName = function() {
return this.name;
};
/**
* Set the field value
* @memberof device.Device
* @param {String} model
*/
Device.prototype.setModel = function(model) {
this.model = model;
};
/**
* Get the field value
* @memberof device.Device
* @return {String}
*/
Device.prototype.getModel = function() {
return this.model;
};
/**
* Set the field value
* @memberof device.Device
* @param {base.Reference} merchant
*/
Device.prototype.setMerchant = function(merchant) {
this.merchant = merchant;
};
/**
* Get the field value
* @memberof device.Device
* @return {base.Reference}
*/
Device.prototype.getMerchant = function() {
return this.merchant;
};
/**
* Set the field value
* A prefix that will be applied to order numbers. This is useful if the merchant and/or customer needs to track which device an order came from.
*
* @memberof device.Device
* @param {String} orderPrefix
*/
Device.prototype.setOrderPrefix = function(orderPrefix) {
this.orderPrefix = orderPrefix;
};
/**
* Get the field value
* A prefix that will be applied to order numbers. This is useful if the merchant and/or customer needs to track which device an order came from.
* @memberof device.Device
* @return {String}
*/
Device.prototype.getOrderPrefix = function() {
return this.orderPrefix;
};
/**
* Set the field value
* @memberof device.Device
* @param {Null|Number} terminalPrefix must be an integer
*/
Device.prototype.setTerminalPrefix = function(terminalPrefix) {
this.terminalPrefix = terminalPrefix;
};
/**
* Get the field value
* @memberof device.Device
* @return {Null|Number} must be an integer
*/
Device.prototype.getTerminalPrefix = function() {
return this.terminalPrefix;
};
/**
* Set the field value
* The device's serial number.
*
* @memberof device.Device
* @param {String} serial
*/
Device.prototype.setSerial = function(serial) {
this.serial = serial;
};
/**
* Get the field value
* The device's serial number.
* @memberof device.Device
* @return {String}
*/
Device.prototype.getSerial = function() {
return this.serial;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} buildNumber must be a long integer
*/
Device.prototype.setBuildNumber = function(buildNumber) {
this.buildNumber = buildNumber;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getBuildNumber = function() {
return this.buildNumber;
};
/**
* Set the field value
* @memberof device.Device
* @param {String} secureId
*/
Device.prototype.setSecureId = function(secureId) {
this.secureId = secureId;
};
/**
* Get the field value
* @memberof device.Device
* @return {String}
*/
Device.prototype.getSecureId = function() {
return this.secureId;
};
/**
* Set the field value
* @memberof device.Device
* @param {device.BuildType} buildType
*/
Device.prototype.setBuildType = function(buildType) {
this.buildType = buildType;
};
/**
* Get the field value
* @memberof device.Device
* @return {device.BuildType}
*/
Device.prototype.getBuildType = function() {
return this.buildType;
};
/**
* Set the field value
* @memberof device.Device
* @param {String} cpuId
*/
Device.prototype.setCpuId = function(cpuId) {
this.cpuId = cpuId;
};
/**
* Get the field value
* @memberof device.Device
* @return {String}
*/
Device.prototype.getCpuId = function() {
return this.cpuId;
};
/**
* Set the field value
* The IMEI of the device
*
* @memberof device.Device
* @param {String} imei
*/
Device.prototype.setImei = function(imei) {
this.imei = imei;
};
/**
* Get the field value
* The IMEI of the device
* @memberof device.Device
* @return {String}
*/
Device.prototype.getImei = function() {
return this.imei;
};
/**
* Set the field value
* The IMSI of the SIM in the device (if present)
*
* @memberof device.Device
* @param {String} imsi
*/
Device.prototype.setImsi = function(imsi) {
this.imsi = imsi;
};
/**
* Get the field value
* The IMSI of the SIM in the device (if present)
* @memberof device.Device
* @return {String}
*/
Device.prototype.getImsi = function() {
return this.imsi;
};
/**
* Set the field value
* The ICCID of the SIM in the device (if present)
*
* @memberof device.Device
* @param {String} simIccid
*/
Device.prototype.setSimIccid = function(simIccid) {
this.simIccid = simIccid;
};
/**
* Get the field value
* The ICCID of the SIM in the device (if present)
* @memberof device.Device
* @return {String}
*/
Device.prototype.getSimIccid = function() {
return this.simIccid;
};
/**
* Set the field value
* @memberof device.Device
* @param {String} deviceCertificate
*/
Device.prototype.setDeviceCertificate = function(deviceCertificate) {
this.deviceCertificate = deviceCertificate;
};
/**
* Get the field value
* @memberof device.Device
* @return {String}
*/
Device.prototype.getDeviceCertificate = function() {
return this.deviceCertificate;
};
/**
* Set the field value
* @memberof device.Device
* @param {String} pedCertificate
*/
Device.prototype.setPedCertificate = function(pedCertificate) {
this.pedCertificate = pedCertificate;
};
/**
* Get the field value
* @memberof device.Device
* @return {String}
*/
Device.prototype.getPedCertificate = function() {
return this.pedCertificate;
};
/**
* Set the field value
* The type of device. Possible values are "GOLDLEAF" (Station), "LEAFCUTTER" (Mobile), "MAPLECUTTER" (Mini), "CLOVER_GO" (Clover Go), or "OTHER" (Unknown).
*
* @memberof device.Device
* @param {String} deviceTypeName
*/
Device.prototype.setDeviceTypeName = function(deviceTypeName) {
this.deviceTypeName = deviceTypeName;
};
/**
* Get the field value
* The type of device. Possible values are "GOLDLEAF" (Station), "LEAFCUTTER" (Mobile), "MAPLECUTTER" (Mini), "CLOVER_GO" (Clover Go), or "OTHER" (Unknown).
* @memberof device.Device
* @return {String}
*/
Device.prototype.getDeviceTypeName = function() {
return this.deviceTypeName;
};
/**
* Set the field value
* Whether this device has PIN prompt disabled.
*
* @memberof device.Device
* @param {Boolean} pinDisabled
*/
Device.prototype.setPinDisabled = function(pinDisabled) {
this.pinDisabled = pinDisabled;
};
/**
* Get the field value
* Whether this device has PIN prompt disabled.
* @memberof device.Device
* @return {Boolean}
*/
Device.prototype.getPinDisabled = function() {
return this.pinDisabled;
};
/**
* Set the field value
* @memberof device.Device
* @param {Boolean} offlinePayments
*/
Device.prototype.setOfflinePayments = function(offlinePayments) {
this.offlinePayments = offlinePayments;
};
/**
* Get the field value
* @memberof device.Device
* @return {Boolean}
*/
Device.prototype.getOfflinePayments = function() {
return this.offlinePayments;
};
/**
* Set the field value
* @memberof device.Device
* @param {Boolean} offlinePaymentsAll
*/
Device.prototype.setOfflinePaymentsAll = function(offlinePaymentsAll) {
this.offlinePaymentsAll = offlinePaymentsAll;
};
/**
* Get the field value
* @memberof device.Device
* @return {Boolean}
*/
Device.prototype.getOfflinePaymentsAll = function() {
return this.offlinePaymentsAll;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} offlinePaymentsLimit must be a long integer
*/
Device.prototype.setOfflinePaymentsLimit = function(offlinePaymentsLimit) {
this.offlinePaymentsLimit = offlinePaymentsLimit;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getOfflinePaymentsLimit = function() {
return this.offlinePaymentsLimit;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} offlinePaymentsPromptThreshold must be a long integer
*/
Device.prototype.setOfflinePaymentsPromptThreshold = function(offlinePaymentsPromptThreshold) {
this.offlinePaymentsPromptThreshold = offlinePaymentsPromptThreshold;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getOfflinePaymentsPromptThreshold = function() {
return this.offlinePaymentsPromptThreshold;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} offlinePaymentsTotalPaymentsLimit must be a long integer
*/
Device.prototype.setOfflinePaymentsTotalPaymentsLimit = function(offlinePaymentsTotalPaymentsLimit) {
this.offlinePaymentsTotalPaymentsLimit = offlinePaymentsTotalPaymentsLimit;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getOfflinePaymentsTotalPaymentsLimit = function() {
return this.offlinePaymentsTotalPaymentsLimit;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} offlinePaymentsLimitDefault must be a long integer
*/
Device.prototype.setOfflinePaymentsLimitDefault = function(offlinePaymentsLimitDefault) {
this.offlinePaymentsLimitDefault = offlinePaymentsLimitDefault;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getOfflinePaymentsLimitDefault = function() {
return this.offlinePaymentsLimitDefault;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} offlinePaymentsPromptThresholdDefault must be a long integer
*/
Device.prototype.setOfflinePaymentsPromptThresholdDefault = function(offlinePaymentsPromptThresholdDefault) {
this.offlinePaymentsPromptThresholdDefault = offlinePaymentsPromptThresholdDefault;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getOfflinePaymentsPromptThresholdDefault = function() {
return this.offlinePaymentsPromptThresholdDefault;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} offlinePaymentsTotalPaymentsLimitDefault must be a long integer
*/
Device.prototype.setOfflinePaymentsTotalPaymentsLimitDefault = function(offlinePaymentsTotalPaymentsLimitDefault) {
this.offlinePaymentsTotalPaymentsLimitDefault = offlinePaymentsTotalPaymentsLimitDefault;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getOfflinePaymentsTotalPaymentsLimitDefault = function() {
return this.offlinePaymentsTotalPaymentsLimitDefault;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} offlinePaymentsMaxLimit must be a long integer
*/
Device.prototype.setOfflinePaymentsMaxLimit = function(offlinePaymentsMaxLimit) {
this.offlinePaymentsMaxLimit = offlinePaymentsMaxLimit;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getOfflinePaymentsMaxLimit = function() {
return this.offlinePaymentsMaxLimit;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} offlinePaymentsMaxTotalPaymentsLimit must be a long integer
*/
Device.prototype.setOfflinePaymentsMaxTotalPaymentsLimit = function(offlinePaymentsMaxTotalPaymentsLimit) {
this.offlinePaymentsMaxTotalPaymentsLimit = offlinePaymentsMaxTotalPaymentsLimit;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getOfflinePaymentsMaxTotalPaymentsLimit = function() {
return this.offlinePaymentsMaxTotalPaymentsLimit;
};
/**
* Set the field value
* @memberof device.Device
* @param {Boolean} showOfflinePayments
*/
Device.prototype.setShowOfflinePayments = function(showOfflinePayments) {
this.showOfflinePayments = showOfflinePayments;
};
/**
* Get the field value
* @memberof device.Device
* @return {Boolean}
*/
Device.prototype.getShowOfflinePayments = function() {
return this.showOfflinePayments;
};
/**
* Set the field value
* @memberof device.Device
* @param {Number} maxOfflineDays must be a long integer
*/
Device.prototype.setMaxOfflineDays = function(maxOfflineDays) {
this.maxOfflineDays = maxOfflineDays;
};
/**
* Get the field value
* @memberof device.Device
* @return {Number} must be a long integer
*/
Device.prototype.getMaxOfflineDays = function() {
return this.maxOfflineDays;
};
/**
* Set the field value
* @memberof device.Device
* @param {Boolean} allowStoreAndForward
*/
Device.prototype.setAllowStoreAndForward = function(allowStoreAndForward) {
this.allowStoreAndForward = allowStoreAndForward;
};
/**
* Get the field value
* @memberof device.Device
* @return {Boolean}
*/
Device.prototype.getAllowStoreAndForward = function() {
return this.allowStoreAndForward;
};
/**
* Set the field value
* @memberof device.Device
* @param {Array.<base.Reference>} secureReports An array of
*/
Device.prototype.setSecureReports = function(secureReports) {
this.secureReports = secureReports;
};
/**
* Get the field value
* @memberof device.Device
* @return {Array.<base.Reference>} An array of
*/
Device.prototype.getSecureReports = function() {
return this.secureReports;
};
/**
* @memberof device.Device
* @private
*/
Device.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;
};
Device.prototype.toString = function() {
return JSON.stringify(this);
};
Device._meta_ = {fields: {}};
Device._meta_._class_ = Device;
Device._meta_.fields["id"] = {};
Device._meta_.fields["id"].type = String;
Device._meta_.fields["name"] = {};
Device._meta_.fields["name"].type = String;
Device._meta_.fields["model"] = {};
Device._meta_.fields["model"].type = String;
Device._meta_.fields["merchant"] = {};
Device._meta_.fields["merchant"].type = base_Reference;
Device._meta_.fields["orderPrefix"] = {};
Device._meta_.fields["orderPrefix"].type = String;
Device._meta_.fields["terminalPrefix"] = {};
Device._meta_.fields["terminalPrefix"].type = Number;
Device._meta_.fields["serial"] = {};
Device._meta_.fields["serial"].type = String;
Device._meta_.fields["buildNumber"] = {};
Device._meta_.fields["buildNumber"].type = Number;
Device._meta_.fields["secureId"] = {};
Device._meta_.fields["secureId"].type = String;
Device._meta_.fields["buildType"] = {};
Device._meta_.fields["buildType"].type = device_BuildType;
Device._meta_.fields["cpuId"] = {};
Device._meta_.fields["cpuId"].type = String;
Device._meta_.fields["imei"] = {};
Device._meta_.fields["imei"].type = String;
Device._meta_.fields["imsi"] = {};
Device._meta_.fields["imsi"].type = String;
Device._meta_.fields["simIccid"] = {};
Device._meta_.fields["simIccid"].type = String;
Device._meta_.fields["deviceCertificate"] = {};
Device._meta_.fields["deviceCertificate"].type = String;
Device._meta_.fields["pedCertificate"] = {};
Device._meta_.fields["pedCertificate"].type = String;
Device._meta_.fields["deviceTypeName"] = {};
Device._meta_.fields["deviceTypeName"].type = String;
Device._meta_.fields["pinDisabled"] = {};
Device._meta_.fields["pinDisabled"].type = Boolean;
Device._meta_.fields["offlinePayments"] = {};
Device._meta_.fields["offlinePayments"].type = Boolean;
Device._meta_.fields["offlinePaymentsAll"] = {};
Device._meta_.fields["offlinePaymentsAll"].type = Boolean;
Device._meta_.fields["offlinePaymentsLimit"] = {};
Device._meta_.fields["offlinePaymentsLimit"].type = Number;
Device._meta_.fields["offlinePaymentsPromptThreshold"] = {};
Device._meta_.fields["offlinePaymentsPromptThreshold"].type = Number;
Device._meta_.fields["offlinePaymentsTotalPaymentsLimit"] = {};
Device._meta_.fields["offlinePaymentsTotalPaymentsLimit"].type = Number;
Device._meta_.fields["offlinePaymentsLimitDefault"] = {};
Device._meta_.fields["offlinePaymentsLimitDefault"].type = Number;
Device._meta_.fields["offlinePaymentsPromptThresholdDefault"] = {};
Device._meta_.fields["offlinePaymentsPromptThresholdDefault"].type = Number;
Device._meta_.fields["offlinePaymentsTotalPaymentsLimitDefault"] = {};
Device._meta_.fields["offlinePaymentsTotalPaymentsLimitDefault"].type = Number;
Device._meta_.fields["offlinePaymentsMaxLimit"] = {};
Device._meta_.fields["offlinePaymentsMaxLimit"].type = Number;
Device._meta_.fields["offlinePaymentsMaxTotalPaymentsLimit"] = {};
Device._meta_.fields["offlinePaymentsMaxTotalPaymentsLimit"].type = Number;
Device._meta_.fields["showOfflinePayments"] = {};
Device._meta_.fields["showOfflinePayments"].type = Boolean;
Device._meta_.fields["maxOfflineDays"] = {};
Device._meta_.fields["maxOfflineDays"].type = Number;
Device._meta_.fields["allowStoreAndForward"] = {};
Device._meta_.fields["allowStoreAndForward"].type = Boolean;
Device._meta_.fields["secureReports"] = {};
Device._meta_.fields["secureReports"].type = Array;
Device._meta_.fields["secureReports"].elementType = base_Reference;
//
// Expose the module.
//
if ('undefined' !== typeof module) {
module.exports = Device;
}