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

Source:
Type:
  • boolean

currency_symbol :string

Source:
Type:
  • string

decimals :number

Source:
Type:
  • number

price_value :number

Source:
Type:
  • number

text :string

Source:
Type:
  • string

use_text :boolean

Source:
Type:
  • boolean

Methods

defualtPriceString() → {string}

Generates a string with a suggested formatting of the price.

Source:
Returns:
Type:
string