class EditPaymentDetailsAdjustedOrdersViewResponse {
  List<PaidList>? paidList;
  List<EditOrderList>? editOrderList;
  String? error;
  String? message;

  EditPaymentDetailsAdjustedOrdersViewResponse(
      {this.paidList, this.editOrderList, this.error, this.message});

  EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(
      Map<String, dynamic> json) {
    if (json['paid_list'] != null) {
      paidList = <PaidList>[];
      json['paid_list'].forEach((v) {
        paidList!.add(new PaidList.fromJson(v));
      });
    }
    if (json['order_list'] != null) {
      editOrderList = <EditOrderList>[];
      json['order_list'].forEach((v) {
        editOrderList!.add(new EditOrderList.fromJson(v));
      });
    }
    error = json['error'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.paidList != null) {
      data['paid_list'] = this.paidList!.map((v) => v.toJson()).toList();
    }
    if (this.editOrderList != null) {
      data['order_list'] = this.editOrderList!.map((v) => v.toJson()).toList();
    }
    data['error'] = this.error;
    data['message'] = this.message;
    return data;
  }
}

class PaidList {
  String? accId;
  String? orderId;
  String? orderPaymentId;
  String? orderNumber;
  String? orderAmount;
  String? paidAmount;
  String? balanceAmount;
  String? adjustedAmount;

  PaidList(
      {this.accId,
        this.orderId,
        this.orderPaymentId,
        this.orderNumber,
        this.orderAmount,
        this.paidAmount,
        this.balanceAmount,
        this.adjustedAmount});

  PaidList.fromJson(Map<String, dynamic> json) {
    accId = json['acc_id'];
    orderId = json['order_id'];
    orderPaymentId = json['order_payment_id'];
    orderNumber = json['order_number'];
    orderAmount = json['order_amount'];
    paidAmount = json['paid_amount'];
    balanceAmount = json['balance_amount'];
    adjustedAmount = json['adjusted_amount'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['acc_id'] = this.accId;
    data['order_id'] = this.orderId;
    data['order_payment_id'] = this.orderPaymentId;
    data['order_number'] = this.orderNumber;
    data['order_amount'] = this.orderAmount;
    data['paid_amount'] = this.paidAmount;
    data['balance_amount'] = this.balanceAmount;
    data['adjusted_amount'] = this.adjustedAmount;
    return data;
  }
}

class EditOrderList {
  String? orderId;
  String? orderNumber;
  String? totalAmount;
  String? balanceAmount;
  String? createdDatetime;

  EditOrderList(
      {this.orderId,
        this.orderNumber,
        this.totalAmount,
        this.balanceAmount,
        this.createdDatetime});

  EditOrderList.fromJson(Map<String, dynamic> json) {
    orderId = json['order_id'];
    orderNumber = json['order_number'];
    totalAmount = json['total_amount'];
    balanceAmount = json['balance_amount'];
    createdDatetime = json['created_datetime'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['order_id'] = this.orderId;
    data['order_number'] = this.orderNumber;
    data['total_amount'] = this.totalAmount;
    data['balance_amount'] = this.balanceAmount;
    data['created_datetime'] = this.createdDatetime;
    return data;
  }
}
