KeyDetails constructor

KeyDetails({
  1. @JsonKey.new(name: 'api_host') required String apiHost,
  2. @JsonKey.new(name: 'plan_name') @Default.new('') String planName,
  3. @JsonKey.new(name: 'plan_limit') required PlanLimit planLimit,
  4. @JsonKey.new(name: 'bulk_limit') int? bulkLimit,
})

Implementation

factory KeyDetails({
  /// API host tied to this key.
  @JsonKey(name: 'api_host') required String apiHost,

  /// Name of the subscription plan attached to this key.
  ///
  /// Empty only for legacy payloads captured before API 2.7.1.
  @JsonKey(name: 'plan_name') @Default('') String planName,

  /// Plan usage details.
  @JsonKey(name: 'plan_limit') required PlanLimit planLimit,

  /// Maximum ISBNs accepted by one `POST /books` request.
  /// Null for older responses that do not report the limit.
  @JsonKey(name: 'bulk_limit') int? bulkLimit,
}) = _KeyDetails;