fix-client
Version:
A minimalist FIX API client
55 lines (44 loc) • 1.04 kB
JavaScript
class Field {
constructor(tag, value) {
this.tag = tag >> 0;
this.value = value;
this.name = null;
this.description = null;
this.type = null;
this.category = null;
this.section = null;
this.enumeration = null;
this.validated = false;
}
setTag(tag) {
this.tag = tag >> 0;
}
setValue(value) {
this.value = value;
}
setName(name) {
this.name = name;
}
setDescription(description) {
this.description = description;
}
setType(type) {
this.type = type;
}
setCategory(category) {
this.category = category;
}
setSection(section) {
this.section = section;
}
setEnumeration(enumeration) {
this.enumeration = enumeration;
}
setValidated(isValid) {
this.validated = isValid;
}
toString() {
return `${this.tag}=${this.value}`;
}
}
module.exports = Field