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
averageThe average rating
outOfThe maximum score the rating is out of
-
Initializes the rating, defaulting to out of 10
Declaration
Swift
public init(_ average: Decimal)Parameters
averageThe average rating, out of 10
View on GitHub
Rating Structure Reference