import 'package:flutter/cupertino.dart';
import 'dart:convert';

class ModelAccount {
  final String id;
  final String name;
  final String created_at;
  final String updated_at;
  final bool is_verified;
  final String bank;
  final String bank_cc;

  ModelAccount(
      {@required this.id,
      @required this.name,
      @required this.created_at,
      @required this.updated_at,
      @required this.is_verified,
      @required this.bank,
      @required this.bank_cc});

  factory ModelAccount.fromJson(Map<String, dynamic> json) {
    return ModelAccount(
        id: json['data']['id'],
        name: json['data']['name'],
        created_at: json['data']['created_at'],
        updated_at: json['data']['updated_at'],
        is_verified: json['data']['is_verified?'],
        bank: json['data']['last_verification_request_data']['bank'],
        bank_cc: json['data']['last_verification_request_data']['bank_cc']);
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    /*data['holder_name'] = this.holder_name;
    data['description'] = this.description;
    data['display_number'] = this.display_number;
    data['month'] = this.month;
    data['year'] = this.year;
    data['cvv'] = this.cvv;
    data['id_person'] = this.id_person;*/

    return data;
  }
}
