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