Documentation
¶
Index ¶
- func Code(currency sumup.Currency) string
- func Format(amount float64, currency sumup.Currency) string
- func FormatPointers(amount *float32, currency *sumup.Currency) string
- func Parse(value string) (sumup.Currency, error)
- func ParseMajorUnits32(amount string) (float32, error)
- func ParseMajorUnitsForCurrency32(amount string, currency sumup.Currency) (float32, error)
- func ParseMajorUnitsForCurrency64(amount string, currency sumup.Currency) (float64, error)
- func Supported() []string
- func ToMinorUnits(amount string, minorUnit int32) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatPointers ¶
FormatPointers renders optional amount and currency pointers.
func ParseMajorUnits32 ¶
ParseMajorUnits32 converts a decimal amount string into float32 major units.
func ParseMajorUnitsForCurrency32 ¶
ParseMajorUnitsForCurrency32 converts a decimal amount string into float32 major units after validating the scale for the given currency.
func ParseMajorUnitsForCurrency64 ¶
ParseMajorUnitsForCurrency64 converts a decimal amount string into float64 major units after validating the scale for the given currency.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.