PayoutMethod.fromJson constructor

PayoutMethod.fromJson(
  1. dynamic data
)

Implementation

factory PayoutMethod.fromJson(dynamic data) {
  var json = DynamicJsonExtension.getJsonMap(data);
  return PayoutMethod(
      id: json['id'],
      title: json['title'],
      isSelected: json['isSelected'] ?? json['is_selected'],
      confirmationRequired:
          json['confirmation_required'] ?? json['confirmationRequired'],
      icons: (json["checkoutIcons"] ?? json['icons'])?.cast<String>(),
      type: methodTypeFromJson(json['type']),
      requiredBillingData: (json['required_billing_data'] as List<dynamic>?)
          ?.map((e) => InputField.fromJson(e as Map<String, dynamic>))
          .toList());
}