Result

Result

The result for a particular record

Constructor

new Result(record, voiceIdopt, responsesopt, retryCountopt)

Source:
Parameters:
Name Type Attributes Default Description
record Record
voiceId string <optional>
responses Array.<Object> <optional>
retryCount number <optional>
0

Members

_actualFields :Object.<string, string>

Source:
Type:
  • Object.<string, string>

_outputFields :Object.<string, string>

Source:
Type:
  • Object.<string, string>

_tags :Object.<string, string>

Source:
Type:
  • Object.<string, string>

actualFields

Source:

error

Source:

error

Source:

lastResponse

Source:

outputFields

Source:

record

Source:

responses

Source:

retryCount

Source:

retryCount

Source:

sanitizedOcrLines

Source:

shouldRetry

Source:

shouldRetry

Source:

success :boolean

Source:
Type:
  • boolean

success

Source:

tags

Source:

timestamp

Source:

voiceId :string|undefined

Source:
Type:
  • string | undefined

Methods

(static) fromJSON(record, o) → {Result}

Source:
Parameters:
Name Type Description
record Record
o any
Returns:
Type:
Result

actualField(field) → {string}

Source:
Parameters:
Name Type Description
field string
Returns:
Type:
string

The value for the field

addActualField(field, value) → {void}

Adds the actual value for an expected field to the result

Source:
Parameters:
Name Type Description
field string

The name of the field

value string

The value of the field

Returns:
Type:
void

addOutputField(field, value) → {void}

Adds a field to the output results - these are fields that are not expected or actual but are helpful info about the record

Source:
Parameters:
Name Type Description
field string

The name of the field

value string

The value of the field

Returns:
Type:
void

addTag(key, value) → {void}

Source:
Parameters:
Name Type Description
key string
value string
Returns:
Type:
void

outputField(field) → {string}

Gets a specific output field

Source:
Parameters:
Name Type Description
field string
Returns:
Type:
string

The value of the field

toJSON() → {any}

Source:
Returns:
Type:
any

toString() → {string}

Source:
Returns:
Type:
string