Commit 7210793a authored by Sai Srinivas's avatar Sai Srinivas
Browse files

17-09

parent 185e0896
...@@ -10,9 +10,9 @@ class SessionResponse { ...@@ -10,9 +10,9 @@ class SessionResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['update_password_required'] = this.updatePasswordRequired; data['update_password_required'] = updatePasswordRequired;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -14,8 +14,8 @@ class StatusResponse { ...@@ -14,8 +14,8 @@ class StatusResponse {
String? notificationsCount; String? notificationsCount;
int? sessionExists; int? sessionExists;
StatusResponse( StatusResponse({
{this.error, this.error,
this.ccsUsername, this.ccsUsername,
this.ccsPassword, this.ccsPassword,
this.ccsPbxDomain, this.ccsPbxDomain,
...@@ -28,7 +28,8 @@ class StatusResponse { ...@@ -28,7 +28,8 @@ class StatusResponse {
this.attStatus, this.attStatus,
this.appRequestAutostart, this.appRequestAutostart,
this.notificationsCount, this.notificationsCount,
this.sessionExists}); this.sessionExists,
});
StatusResponse.fromJson(Map<String, dynamic> json) { StatusResponse.fromJson(Map<String, dynamic> json) {
error = json['error']; error = json['error'];
...@@ -50,21 +51,21 @@ class StatusResponse { ...@@ -50,21 +51,21 @@ class StatusResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['error'] = this.error; data['error'] = error;
data['ccs_username'] = this.ccsUsername; data['ccs_username'] = ccsUsername;
data['ccs_password'] = this.ccsPassword; data['ccs_password'] = ccsPassword;
data['ccs_pbx_domain'] = this.ccsPbxDomain; data['ccs_pbx_domain'] = ccsPbxDomain;
data['ccs_pbx_sip_protocol'] = this.ccsPbxSipProtocol; data['ccs_pbx_sip_protocol'] = ccsPbxSipProtocol;
data['session_id'] = this.sessionId; data['session_id'] = sessionId;
data['user_id'] = this.userId; data['user_id'] = userId;
data['name'] = this.name; data['name'] = name;
data['email_id'] = this.emailId; data['email_id'] = emailId;
data['permissions'] = this.permissions; data['permissions'] = permissions;
data['att_status'] = this.attStatus; data['att_status'] = attStatus;
data['app_request_autostart'] = this.appRequestAutostart; data['app_request_autostart'] = appRequestAutostart;
data['notifications_count'] = this.notificationsCount; data['notifications_count'] = notificationsCount;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -10,9 +10,9 @@ class SubmitComplaintResponse { ...@@ -10,9 +10,9 @@ class SubmitComplaintResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['error'] = this.error; data['error'] = error;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -12,10 +12,10 @@ class TagGeneratorResponse { ...@@ -12,10 +12,10 @@ class TagGeneratorResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['error'] = this.error; data['error'] = error;
data['message'] = this.message; data['message'] = message;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -10,9 +10,9 @@ class TagLocationResponse { ...@@ -10,9 +10,9 @@ class TagLocationResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['error'] = this.error; data['error'] = error;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -4,8 +4,12 @@ class TechnicianAddPaymentCollectionResponse { ...@@ -4,8 +4,12 @@ class TechnicianAddPaymentCollectionResponse {
String? message; String? message;
int? sessionExists; int? sessionExists;
TechnicianAddPaymentCollectionResponse( TechnicianAddPaymentCollectionResponse({
{this.paymentCollectionId, this.error, this.message, this.sessionExists}); this.paymentCollectionId,
this.error,
this.message,
this.sessionExists,
});
TechnicianAddPaymentCollectionResponse.fromJson(Map<String, dynamic> json) { TechnicianAddPaymentCollectionResponse.fromJson(Map<String, dynamic> json) {
paymentCollectionId = json['payment_collection_id']; paymentCollectionId = json['payment_collection_id'];
...@@ -15,11 +19,11 @@ class TechnicianAddPaymentCollectionResponse { ...@@ -15,11 +19,11 @@ class TechnicianAddPaymentCollectionResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['payment_collection_id'] = this.paymentCollectionId; data['payment_collection_id'] = paymentCollectionId;
data['error'] = this.error; data['error'] = error;
data['message'] = this.message; data['message'] = message;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -8,15 +8,16 @@ class TechnicianResponse { ...@@ -8,15 +8,16 @@ class TechnicianResponse {
int? error; int? error;
int? sessionExists; int? sessionExists;
TechnicianResponse( TechnicianResponse({
{this.avgRating, this.avgRating,
this.pendingComplaints, this.pendingComplaints,
this.todayVisits, this.todayVisits,
this.thisMonthsVisits, this.thisMonthsVisits,
this.paymentCollectionWalletBalanceAmount, this.paymentCollectionWalletBalanceAmount,
this.monthlyPaymentCollectionAmount, this.monthlyPaymentCollectionAmount,
this.error, this.error,
this.sessionExists}); this.sessionExists,
});
TechnicianResponse.fromJson(Map<String, dynamic> json) { TechnicianResponse.fromJson(Map<String, dynamic> json) {
avgRating = json['avg_rating']; avgRating = json['avg_rating'];
...@@ -31,17 +32,16 @@ class TechnicianResponse { ...@@ -31,17 +32,16 @@ class TechnicianResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['avg_rating'] = this.avgRating; data['avg_rating'] = avgRating;
data['pending_complaints'] = this.pendingComplaints; data['pending_complaints'] = pendingComplaints;
data['today_visits'] = this.todayVisits; data['today_visits'] = todayVisits;
data['this_months_visits'] = this.thisMonthsVisits; data['this_months_visits'] = thisMonthsVisits;
data['payment_collection_wallet_balance_amount'] = data['payment_collection_wallet_balance_amount'] =
this.paymentCollectionWalletBalanceAmount; paymentCollectionWalletBalanceAmount;
data['monthly_payment_collection_amount'] = data['monthly_payment_collection_amount'] = monthlyPaymentCollectionAmount;
this.monthlyPaymentCollectionAmount; data['error'] = error;
data['error'] = this.error; data['session_exists'] = sessionExists;
data['session_exists'] = this.sessionExists;
return data; return data;
} }
} }
...@@ -4,20 +4,24 @@ class TechnicianLoadNumbersResponse { ...@@ -4,20 +4,24 @@ class TechnicianLoadNumbersResponse {
int? error; int? error;
int? sessionExists; int? sessionExists;
TechnicianLoadNumbersResponse( TechnicianLoadNumbersResponse({
{this.paymentModeList, this.contacts, this.error, this.sessionExists}); this.paymentModeList,
this.contacts,
this.error,
this.sessionExists,
});
TechnicianLoadNumbersResponse.fromJson(Map<String, dynamic> json) { TechnicianLoadNumbersResponse.fromJson(Map<String, dynamic> json) {
if (json['payment_mode_list'] != null) { if (json['payment_mode_list'] != null) {
paymentModeList = <PaymentModeList>[]; paymentModeList = <PaymentModeList>[];
json['payment_mode_list'].forEach((v) { json['payment_mode_list'].forEach((v) {
paymentModeList!.add(new PaymentModeList.fromJson(v)); paymentModeList!.add(PaymentModeList.fromJson(v));
}); });
} }
if (json['contacts'] != null) { if (json['contacts'] != null) {
contacts = <Contacts>[]; contacts = <Contacts>[];
json['contacts'].forEach((v) { json['contacts'].forEach((v) {
contacts!.add(new Contacts.fromJson(v)); contacts!.add(Contacts.fromJson(v));
}); });
} }
error = json['error']; error = json['error'];
...@@ -25,16 +29,16 @@ class TechnicianLoadNumbersResponse { ...@@ -25,16 +29,16 @@ class TechnicianLoadNumbersResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.paymentModeList != null) { if (paymentModeList != null) {
data['payment_mode_list'] = data['payment_mode_list'] =
this.paymentModeList!.map((v) => v.toJson()).toList(); paymentModeList!.map((v) => v.toJson()).toList();
} }
if (this.contacts != null) { if (contacts != null) {
data['contacts'] = this.contacts!.map((v) => v.toJson()).toList(); data['contacts'] = contacts!.map((v) => v.toJson()).toList();
} }
data['error'] = this.error; data['error'] = error;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -51,9 +55,9 @@ class PaymentModeList { ...@@ -51,9 +55,9 @@ class PaymentModeList {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = this.id; data['id'] = id;
data['name'] = this.name; data['name'] = name;
return data; return data;
} }
} }
...@@ -70,9 +74,9 @@ class Contacts { ...@@ -70,9 +74,9 @@ class Contacts {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['mob1'] = this.mob1; data['mob1'] = mob1;
data['name'] = this.name; data['name'] = name;
return data; return data;
} }
} }
...@@ -13,7 +13,7 @@ class TechnicianPendingComplaintsResponse { ...@@ -13,7 +13,7 @@ class TechnicianPendingComplaintsResponse {
if (json['list'] != null) { if (json['list'] != null) {
list = <TP_List>[]; list = <TP_List>[];
json['list'].forEach((v) { json['list'].forEach((v) {
list!.add(new TP_List.fromJson(v)); list!.add(TP_List.fromJson(v));
}); });
} }
error = json['error']; error = json['error'];
...@@ -21,12 +21,12 @@ class TechnicianPendingComplaintsResponse { ...@@ -21,12 +21,12 @@ class TechnicianPendingComplaintsResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.list != null) { if (list != null) {
data['list'] = this.list!.map((v) => v.toJson()).toList(); data['list'] = list!.map((v) => v.toJson()).toList();
} }
data['error'] = this.error; data['error'] = error;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -44,7 +44,6 @@ class TP_List { ...@@ -44,7 +44,6 @@ class TP_List {
String? contactName; String? contactName;
String? engineNo; String? engineNo;
TP_List({ TP_List({
this.genId, this.genId,
this.address, this.address,
...@@ -74,18 +73,18 @@ class TP_List { ...@@ -74,18 +73,18 @@ class TP_List {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['gen_id'] = this.genId; data['gen_id'] = genId;
data['address'] = this.address; data['address'] = address;
data['loc'] = this.loc; data['loc'] = loc;
data['complaint_id'] = this.complaintId; data['complaint_id'] = complaintId;
data['company_name'] = this.companyName; data['company_name'] = companyName;
data['product_name'] = this.productName; data['product_name'] = productName;
data['complaint_category'] = this.complaintCategory; data['complaint_category'] = complaintCategory;
data['comp_reg_datetime'] = this.compRegDatetime; data['comp_reg_datetime'] = compRegDatetime;
data['mobile_no'] = this.mobileNo; data['mobile_no'] = mobileNo;
data['contact_name'] = this.contactName; data['contact_name'] = contactName;
data['engine_number'] = this.engineNo; data['engine_number'] = engineNo;
return data; return data;
} }
} }
...@@ -9,7 +9,7 @@ class TodayVisitResponse { ...@@ -9,7 +9,7 @@ class TodayVisitResponse {
if (json['list'] != null) { if (json['list'] != null) {
list = <Visitlist>[]; list = <Visitlist>[];
json['list'].forEach((v) { json['list'].forEach((v) {
list!.add(new Visitlist.fromJson(v)); list!.add(Visitlist.fromJson(v));
}); });
} }
error = json['error']; error = json['error'];
...@@ -17,12 +17,12 @@ class TodayVisitResponse { ...@@ -17,12 +17,12 @@ class TodayVisitResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.list != null) { if (list != null) {
data['list'] = this.list!.map((v) => v.toJson()).toList(); data['list'] = list!.map((v) => v.toJson()).toList();
} }
data['error'] = this.error; data['error'] = error;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -40,8 +40,8 @@ class Visitlist { ...@@ -40,8 +40,8 @@ class Visitlist {
String? complaintCategory; String? complaintCategory;
String? visitDatetime; String? visitDatetime;
Visitlist( Visitlist({
{this.genId, this.genId,
this.complaintId, this.complaintId,
this.address, this.address,
this.loc, this.loc,
...@@ -51,7 +51,8 @@ class Visitlist { ...@@ -51,7 +51,8 @@ class Visitlist {
this.contactName, this.contactName,
this.productName, this.productName,
this.complaintCategory, this.complaintCategory,
this.visitDatetime}); this.visitDatetime,
});
Visitlist.fromJson(Map<String, dynamic> json) { Visitlist.fromJson(Map<String, dynamic> json) {
genId = json['gen_id']; genId = json['gen_id'];
...@@ -68,18 +69,18 @@ class Visitlist { ...@@ -68,18 +69,18 @@ class Visitlist {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['gen_id'] = this.genId; data['gen_id'] = genId;
data['complaint_id'] = this.complaintId; data['complaint_id'] = complaintId;
data['address'] = this.address; data['address'] = address;
data['loc'] = this.loc; data['loc'] = loc;
data['mobile_no'] = this.mobileNo; data['mobile_no'] = mobileNo;
data['followup_id'] = this.followupId; data['followup_id'] = followupId;
data['company_name'] = this.companyName; data['company_name'] = companyName;
data['contact_name'] = this.contactName; data['contact_name'] = contactName;
data['product_name'] = this.productName; data['product_name'] = productName;
data['complaint_category'] = this.complaintCategory; data['complaint_category'] = complaintCategory;
data['visit_datetime'] = this.visitDatetime; data['visit_datetime'] = visitDatetime;
return data; return data;
} }
} }
...@@ -12,10 +12,10 @@ class UpdateComplaintResponse { ...@@ -12,10 +12,10 @@ class UpdateComplaintResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['error'] = this.error; data['error'] = error;
data['fsr_file_name'] = this.fsrFileName; data['fsr_file_name'] = fsrFileName;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -12,10 +12,10 @@ class UpdatePasswordResponse { ...@@ -12,10 +12,10 @@ class UpdatePasswordResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['error'] = this.error; data['error'] = error;
data['message'] = this.message; data['message'] = message;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -8,15 +8,16 @@ class VersionsResponse { ...@@ -8,15 +8,16 @@ class VersionsResponse {
String? iosUrl; String? iosUrl;
String? iosReleaseNotes; String? iosReleaseNotes;
VersionsResponse( VersionsResponse({
{this.latestVersion, this.latestVersion,
this.latestVersionCode, this.latestVersionCode,
this.url, this.url,
this.releaseNotes, this.releaseNotes,
this.iosLatestVersion, this.iosLatestVersion,
this.iosLatestVersionCode, this.iosLatestVersionCode,
this.iosUrl, this.iosUrl,
this.iosReleaseNotes}); this.iosReleaseNotes,
});
VersionsResponse.fromJson(Map<String, dynamic> json) { VersionsResponse.fromJson(Map<String, dynamic> json) {
latestVersion = json['latestVersion']; latestVersion = json['latestVersion'];
...@@ -30,15 +31,15 @@ class VersionsResponse { ...@@ -30,15 +31,15 @@ class VersionsResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['latestVersion'] = this.latestVersion; data['latestVersion'] = latestVersion;
data['latestVersionCode'] = this.latestVersionCode; data['latestVersionCode'] = latestVersionCode;
data['url'] = this.url; data['url'] = url;
data['releaseNotes'] = this.releaseNotes; data['releaseNotes'] = releaseNotes;
data['ios_latestVersion'] = this.iosLatestVersion; data['ios_latestVersion'] = iosLatestVersion;
data['ios_latestVersionCode'] = this.iosLatestVersionCode; data['ios_latestVersionCode'] = iosLatestVersionCode;
data['ios_url'] = this.iosUrl; data['ios_url'] = iosUrl;
data['ios_releaseNotes'] = this.iosReleaseNotes; data['ios_releaseNotes'] = iosReleaseNotes;
return data; return data;
} }
} }
...@@ -3,24 +3,28 @@ class ViewVisitDetailsResponse { ...@@ -3,24 +3,28 @@ class ViewVisitDetailsResponse {
int? error; int? error;
int? sessionExists; int? sessionExists;
ViewVisitDetailsResponse( ViewVisitDetailsResponse({
{this.complaintDetails, this.error, this.sessionExists}); this.complaintDetails,
this.error,
this.sessionExists,
});
ViewVisitDetailsResponse.fromJson(Map<String, dynamic> json) { ViewVisitDetailsResponse.fromJson(Map<String, dynamic> json) {
complaintDetails = json['complaint_details'] != null complaintDetails =
? new Complaintdetails.fromJson(json['complaint_details']) json['complaint_details'] != null
? Complaintdetails.fromJson(json['complaint_details'])
: null; : null;
error = json['error']; error = json['error'];
sessionExists = json['session_exists']; sessionExists = json['session_exists'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.complaintDetails != null) { if (complaintDetails != null) {
data['complaint_details'] = this.complaintDetails!.toJson(); data['complaint_details'] = complaintDetails!.toJson();
} }
data['error'] = this.error; data['error'] = error;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -79,8 +83,8 @@ class Complaintdetails { ...@@ -79,8 +83,8 @@ class Complaintdetails {
String? complaintCategory; String? complaintCategory;
String? complaintDesc; String? complaintDesc;
Complaintdetails( Complaintdetails({
{this.id, this.id,
this.oemPemName, this.oemPemName,
this.accId, this.accId,
this.productId, this.productId,
...@@ -131,7 +135,8 @@ class Complaintdetails { ...@@ -131,7 +135,8 @@ class Complaintdetails {
this.dateOfSupply, this.dateOfSupply,
this.complaintType, this.complaintType,
this.complaintCategory, this.complaintCategory,
this.complaintDesc}); this.complaintDesc,
});
Complaintdetails.fromJson(Map<String, dynamic> json) { Complaintdetails.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
...@@ -189,59 +194,59 @@ class Complaintdetails { ...@@ -189,59 +194,59 @@ class Complaintdetails {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = this.id; data['id'] = id;
data['oem_pem_name'] = this.oemPemName; data['oem_pem_name'] = oemPemName;
data['acc_id'] = this.accId; data['acc_id'] = accId;
data['product_id'] = this.productId; data['product_id'] = productId;
data['gen_hash_id'] = this.genHashId; data['gen_hash_id'] = genHashId;
data['engine_model'] = this.engineModel; data['engine_model'] = engineModel;
data['alt'] = this.alt; data['alt'] = alt;
data['engine_no'] = this.engineNo; data['engine_no'] = engineNo;
data['alt_no'] = this.altNo; data['alt_no'] = altNo;
data['inv_no'] = this.invNo; data['inv_no'] = invNo;
data['dg_set_no'] = this.dgSetNo; data['dg_set_no'] = dgSetNo;
data['btry_no'] = this.btryNo; data['btry_no'] = btryNo;
data['state'] = this.state; data['state'] = state;
data['district'] = this.district; data['district'] = district;
data['address'] = this.address; data['address'] = address;
data['branch_id'] = this.branchId; data['branch_id'] = branchId;
data['sales_emp_id'] = this.salesEmpId; data['sales_emp_id'] = salesEmpId;
data['disp_date'] = this.dispDate; data['disp_date'] = dispDate;
data['cmsng_date'] = this.cmsngDate; data['cmsng_date'] = cmsngDate;
data['date_of_engine_sale'] = this.dateOfEngineSale; data['date_of_engine_sale'] = dateOfEngineSale;
data['pdi_date'] = this.pdiDate; data['pdi_date'] = pdiDate;
data['wrnty_expiry_date'] = this.wrntyExpiryDate; data['wrnty_expiry_date'] = wrntyExpiryDate;
data['next_service'] = this.nextService; data['next_service'] = nextService;
data['date'] = this.date; data['date'] = date;
data['extra'] = this.extra; data['extra'] = extra;
data['status'] = this.status; data['status'] = status;
data['data_source'] = this.dataSource; data['data_source'] = dataSource;
data['ref_type'] = this.refType; data['ref_type'] = refType;
data['ref_id'] = this.refId; data['ref_id'] = refId;
data['order_id'] = this.orderId; data['order_id'] = orderId;
data['emp_id'] = this.empId; data['emp_id'] = empId;
data['is_suspense'] = this.isSuspense; data['is_suspense'] = isSuspense;
data['loc'] = this.loc; data['loc'] = loc;
data['temp_loc'] = this.tempLoc; data['temp_loc'] = tempLoc;
data['loc_status'] = this.locStatus; data['loc_status'] = locStatus;
data['is_exist'] = this.isExist; data['is_exist'] = isExist;
data['del_remarks'] = this.delRemarks; data['del_remarks'] = delRemarks;
data['del_emp_id'] = this.delEmpId; data['del_emp_id'] = delEmpId;
data['del_datetime'] = this.delDatetime; data['del_datetime'] = delDatetime;
data['cname'] = this.cname; data['cname'] = cname;
data['mob1'] = this.mob1; data['mob1'] = mob1;
data['mob2'] = this.mob2; data['mob2'] = mob2;
data['mail'] = this.mail; data['mail'] = mail;
data['aname'] = this.aname; data['aname'] = aname;
data['emodel'] = this.emodel; data['emodel'] = emodel;
data['spname'] = this.spname; data['spname'] = spname;
data['complaint_id'] = this.complaintId; data['complaint_id'] = complaintId;
data['opened_date'] = this.openedDate; data['opened_date'] = openedDate;
data['date_of_supply'] = this.dateOfSupply; data['date_of_supply'] = dateOfSupply;
data['complaint_type'] = this.complaintType; data['complaint_type'] = complaintType;
data['complaint_category'] = this.complaintCategory; data['complaint_category'] = complaintCategory;
data['complaint_desc'] = this.complaintDesc; data['complaint_desc'] = complaintDesc;
return data; return data;
} }
} }
...@@ -6,47 +6,52 @@ class ViewVisitDetailsResponseNew { ...@@ -6,47 +6,52 @@ class ViewVisitDetailsResponseNew {
int? error; int? error;
int? sessionExists; int? sessionExists;
ViewVisitDetailsResponseNew( ViewVisitDetailsResponseNew({
{this.complaintDetails, this.complaintDetails,
this.customerDetails, this.customerDetails,
this.generatorDetails, this.generatorDetails,
this.complaintDetailsNew, this.complaintDetailsNew,
this.error, this.error,
this.sessionExists}); this.sessionExists,
});
ViewVisitDetailsResponseNew.fromJson(Map<String, dynamic> json) { ViewVisitDetailsResponseNew.fromJson(Map<String, dynamic> json) {
complaintDetails = json['complaint_details'] != null complaintDetails =
? new ComplaintDetails.fromJson(json['complaint_details']) json['complaint_details'] != null
? ComplaintDetails.fromJson(json['complaint_details'])
: null; : null;
customerDetails = json['customer_details'] != null customerDetails =
? new CustomerDetails.fromJson(json['customer_details']) json['customer_details'] != null
? CustomerDetails.fromJson(json['customer_details'])
: null; : null;
generatorDetails = json['generator_details'] != null generatorDetails =
? new GeneratorDetails.fromJson(json['generator_details']) json['generator_details'] != null
? GeneratorDetails.fromJson(json['generator_details'])
: null; : null;
complaintDetailsNew = json['complaint_details_new'] != null complaintDetailsNew =
? new ComplaintDetailsNew.fromJson(json['complaint_details_new']) json['complaint_details_new'] != null
? ComplaintDetailsNew.fromJson(json['complaint_details_new'])
: null; : null;
error = json['error']; error = json['error'];
sessionExists = json['session_exists']; sessionExists = json['session_exists'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.complaintDetails != null) { if (complaintDetails != null) {
data['complaint_details'] = this.complaintDetails!.toJson(); data['complaint_details'] = complaintDetails!.toJson();
} }
if (this.customerDetails != null) { if (customerDetails != null) {
data['customer_details'] = this.customerDetails!.toJson(); data['customer_details'] = customerDetails!.toJson();
} }
if (this.generatorDetails != null) { if (generatorDetails != null) {
data['generator_details'] = this.generatorDetails!.toJson(); data['generator_details'] = generatorDetails!.toJson();
} }
if (this.complaintDetailsNew != null) { if (complaintDetailsNew != null) {
data['complaint_details_new'] = this.complaintDetailsNew!.toJson(); data['complaint_details_new'] = complaintDetailsNew!.toJson();
} }
data['error'] = this.error; data['error'] = error;
data['session_exists'] = this.sessionExists; data['session_exists'] = sessionExists;
return data; return data;
} }
} }
...@@ -105,8 +110,8 @@ class ComplaintDetails { ...@@ -105,8 +110,8 @@ class ComplaintDetails {
String? complaintCategory; String? complaintCategory;
String? complaintDesc; String? complaintDesc;
ComplaintDetails( ComplaintDetails({
{this.id, this.id,
this.oemPemName, this.oemPemName,
this.accId, this.accId,
this.productId, this.productId,
...@@ -157,7 +162,8 @@ class ComplaintDetails { ...@@ -157,7 +162,8 @@ class ComplaintDetails {
this.dateOfSupply, this.dateOfSupply,
this.complaintType, this.complaintType,
this.complaintCategory, this.complaintCategory,
this.complaintDesc}); this.complaintDesc,
});
ComplaintDetails.fromJson(Map<String, dynamic> json) { ComplaintDetails.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
...@@ -215,59 +221,59 @@ class ComplaintDetails { ...@@ -215,59 +221,59 @@ class ComplaintDetails {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = this.id; data['id'] = id;
data['oem_pem_name'] = this.oemPemName; data['oem_pem_name'] = oemPemName;
data['acc_id'] = this.accId; data['acc_id'] = accId;
data['product_id'] = this.productId; data['product_id'] = productId;
data['gen_hash_id'] = this.genHashId; data['gen_hash_id'] = genHashId;
data['engine_model'] = this.engineModel; data['engine_model'] = engineModel;
data['alt'] = this.alt; data['alt'] = alt;
data['engine_no'] = this.engineNo; data['engine_no'] = engineNo;
data['alt_no'] = this.altNo; data['alt_no'] = altNo;
data['inv_no'] = this.invNo; data['inv_no'] = invNo;
data['dg_set_no'] = this.dgSetNo; data['dg_set_no'] = dgSetNo;
data['btry_no'] = this.btryNo; data['btry_no'] = btryNo;
data['state'] = this.state; data['state'] = state;
data['district'] = this.district; data['district'] = district;
data['address'] = this.address; data['address'] = address;
data['branch_id'] = this.branchId; data['branch_id'] = branchId;
data['sales_emp_id'] = this.salesEmpId; data['sales_emp_id'] = salesEmpId;
data['disp_date'] = this.dispDate; data['disp_date'] = dispDate;
data['cmsng_date'] = this.cmsngDate; data['cmsng_date'] = cmsngDate;
data['date_of_engine_sale'] = this.dateOfEngineSale; data['date_of_engine_sale'] = dateOfEngineSale;
data['pdi_date'] = this.pdiDate; data['pdi_date'] = pdiDate;
data['wrnty_expiry_date'] = this.wrntyExpiryDate; data['wrnty_expiry_date'] = wrntyExpiryDate;
data['next_service'] = this.nextService; data['next_service'] = nextService;
data['date'] = this.date; data['date'] = date;
data['extra'] = this.extra; data['extra'] = extra;
data['status'] = this.status; data['status'] = status;
data['data_source'] = this.dataSource; data['data_source'] = dataSource;
data['ref_type'] = this.refType; data['ref_type'] = refType;
data['ref_id'] = this.refId; data['ref_id'] = refId;
data['order_id'] = this.orderId; data['order_id'] = orderId;
data['emp_id'] = this.empId; data['emp_id'] = empId;
data['is_suspense'] = this.isSuspense; data['is_suspense'] = isSuspense;
data['loc'] = this.loc; data['loc'] = loc;
data['temp_loc'] = this.tempLoc; data['temp_loc'] = tempLoc;
data['loc_status'] = this.locStatus; data['loc_status'] = locStatus;
data['is_exist'] = this.isExist; data['is_exist'] = isExist;
data['del_remarks'] = this.delRemarks; data['del_remarks'] = delRemarks;
data['del_emp_id'] = this.delEmpId; data['del_emp_id'] = delEmpId;
data['del_datetime'] = this.delDatetime; data['del_datetime'] = delDatetime;
data['cname'] = this.cname; data['cname'] = cname;
data['mob1'] = this.mob1; data['mob1'] = mob1;
data['mob2'] = this.mob2; data['mob2'] = mob2;
data['mail'] = this.mail; data['mail'] = mail;
data['aname'] = this.aname; data['aname'] = aname;
data['emodel'] = this.emodel; data['emodel'] = emodel;
data['spname'] = this.spname; data['spname'] = spname;
data['complaint_id'] = this.complaintId; data['complaint_id'] = complaintId;
data['opened_date'] = this.openedDate; data['opened_date'] = openedDate;
data['date_of_supply'] = this.dateOfSupply; data['date_of_supply'] = dateOfSupply;
data['complaint_type'] = this.complaintType; data['complaint_type'] = complaintType;
data['complaint_category'] = this.complaintCategory; data['complaint_category'] = complaintCategory;
data['complaint_desc'] = this.complaintDesc; data['complaint_desc'] = complaintDesc;
return data; return data;
} }
} }
...@@ -290,12 +296,12 @@ class CustomerDetails { ...@@ -290,12 +296,12 @@ class CustomerDetails {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['cname'] = this.cname; data['cname'] = cname;
data['aname'] = this.aname; data['aname'] = aname;
data['mob1'] = this.mob1; data['mob1'] = mob1;
data['mob2'] = this.mob2; data['mob2'] = mob2;
data['mail'] = this.mail; data['mail'] = mail;
return data; return data;
} }
} }
...@@ -343,8 +349,8 @@ class GeneratorDetails { ...@@ -343,8 +349,8 @@ class GeneratorDetails {
String? emodel; String? emodel;
String? spname; String? spname;
GeneratorDetails( GeneratorDetails({
{this.id, this.id,
this.oemPemName, this.oemPemName,
this.accId, this.accId,
this.productId, this.productId,
...@@ -384,7 +390,8 @@ class GeneratorDetails { ...@@ -384,7 +390,8 @@ class GeneratorDetails {
this.delEmpId, this.delEmpId,
this.delDatetime, this.delDatetime,
this.emodel, this.emodel,
this.spname}); this.spname,
});
GeneratorDetails.fromJson(Map<String, dynamic> json) { GeneratorDetails.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
...@@ -431,48 +438,48 @@ class GeneratorDetails { ...@@ -431,48 +438,48 @@ class GeneratorDetails {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = this.id; data['id'] = id;
data['oem_pem_name'] = this.oemPemName; data['oem_pem_name'] = oemPemName;
data['acc_id'] = this.accId; data['acc_id'] = accId;
data['product_id'] = this.productId; data['product_id'] = productId;
data['gen_hash_id'] = this.genHashId; data['gen_hash_id'] = genHashId;
data['engine_model'] = this.engineModel; data['engine_model'] = engineModel;
data['alt'] = this.alt; data['alt'] = alt;
data['engine_no'] = this.engineNo; data['engine_no'] = engineNo;
data['alt_no'] = this.altNo; data['alt_no'] = altNo;
data['inv_no'] = this.invNo; data['inv_no'] = invNo;
data['dg_set_no'] = this.dgSetNo; data['dg_set_no'] = dgSetNo;
data['btry_no'] = this.btryNo; data['btry_no'] = btryNo;
data['state'] = this.state; data['state'] = state;
data['district'] = this.district; data['district'] = district;
data['address'] = this.address; data['address'] = address;
data['branch_id'] = this.branchId; data['branch_id'] = branchId;
data['sales_emp_id'] = this.salesEmpId; data['sales_emp_id'] = salesEmpId;
data['disp_date'] = this.dispDate; data['disp_date'] = dispDate;
data['cmsng_date'] = this.cmsngDate; data['cmsng_date'] = cmsngDate;
data['date_of_engine_sale'] = this.dateOfEngineSale; data['date_of_engine_sale'] = dateOfEngineSale;
data['pdi_date'] = this.pdiDate; data['pdi_date'] = pdiDate;
data['wrnty_expiry_date'] = this.wrntyExpiryDate; data['wrnty_expiry_date'] = wrntyExpiryDate;
data['next_service'] = this.nextService; data['next_service'] = nextService;
data['date'] = this.date; data['date'] = date;
data['extra'] = this.extra; data['extra'] = extra;
data['status'] = this.status; data['status'] = status;
data['data_source'] = this.dataSource; data['data_source'] = dataSource;
data['ref_type'] = this.refType; data['ref_type'] = refType;
data['ref_id'] = this.refId; data['ref_id'] = refId;
data['order_id'] = this.orderId; data['order_id'] = orderId;
data['emp_id'] = this.empId; data['emp_id'] = empId;
data['is_suspense'] = this.isSuspense; data['is_suspense'] = isSuspense;
data['loc'] = this.loc; data['loc'] = loc;
data['temp_loc'] = this.tempLoc; data['temp_loc'] = tempLoc;
data['loc_status'] = this.locStatus; data['loc_status'] = locStatus;
data['is_exist'] = this.isExist; data['is_exist'] = isExist;
data['del_remarks'] = this.delRemarks; data['del_remarks'] = delRemarks;
data['del_emp_id'] = this.delEmpId; data['del_emp_id'] = delEmpId;
data['del_datetime'] = this.delDatetime; data['del_datetime'] = delDatetime;
data['emodel'] = this.emodel; data['emodel'] = emodel;
data['spname'] = this.spname; data['spname'] = spname;
return data; return data;
} }
} }
...@@ -492,8 +499,8 @@ class ComplaintDetailsNew { ...@@ -492,8 +499,8 @@ class ComplaintDetailsNew {
String? complaintCategory; String? complaintCategory;
String? complaintDesc; String? complaintDesc;
ComplaintDetailsNew( ComplaintDetailsNew({
{this.cname, this.cname,
this.mob1, this.mob1,
this.mob2, this.mob2,
this.mail, this.mail,
...@@ -505,7 +512,8 @@ class ComplaintDetailsNew { ...@@ -505,7 +512,8 @@ class ComplaintDetailsNew {
this.dateOfSupply, this.dateOfSupply,
this.complaintType, this.complaintType,
this.complaintCategory, this.complaintCategory,
this.complaintDesc}); this.complaintDesc,
});
ComplaintDetailsNew.fromJson(Map<String, dynamic> json) { ComplaintDetailsNew.fromJson(Map<String, dynamic> json) {
cname = json['cname']; cname = json['cname'];
...@@ -524,20 +532,20 @@ class ComplaintDetailsNew { ...@@ -524,20 +532,20 @@ class ComplaintDetailsNew {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['cname'] = this.cname; data['cname'] = cname;
data['mob1'] = this.mob1; data['mob1'] = mob1;
data['mob2'] = this.mob2; data['mob2'] = mob2;
data['mail'] = this.mail; data['mail'] = mail;
data['aname'] = this.aname; data['aname'] = aname;
data['emodel'] = this.emodel; data['emodel'] = emodel;
data['spname'] = this.spname; data['spname'] = spname;
data['complaint_id'] = this.complaintId; data['complaint_id'] = complaintId;
data['opened_date'] = this.openedDate; data['opened_date'] = openedDate;
data['date_of_supply'] = this.dateOfSupply; data['date_of_supply'] = dateOfSupply;
data['complaint_type'] = this.complaintType; data['complaint_type'] = complaintType;
data['complaint_category'] = this.complaintCategory; data['complaint_category'] = complaintCategory;
data['complaint_desc'] = this.complaintDesc; data['complaint_desc'] = complaintDesc;
return data; return data;
} }
} }
...@@ -6,11 +6,10 @@ class DistrictsResponse { ...@@ -6,11 +6,10 @@ class DistrictsResponse {
DistrictsResponse({this.districts, this.error, this.message}); DistrictsResponse({this.districts, this.error, this.message});
DistrictsResponse.fromJson(Map<String, dynamic> json) { DistrictsResponse.fromJson(Map<String, dynamic> json) {
if (json['districts'] != null) { if (json['districts'] != null) {
districts = <Districts>[]; districts = <Districts>[];
json['districts'].forEach((v) { json['districts'].forEach((v) {
districts!.add(new Districts.fromJson(v)); districts!.add(Districts.fromJson(v));
}); });
} }
...@@ -19,14 +18,14 @@ class DistrictsResponse { ...@@ -19,14 +18,14 @@ class DistrictsResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.districts != null) { if (districts != null) {
data['districts'] = this.districts!.map((v) => v.toJson()).toList(); data['districts'] = districts!.map((v) => v.toJson()).toList();
} }
data['error'] = this.error; data['error'] = error;
data['message'] = this.message; data['message'] = message;
return data; return data;
} }
} }
...@@ -61,14 +60,14 @@ class Districts { ...@@ -61,14 +60,14 @@ class Districts {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = this.id; data['id'] = id;
data['state'] = this.state; data['state'] = state;
data['district'] = this.district; data['district'] = district;
data['date'] = this.date; data['date'] = date;
data['is_exists'] = this.isExists; data['is_exists'] = isExists;
data['created_datetime'] = this.createdDatetime; data['created_datetime'] = createdDatetime;
data['updated_datetime'] = this.updatedDatetime; data['updated_datetime'] = updatedDatetime;
return data; return data;
} }
} }
...@@ -3,17 +3,13 @@ class SubLocationsResponse { ...@@ -3,17 +3,13 @@ class SubLocationsResponse {
String? error; String? error;
String? message; String? message;
SubLocationsResponse({ SubLocationsResponse({this.subLocations, this.error, this.message});
this.subLocations,
this.error,
this.message,
});
SubLocationsResponse.fromJson(Map<String, dynamic> json) { SubLocationsResponse.fromJson(Map<String, dynamic> json) {
if (json['sub_locations'] != null) { if (json['sub_locations'] != null) {
subLocations = <SubLocations>[]; subLocations = <SubLocations>[];
json['sub_locations'].forEach((v) { json['sub_locations'].forEach((v) {
subLocations!.add(new SubLocations.fromJson(v)); subLocations!.add(SubLocations.fromJson(v));
}); });
} }
...@@ -22,15 +18,14 @@ class SubLocationsResponse { ...@@ -22,15 +18,14 @@ class SubLocationsResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.subLocations != null) { if (subLocations != null) {
data['sub_locations'] = data['sub_locations'] = subLocations!.map((v) => v.toJson()).toList();
this.subLocations!.map((v) => v.toJson()).toList();
} }
data['error'] = this.error; data['error'] = error;
data['message'] = this.message; data['message'] = message;
return data; return data;
} }
} }
...@@ -65,14 +60,14 @@ class SubLocations { ...@@ -65,14 +60,14 @@ class SubLocations {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = this.id; data['id'] = id;
data['district_id'] = this.districtId; data['district_id'] = districtId;
data['sub_locality'] = this.subLocality; data['sub_locality'] = subLocality;
data['date'] = this.date; data['date'] = date;
data['is_exists'] = this.isExists; data['is_exists'] = isExists;
data['created_datetime'] = this.createdDatetime; data['created_datetime'] = createdDatetime;
data['updated_datetime'] = this.updatedDatetime; data['updated_datetime'] = updatedDatetime;
return data; return data;
} }
} }
...@@ -3,28 +3,31 @@ class commonAccessiblePagesResponse { ...@@ -3,28 +3,31 @@ class commonAccessiblePagesResponse {
List<PagesAccessible>? pagesAccessible; List<PagesAccessible>? pagesAccessible;
String? message; String? message;
commonAccessiblePagesResponse( commonAccessiblePagesResponse({
{this.error, this.pagesAccessible, this.message}); this.error,
this.pagesAccessible,
this.message,
});
commonAccessiblePagesResponse.fromJson(Map<String, dynamic> json) { commonAccessiblePagesResponse.fromJson(Map<String, dynamic> json) {
error = json['error']; error = json['error'];
if (json['pages_accessible'] != null) { if (json['pages_accessible'] != null) {
pagesAccessible = <PagesAccessible>[]; pagesAccessible = <PagesAccessible>[];
json['pages_accessible'].forEach((v) { json['pages_accessible'].forEach((v) {
pagesAccessible!.add(new PagesAccessible.fromJson(v)); pagesAccessible!.add(PagesAccessible.fromJson(v));
}); });
} }
message = json['message']; message = json['message'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['error'] = this.error; data['error'] = error;
if (this.pagesAccessible != null) { if (pagesAccessible != null) {
data['pages_accessible'] = data['pages_accessible'] =
this.pagesAccessible!.map((v) => v.toJson()).toList(); pagesAccessible!.map((v) => v.toJson()).toList();
} }
data['message'] = this.message; data['message'] = message;
return data; return data;
} }
} }
...@@ -43,10 +46,10 @@ class PagesAccessible { ...@@ -43,10 +46,10 @@ class PagesAccessible {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = this.id; data['id'] = id;
data['page_name'] = this.pageName; data['page_name'] = pageName;
data['mode'] = this.mode; data['mode'] = mode;
return data; return data;
} }
} }
...@@ -9,7 +9,7 @@ class commonAccountLedgerFilterResponse { ...@@ -9,7 +9,7 @@ class commonAccountLedgerFilterResponse {
if (json['accounts'] != null) { if (json['accounts'] != null) {
accounts = <Accounts>[]; accounts = <Accounts>[];
json['accounts'].forEach((v) { json['accounts'].forEach((v) {
accounts!.add(new Accounts.fromJson(v)); accounts!.add(Accounts.fromJson(v));
}); });
} }
error = json['error']; error = json['error'];
...@@ -17,12 +17,12 @@ class commonAccountLedgerFilterResponse { ...@@ -17,12 +17,12 @@ class commonAccountLedgerFilterResponse {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.accounts != null) { if (accounts != null) {
data['accounts'] = this.accounts!.map((v) => v.toJson()).toList(); data['accounts'] = accounts!.map((v) => v.toJson()).toList();
} }
data['error'] = this.error; data['error'] = error;
data['message'] = this.message; data['message'] = message;
return data; return data;
} }
} }
...@@ -39,9 +39,9 @@ class Accounts { ...@@ -39,9 +39,9 @@ class Accounts {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = this.id; data['id'] = id;
data['name'] = this.name; data['name'] = name;
return data; return data;
} }
} }
...@@ -5,43 +5,46 @@ class commonAccountLedgerResponse { ...@@ -5,43 +5,46 @@ class commonAccountLedgerResponse {
String? error; String? error;
String? message; String? message;
commonAccountLedgerResponse( commonAccountLedgerResponse({
{this.ledgerList, this.ledgerList,
this.balanceDetails, this.balanceDetails,
this.accountDetails, this.accountDetails,
this.error, this.error,
this.message}); this.message,
});
commonAccountLedgerResponse.fromJson(Map<String, dynamic> json) { commonAccountLedgerResponse.fromJson(Map<String, dynamic> json) {
if (json['ledger_list'] != null) { if (json['ledger_list'] != null) {
ledgerList = <LedgerList>[]; ledgerList = <LedgerList>[];
json['ledger_list'].forEach((v) { json['ledger_list'].forEach((v) {
ledgerList!.add(new LedgerList.fromJson(v)); ledgerList!.add(LedgerList.fromJson(v));
}); });
} }
balanceDetails = json['balance_details'] != null balanceDetails =
? new BalanceDetails.fromJson(json['balance_details']) json['balance_details'] != null
? BalanceDetails.fromJson(json['balance_details'])
: null; : null;
accountDetails = json['account_details'] != null accountDetails =
? new AccountDetails.fromJson(json['account_details']) json['account_details'] != null
? AccountDetails.fromJson(json['account_details'])
: null; : null;
error = json['error']; error = json['error'];
message = json['message']; message = json['message'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
if (this.ledgerList != null) { if (ledgerList != null) {
data['ledger_list'] = this.ledgerList!.map((v) => v.toJson()).toList(); data['ledger_list'] = ledgerList!.map((v) => v.toJson()).toList();
} }
if (this.balanceDetails != null) { if (balanceDetails != null) {
data['balance_details'] = this.balanceDetails!.toJson(); data['balance_details'] = balanceDetails!.toJson();
} }
if (this.accountDetails != null) { if (accountDetails != null) {
data['account_details'] = this.accountDetails!.toJson(); data['account_details'] = accountDetails!.toJson();
} }
data['error'] = this.error; data['error'] = error;
data['message'] = this.message; data['message'] = message;
return data; return data;
} }
} }
...@@ -58,8 +61,8 @@ class LedgerList { ...@@ -58,8 +61,8 @@ class LedgerList {
String? date; String? date;
String? createdDatetime; String? createdDatetime;
LedgerList( LedgerList({
{this.id, this.id,
this.accountId, this.accountId,
this.refType, this.refType,
this.refId, this.refId,
...@@ -68,7 +71,8 @@ class LedgerList { ...@@ -68,7 +71,8 @@ class LedgerList {
this.creditAmount, this.creditAmount,
this.debitAmount, this.debitAmount,
this.date, this.date,
this.createdDatetime}); this.createdDatetime,
});
LedgerList.fromJson(Map<String, dynamic> json) { LedgerList.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
...@@ -84,17 +88,17 @@ class LedgerList { ...@@ -84,17 +88,17 @@ class LedgerList {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = Map<String, dynamic>();
data['id'] = this.id; data['id'] = id;
data['account_id'] = this.accountId; data['account_id'] = accountId;
data['ref_type'] = this.refType; data['ref_type'] = refType;
data['ref_id'] = this.refId; data['ref_id'] = refId;
data['type'] = this.type; data['type'] = type;
data['description'] = this.description; data['description'] = description;
data['credit_amount'] = this.creditAmount; data['credit_amount'] = creditAmount;
data['debit_amount'] = this.debitAmount; data['debit_amount'] = debitAmount;
data['date'] = this.date; data['date'] = date;
data['created_datetime'] = this.createdDatetime; data['created_datetime'] = createdDatetime;
return data; return data;
} }
} }
...@@ -113,10 +117,10 @@ class BalanceDetails { ...@@ -113,10 +117,10 @@ class BalanceDetails {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = <String, dynamic>{};
data['total_debit'] = this.totalDebit; data['total_debit'] = totalDebit;
data['total_credit'] = this.totalCredit; data['total_credit'] = totalCredit;
data['balance'] = this.balance; data['balance'] = balance;
return data; return data;
} }
} }
...@@ -138,8 +142,8 @@ class AccountDetails { ...@@ -138,8 +142,8 @@ class AccountDetails {
String? district; String? district;
String? subLocality; String? subLocality;
AccountDetails( AccountDetails({
{this.id, this.id,
this.type, this.type,
this.refId, this.refId,
this.name, this.name,
...@@ -153,7 +157,8 @@ class AccountDetails { ...@@ -153,7 +157,8 @@ class AccountDetails {
this.bankUpiId, this.bankUpiId,
this.state, this.state,
this.district, this.district,
this.subLocality}); this.subLocality,
});
AccountDetails.fromJson(Map<String, dynamic> json) { AccountDetails.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
...@@ -174,22 +179,22 @@ class AccountDetails { ...@@ -174,22 +179,22 @@ class AccountDetails {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = Map<String, dynamic>();
data['id'] = this.id; data['id'] = id;
data['type'] = this.type; data['type'] = type;
data['ref_id'] = this.refId; data['ref_id'] = refId;
data['name'] = this.name; data['name'] = name;
data['address'] = this.address; data['address'] = address;
data['created_datetime'] = this.createdDatetime; data['created_datetime'] = createdDatetime;
data['bank_name'] = this.bankName; data['bank_name'] = bankName;
data['bank_branch_name'] = this.bankBranchName; data['bank_branch_name'] = bankBranchName;
data['bank_ifsc_code'] = this.bankIfscCode; data['bank_ifsc_code'] = bankIfscCode;
data['bank_account_holder_name'] = this.bankAccountHolderName; data['bank_account_holder_name'] = bankAccountHolderName;
data['bank_account_number'] = this.bankAccountNumber; data['bank_account_number'] = bankAccountNumber;
data['bank_upi_id'] = this.bankUpiId; data['bank_upi_id'] = bankUpiId;
data['state'] = this.state; data['state'] = state;
data['district'] = this.district; data['district'] = district;
data['sub_locality'] = this.subLocality; data['sub_locality'] = subLocality;
return data; return data;
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment