ForwardingRequestCreateOptions.fromJson constructor

ForwardingRequestCreateOptions.fromJson(
  1. Object? json
)

Implementation

factory ForwardingRequestCreateOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return ForwardingRequestCreateOptions(
    config: (map['config'] as String),
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    paymentMethod: (map['payment_method'] as String),
    replacements: (map['replacements'] as List<Object?>)
        .map((el) => ForwardingRequestReplacementsItem.fromJson(el))
        .toList(),
    request: map['request'] == null ? null : Request.fromJson(map['request']),
    url: (map['url'] as String),
  );
}