convertToSpend(amount: number, currency: string, usdRate: number): number
Rounds a given amount up to the specified currency's decimals and then converts it to spend, rounding up to the nearest integer.
Internally uses roundAmountToNativeCurrencyDecimals with rounding mode = up
Returns
integer spend amount
Parameters
amount: number
A number
currency: string
A Currency specified in the SDK's currency module
usdRate: number
Exchange rate for this currency vs usd (amount of this currency equivalent to 1 USD)
Rounds a given amount up to the specified currency's decimals and then converts it to spend, rounding up to the nearest integer. Internally uses roundAmountToNativeCurrencyDecimals with rounding mode = up
Returns
integer spend amount