PaymentMethod.fromJson constructor

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

Implementation

factory PaymentMethod.fromJson(Map<String, dynamic> json) {
  return PaymentMethod(
    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']),
  );
}