DisplayPrice

DisplayPrice

new DisplayPrice()

The data contained in this class is generated by DsClient and should not be explicitly constructed by the user.

This struct holds information on how to present a price. It includes the currency and the price value and where the currency symbol should be placed (pre/postfix). If use_text is true then it's expected to display the 'text' property instead of the price.

Legacy: Only a text with a pre-formatted price was used before the addition of this datastructure. Please inquire about backend-plugin support if this struct is used to replace the deprecated string properties in an established client. Existing plugins may not properly populate it.

Source:

Members

currency_is_prefixed :boolean

Type:
  • boolean
Source:

currency_symbol :string

Type:
  • string
Source:

decimals :number

Type:
  • number
Source:

price_value :number

Type:
  • number
Source:

text :string

Type:
  • string
Source:

use_text :boolean

Type:
  • boolean
Source:

Methods

defualtPriceString() → {string}

Generates a string with a suggested formatting of the price.

Source:
Returns:
Type
string