fromJson static method
Implementation
static APIRequestAction fromJson(
Map<String, dynamic> json, ActionMapper mapper) =>
ExecuteAPIRequestAction(
id: json['id'],
requestID: json['request_id'],
type: 'execute',
pathsFields:
RequestActionFieldEntity.fromJsonList(json['paths_fields']),
urlParamsFields:
RequestActionFieldEntity.fromJsonList(json['url_params_fields']),
headersField:
RequestActionFieldEntity.fromJsonList(json['headers_fields']),
bodyFields: RequestActionFieldEntity.fromJsonList(json['body_fields']),
authFields: RequestActionFieldEntity.fromJsonList(json['auth_fields']),
actionsIfSuccess: (json['actions_if_success'] as List<dynamic>)
.map(
(e) => ActionEntity.fromJson(e as Map<String, dynamic>, mapper))
.toList(),
actionsIfError: (json['actions_if_error'] as List<dynamic>)
.map(
(e) => ActionEntity.fromJson(e as Map<String, dynamic>, mapper))
.toList(),
);