class crmLeadDetailsGenerateQuotationViewResponse {
  QuoteDetails? quoteDetails;
  List<LeadProducts>? leadProducts;
  String? error;
  String? message;

  crmLeadDetailsGenerateQuotationViewResponse(
      {this.quoteDetails, this.leadProducts, this.error, this.message});

  crmLeadDetailsGenerateQuotationViewResponse.fromJson(
      Map<String, dynamic> json) {
    quoteDetails = json['quote_details'] != null
        ? new QuoteDetails.fromJson(json['quote_details'])
        : null;
    if (json['lead_products'] != null) {
      leadProducts = <LeadProducts>[];
      json['lead_products'].forEach((v) {
        leadProducts!.add(new LeadProducts.fromJson(v));
      });
    }
    error = json['error'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.quoteDetails != null) {
      data['quote_details'] = this.quoteDetails!.toJson();
    }
    if (this.leadProducts != null) {
      data['lead_products'] =
          this.leadProducts!.map((v) => v.toJson()).toList();
    }
    data['error'] = this.error;
    data['message'] = this.message;
    return data;
  }
}

class QuoteDetails {
  String? accountId;
  String? name;
  String? email;
  String? mobile;
  String? subject;
  String? forText;
  String? paymentTerms;

  QuoteDetails(
      {this.accountId,
        this.name,
        this.email,
        this.mobile,
        this.subject,
        this.forText,
        this.paymentTerms});

  QuoteDetails.fromJson(Map<String, dynamic> json) {
    accountId = json['account_id'];
    name = json['name'];
    email = json['email'];
    mobile = json['mobile'];
    subject = json['subject'];
    forText = json['for_text'];
    paymentTerms = json['payment_terms'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['account_id'] = this.accountId;
    data['name'] = this.name;
    data['email'] = this.email;
    data['mobile'] = this.mobile;
    data['subject'] = this.subject;
    data['for_text'] = this.forText;
    data['payment_terms'] = this.paymentTerms;
    return data;
  }
}

class LeadProducts {
  String? id;
  String? leadId;
  String? productId;
  String? qty;
  String? price;
  String? date;
  String? isDel;
  String? isExists;
  String? createdDatetime;
  String? updatedDatetime;
  String? productName;

  LeadProducts(
      {this.id,
        this.leadId,
        this.productId,
        this.qty,
        this.price,
        this.date,
        this.isDel,
        this.isExists,
        this.createdDatetime,
        this.updatedDatetime,
        this.productName});

  LeadProducts.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    leadId = json['lead_id'];
    productId = json['product_id'];
    qty = json['qty'];
    price = json['price'];
    date = json['date'];
    isDel = json['is_del'];
    isExists = json['is_exists'];
    createdDatetime = json['created_datetime'];
    updatedDatetime = json['updated_datetime'];
    productName = json['product_name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['lead_id'] = this.leadId;
    data['product_id'] = this.productId;
    data['qty'] = this.qty;
    data['price'] = this.price;
    data['date'] = this.date;
    data['is_del'] = this.isDel;
    data['is_exists'] = this.isExists;
    data['created_datetime'] = this.createdDatetime;
    data['updated_datetime'] = this.updatedDatetime;
    data['product_name'] = this.productName;
    return data;
  }
}
