getPriceString

fun getPriceString(price: Long, currency: Currency): String

Converts an integer price in the lowest currency denomination to a Google string value. For instance: (100L, USD) -> "1.00", but (100L, JPY) -> "100".

Return

a String that can be used as a Pay with Google price string

Parameters

price

the price in the lowest available currency denomination

currency

the Currency used to determine how many digits after the decimal


fun getPriceString(price: Int, currency: Currency): String

Deprecated

Use getPriceString(Long, Currency) instead.

Replace with

getPriceString(price.toLong(), currency)

Converts an integer price in the lowest currency denomination to a Google string value. For instance: (100L, USD) -> "1.00", but (100L, JPY) -> "100".

Return

a String that can be used as a Pay with Google price string

Parameters

price

the price in the lowest available currency denomination

currency

the Currency used to determine how many digits after the decimal