class VoucherList {
  String id;
  String expired;
  int isUsed;
  String verificationNumber;
  String rewardTitle;
  String rewardSubTitle;
  String titleImageUrl;
  String contentImageUrl;
  int value;
  int minTransaction;

  VoucherList({
    required this.id,
    required this.expired,
    required this.isUsed,
    required this.verificationNumber,
    required this.rewardTitle,
    required this.rewardSubTitle,
    required this.titleImageUrl,
    required this.contentImageUrl,
    required this.value,
    required this.minTransaction,
  });

  factory VoucherList.addListVoucher(Map<String, dynamic> json) {
    return VoucherList(
        id: json['id'].toString(),
        expired: json['expire_time'].toString(),
        isUsed: json['used'],
        verificationNumber: json['verification_number'].toString(),
        rewardTitle: json['title'].toString(),
        rewardSubTitle: json['subtitle'].toString(),
        titleImageUrl: json['title_image'].toString(),
        contentImageUrl: json['content_image'].toString(),
        value: json['value'],
        minTransaction: json['min_transaction']);
  }
}
