/** * Copyright 2018 Colin Doig. Distributed under the MIT license. */ import Enum from '../../Enum'; export default class TimeInForce extends Enum { public static FILL_OR_KILL: string = 'FILL_OR_KILL'; constructor(value: string = '') { super(); this.setValue(value); } public setValue(value: string): void { if (value) { if (value !== 'FILL_OR_KILL') { throw new Error(`Invalid TimeInForce: ${value}`); } this.value = value; this.valid = true; } } }