LimitResponse.fromJson constructor

LimitResponse.fromJson(
  1. Map<String, dynamic> json
)

Creates a LimitResponse from JSON data.

Implementation

factory LimitResponse.fromJson(Map<String, dynamic> json) {
  final tempQueuingJson = json['queuing'];
  final tempTypeJson = json['type'];

  final QueuingConfiguration? tempQueuing = tempQueuingJson != null
      ? QueuingConfiguration.fromJson(tempQueuingJson)
      : null;
  final String tempType = tempTypeJson;

  return LimitResponse(
    queuing: tempQueuing,
    type: tempType,
  );
}