Shopify SDK for Unity
Public Member Functions | List of all members
Shopify.Unity.GraphQL.MoneyV2Query Class Reference

A monetary value with currency. More...

Public Member Functions

 MoneyV2Query (StringBuilder query)
 MoneyV2Query is used to build queries. Typically MoneyV2Query will not be used directly but instead will be used when building queries from either QueryRootQuery or MutationQuery. More...
 
MoneyV2Query amount ()
 Decimal money amount. More...
 
MoneyV2Query currencyCode ()
 Currency of the money. More...
 

Detailed Description

A monetary value with currency.

To format currencies, combine this type's amount and currencyCode fields with your client's locale.

For example, in JavaScript you could use Intl.NumberFormat:

new Intl.NumberFormat(locale, {
style: 'currency',
currency: currencyCode
}).format(amount);

Other formatting libraries include:

For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations (such as TwitterCldr).

Constructor & Destructor Documentation

◆ MoneyV2Query()

Shopify.Unity.GraphQL.MoneyV2Query.MoneyV2Query ( StringBuilder  query)
inline

MoneyV2Query is used to build queries. Typically MoneyV2Query will not be used directly but instead will be used when building queries from either QueryRootQuery or MutationQuery.

Member Function Documentation

◆ amount()

MoneyV2Query Shopify.Unity.GraphQL.MoneyV2Query.amount ( )
inline

Decimal money amount.

◆ currencyCode()

MoneyV2Query Shopify.Unity.GraphQL.MoneyV2Query.currencyCode ( )
inline

Currency of the money.


The documentation for this class was generated from the following file: