UserRating constructor

const UserRating({
  1. @JsonKey.new(name: 'level') required int level,
  2. @JsonKey.new(name: 'rating') required int rating,
  3. @JsonKey.new(name: 'current_level_rating') required int currentLevelRating,
  4. @JsonKey.new(name: 'next_level_rating') int? nextLevelRating,
})

Creates the UserRating object.

Implementation

const factory UserRating({
  /// Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.
  @JsonKey(name: 'level') required int level,

  /// Numerical value of the user's rating; the higher the rating, the better
  @JsonKey(name: 'rating') required int rating,

  /// The rating value required to get the current level
  @JsonKey(name: 'current_level_rating') required int currentLevelRating,

  /// Optional. The rating value required to get to the next level; omitted if the maximum level was reached
  @JsonKey(name: 'next_level_rating') int? nextLevelRating,
}) = _UserRating;