Currently we only have two options:
- price.formatted, which uses the period of the offer
- dividing the price into monthly price, but without access to the currency symbol (only code is offered)
How are meant to display something very common like $60.00/year also shown as $5.00/month?
fun StoreProduct.priceFormattedMonthly(): String? {
return this.period?.valueInMonths?.let { months ->
val monthlyPrice = this.price.amountMicros.div(months).div(1_000_000).round(2)
return "${this.price.currencyCode}$monthlyPrice/ mo"
}
}
