ChargeResponseMessage.fromMap constructor

ChargeResponseMessage.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory ChargeResponseMessage.fromMap(Map<String, dynamic> map) {
  return ChargeResponseMessage(
      errors: (map['errors'] != null && !(map['errors'] as Map).isEmpty)
          ? map['errors'] is Map
              ? map['errors']
              : Map<String, Object>.from(map['errors'])
          : {},
      url: map['url'],
      success: map['success'],
      invoiceId: map['invoice_id'],
      message: map['message'],
      pdf: map['pdf']);
}