Class: Money::Converters::StripeConverter
Constant Summary
collapse
- SUBUNIT_TO_UNIT =
{
'ISK' => 100,
'UGX' => 100,
'HUF' => 100,
'TWD' => 100,
'BIF' => 1,
'CLP' => 1,
'DJF' => 1,
'GNF' => 1,
'JPY' => 1,
'KMF' => 1,
'KRW' => 1,
'MGA' => 1,
'PYG' => 1,
'RWF' => 1,
'VND' => 1,
'VUV' => 1,
'XAF' => 1,
'XOF' => 1,
'XPF' => 1,
'USDC' => 1_000_000,
}.freeze
Instance Method Summary
collapse
Methods inherited from Converter
#from_subunits, #to_subunits
Instance Method Details
#subunit_to_unit(currency) ⇒ Object
31
32
33
|
# File 'lib/money/converters/stripe_converter.rb', line 31
def subunit_to_unit(currency)
SUBUNIT_TO_UNIT.fetch(currency.iso_code, super)
end
|