@hashgraph/sdk
Version:
58 lines (53 loc) • 1.16 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
// SPDX-License-Identifier: Apache-2.0
class FeeAssessmentMethod {
/**
* @hideconstructor
* @internal
* @param {boolean} value
*/
constructor(value) {
/** @readonly */
this._value = value;
Object.freeze(this);
}
/**
* @returns {string}
*/
toString() {
switch (this) {
case FeeAssessmentMethod.Inclusive:
return "INCLUSIVE";
case FeeAssessmentMethod.Exclusive:
return "EXCLUSIVE";
default:
return `UNKNOWN (${this._value.toString()})`;
}
}
/**
* @internal
* @param {boolean} value
* @returns {FeeAssessmentMethod}
*/
static _fromValue(value) {
switch (value) {
case false:
return FeeAssessmentMethod.Inclusive;
case true:
return FeeAssessmentMethod.Exclusive;
}
}
/**
* @returns {boolean}
*/
valueOf() {
return this._value;
}
}
exports.default = FeeAssessmentMethod;
FeeAssessmentMethod.Inclusive = new FeeAssessmentMethod(false);
FeeAssessmentMethod.Exclusive = new FeeAssessmentMethod(true);
;