Money

struct Money
extension Money : Equatable, Hashable, Sendable

A monetary value with a currency code.

  • The amount of money.

    Declaration

    Swift

    let amount: Decimal
  • The currency code of the money.

    Declaration

    Swift

    let currencyCode: String
  • Initializes a Money object from an amount and currency code.

    Declaration

    Swift

    init(amount: Decimal, currencyCode: String)
  • A Money object with no amount or currency code.

    Declaration

    Swift

    static let none: Money