Fact class

Builder class to simplify creating a list of facts for a card like a receipt.

Constructors

Fact(Session)

Creates a new Fact.

Methods

create(Session, string, TextType)

Creates a new Fact.

key(TextType, any[])

Display name of the fact.

toFact()

Returns the JSON for the fact.

value(string)

Display value of the fact.

Constructor Details

Fact(Session)

Creates a new Fact.

new Fact(session?: Session)

Parameters

session
Session

(Optional) will be used to localize any text.

Method Details

create(Session, string, TextType)

Creates a new Fact.

static function create(session: Session, value: string, key?: TextType)

Parameters

session
Session
value

string

key
TextType

Returns

key(TextType, any[])

Display name of the fact.

function key(text: TextType, args: any[])

Parameters

text
TextType
args

any[]

Returns

toFact()

Returns the JSON for the fact.

function toFact()

Returns

value(string)

Display value of the fact.

function value(v: string)

Parameters

v

string

Returns