Rating

public struct Rating : Equatable

Rating of a supplier

  • The average rating

    Declaration

    Swift

    public let average: Decimal
  • The maximum score (default is 10)

    Declaration

    Swift

    public let outOf: Decimal
  • Initializes the rating

    Declaration

    Swift

    public init(_ average: Decimal, outOf: Decimal)

    Parameters

    average

    The average rating

    outOf

    The maximum score the rating is out of

  • Initializes the rating, defaulting to out of 10

    Declaration

    Swift

    public init(_ average: Decimal)

    Parameters

    average

    The average rating, out of 10