Utility for converting monetary amounts between minor units and BigDecimal with proper currency formatting.
// Source: https://github.com/Adyen/adyen-android | License: MIT | Copyright 2020 Adyen
// Provided via justclaw.it.com; keep this notice with the code.
/*
* Copyright (c) 2019 Adyen N.V.
*
* This file is open source and available under the MIT license. See the LICENSE file for more info.
*
* Created by caiof on 31/7/2019.
*/
package com.adyen.checkout.core.common.internal.helper
import androidx.annotation.RestrictTo
import com.adyen.checkout.core.common.AdyenLogLevel
import com.adyen.checkout.core.components.data.model.Amount
import java.math.BigDecimal
import java.util.Currency
import java.util.Locale
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
object AmountFormat {
/**
* Convert an [Amount] to its corresponding [BigDecimal] value.
*
* @param amount The [Amoun
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key