From 2a4059fd661d07ace85ff672c9be393bc45a0236 Mon Sep 17 00:00:00 2001 From: devamirsaleemahmad Date: Wed, 18 Oct 2023 09:58:57 +0300 Subject: [PATCH 1/2] models updates -> 3.13.6 --- .../insurance/Insurance_card_details.dart | 72 ++++++++--------- .../ReauestInsuranceApprovalModel.dart | 32 ++++---- .../insuranceManualUpdateRequest.dart | 28 +++---- lib/core/model/insurance/insurance_card.dart | 79 +++++++++---------- .../insurance_card_update_model.dart | 28 +++---- lib/core/model/labs/LabOrderResult.dart | 30 +++---- lib/core/model/labs/lab_result.dart | 46 +++++------ lib/core/model/labs/patient_lab_orders.dart | 72 ++++++++--------- .../labs/patient_lab_special_result.dart | 8 +- .../labs/request_patient_lab_orders.dart | 26 +++--- .../request_patient_lab_special_result.dart | 38 ++++----- .../labs/request_send_lab_report_email.dart | 58 +++++++------- lib/core/model/my_balance/AdvanceModel.dart | 20 ++--- .../patient_advance_balance_amount.dart | 6 +- lib/core/model/my_balance/patient_info.dart | 10 +-- .../patient_info_and_mobile_number.dart | 50 ++++++------ .../tamara_installment_details.dart | 56 +++++-------- .../blood_pressur/BloodPressureResult.dart | 22 +++--- .../MonthBloodPressureResultAverage.dart | 6 +- .../WeekBloodPressureResultAverage.dart | 6 +- .../YearBloodPressureResultAverage.dart | 12 +-- .../blood_sugar/DiabtecPatientResult.dart | 22 +++--- .../MonthDiabtectResultAverage.dart | 2 +- .../WeekDiabtectResultAverage.dart | 4 +- .../blood_sugar/YearDiabtecResultAverage.dart | 8 +- .../my_trakers/chartData/WeekChartDate.dart | 2 +- .../MonthWeightMeasurementResultAverage.dart | 2 +- .../WeekWeightMeasurementResultAverage.dart | 2 +- .../weight/WeightMeasurementResult.dart | 16 ++-- .../YearWeightMeasurementResultAverage.dart | 10 +-- .../get_notifications_request_model.dart | 6 +- .../get_notifications_response_model.dart | 40 +++++----- .../mark_message_as_read_request_model.dart | 2 +- .../AddProductToCartRequestModel.dart | 10 +-- .../requests/CreateCustomerRequestModel.dart | 14 ++-- .../OffersCategoriesRequestModel.dart | 10 +-- .../requests/OffersProductsRequestModel.dart | 14 ++-- .../offers_stores_response_model.dart | 12 +-- 38 files changed, 432 insertions(+), 449 deletions(-) diff --git a/lib/core/model/insurance/Insurance_card_details.dart b/lib/core/model/insurance/Insurance_card_details.dart index ddc33b2e..c9287a2a 100644 --- a/lib/core/model/insurance/Insurance_card_details.dart +++ b/lib/core/model/insurance/Insurance_card_details.dart @@ -1,44 +1,44 @@ class InsuranceCardDetailsModel { - int approvalLimit; - int companyGroupID; - String companyName; - String companyRemarks; - String dOB; - int deductible; - String effectiveFrom; - String effectiveTo; - String eligabilityFailureReason; - bool isMemberEligible; - String memberID; - String memberName; - String memberStatus; + int? approvalLimit; + int? companyGroupID; + String? companyName; + String? companyRemarks; + String? dOB; + int? deductible; + String? effectiveFrom; + String? effectiveTo; + String? eligabilityFailureReason; + bool? isMemberEligible; + String? memberID; + String? memberName; + String? memberStatus; dynamic message; - String nationalId; - String policyNumber; - String responseMessage; - String room; - String subCategory; + String? nationalId; + String? policyNumber; + String? responseMessage; + String? room; + String? subCategory; InsuranceCardDetailsModel( {this.approvalLimit, - this.companyGroupID, - this.companyName, - this.companyRemarks, - this.dOB, - this.deductible, - this.effectiveFrom, - this.effectiveTo, - this.eligabilityFailureReason, - this.isMemberEligible, - this.memberID, - this.memberName, - this.memberStatus, - this.message, - this.nationalId, - this.policyNumber, - this.responseMessage, - this.room, - this.subCategory}); + this.companyGroupID, + this.companyName, + this.companyRemarks, + this.dOB, + this.deductible, + this.effectiveFrom, + this.effectiveTo, + this.eligabilityFailureReason, + this.isMemberEligible, + this.memberID, + this.memberName, + this.memberStatus, + this.message, + this.nationalId, + this.policyNumber, + this.responseMessage, + this.room, + this.subCategory}); InsuranceCardDetailsModel.fromJson(Map json) { approvalLimit = json['ApprovalLimit']; diff --git a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart index 3fa91ecf..6f154022 100644 --- a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart +++ b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart @@ -1,20 +1,20 @@ class RequestInsuranceApprovalModel { - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int patientID; - String tokenID; - int patientTypeID; - int patientType; - int eXuldAPPNO; - int projectID; - int appointmentNo; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + int? eXuldAPPNO; + int? projectID; + int? appointmentNo; RequestInsuranceApprovalModel( {this.versionID, diff --git a/lib/core/model/insurance/insuranceManualUpdateRequest.dart b/lib/core/model/insurance/insuranceManualUpdateRequest.dart index 5eb8ebb9..5c1f17df 100644 --- a/lib/core/model/insurance/insuranceManualUpdateRequest.dart +++ b/lib/core/model/insurance/insuranceManualUpdateRequest.dart @@ -1,18 +1,18 @@ class InsuranceManualUpdateRequest { - String setupID; - String patientIdentificationID; - int projectID; - String mobileNo; - int activityId; - String component; - bool enableLogging; - String insuranceCompanyName; - String cardHolderName; - String memberShipNo; - String policyNo; - String schemeClass; - int requestType; - int patientID; + String? setupID; + String? patientIdentificationID; + int? projectID; + String? mobileNo; + int? activityId; + String? component; + bool? enableLogging; + String? insuranceCompanyName; + String? cardHolderName; + String? memberShipNo; + String? policyNo; + String? schemeClass; + int? requestType; + int? patientID; InsuranceManualUpdateRequest( {this.setupID, diff --git a/lib/core/model/insurance/insurance_card.dart b/lib/core/model/insurance/insurance_card.dart index e8395c95..364a7269 100644 --- a/lib/core/model/insurance/insurance_card.dart +++ b/lib/core/model/insurance/insurance_card.dart @@ -1,5 +1,3 @@ - - class InsuranceCardModel { double? versionID; int? channel; @@ -8,46 +6,45 @@ class InsuranceCardModel { String? generalid; int? patientOutSA; String? sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int patientID; - String tokenID; - int patientTypeID; - int patientType; - String groupName; - String companyName; - int companyID; - String subCategoryDesc; - int subCategoryID; - String patientCardID; - String insurancePolicyNumber; - bool isActive; - String cardValidTo; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + String? groupName; + String? companyName; + int? companyID; + String? subCategoryDesc; + int? subCategoryID; + String? patientCardID; + String? insurancePolicyNumber; + bool? isActive; + String? cardValidTo; - InsuranceCardModel({ - this.insurancePolicyNumber, - this.subCategoryDesc, - this.subCategoryID, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType, - this.groupName, - this.companyName, - this.companyID, - this.patientCardID, - this.isActive, - this.cardValidTo - }); + InsuranceCardModel( + {this.insurancePolicyNumber, + this.subCategoryDesc, + this.subCategoryID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.groupName, + this.companyName, + this.companyID, + this.patientCardID, + this.isActive, + this.cardValidTo}); InsuranceCardModel.fromJson(Map json) { isActive = json['IsActive']; diff --git a/lib/core/model/insurance/insurance_card_update_model.dart b/lib/core/model/insurance/insurance_card_update_model.dart index 52bd8ad7..d14f65bd 100644 --- a/lib/core/model/insurance/insurance_card_update_model.dart +++ b/lib/core/model/insurance/insurance_card_update_model.dart @@ -1,20 +1,20 @@ class InsuranceUpdateModel { - int patientID; - int patientType; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - String createdOn; - String statusDescription; - int appointmentNo; + int? patientID; + int? patientType; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? createdOn; + String? statusDescription; + int? appointmentNo; InsuranceUpdateModel( {this.patientID, diff --git a/lib/core/model/labs/LabOrderResult.dart b/lib/core/model/labs/LabOrderResult.dart index ecb4ae65..d282c6b4 100644 --- a/lib/core/model/labs/LabOrderResult.dart +++ b/lib/core/model/labs/LabOrderResult.dart @@ -1,23 +1,23 @@ class LabOrderResult { - String description; + String? description; dynamic femaleInterpretativeData; - int gender; - int lineItemNo; + int? gender; + int? lineItemNo; dynamic maleInterpretativeData; dynamic notes; - String packageID; - int patientID; - String projectID; - String referanceRange; - String resultValue; - String sampleCollectedOn; - String sampleReceivedOn; - String setupID; + String? packageID; + int? patientID; + String? projectID; + String? referanceRange; + String? resultValue; + String? sampleCollectedOn; + String? sampleReceivedOn; + String? setupID; dynamic superVerifiedOn; - String testCode; - String uOM; - String verifiedOn; - String verifiedOnDateTime; + String? testCode; + String? uOM; + String? verifiedOn; + String? verifiedOnDateTime; LabOrderResult( {this.description, diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart index e6c78bf2..3de55ff1 100644 --- a/lib/core/model/labs/lab_result.dart +++ b/lib/core/model/labs/lab_result.dart @@ -1,36 +1,36 @@ class LabResultList { - String filterName = ""; - List patientLabResultList = []; + String? filterName = ""; + List? patientLabResultList = []; - LabResultList({this.filterName, LabResult lab}) { - patientLabResultList.add(lab); + LabResultList({this.filterName, LabResult? lab}) { + patientLabResultList!.add(lab!); } } class LabResult { - String description; + String? description; dynamic femaleInterpretativeData; - int gender; - bool isCertificateAllowed; - int lineItemNo; + int? gender; + bool? isCertificateAllowed; + int? lineItemNo; dynamic maleInterpretativeData; dynamic notes; - int orderLineItemNo; - int orderNo; - String packageID; - int patientID; - String projectID; - String referanceRange; - String resultValue; - int resultValueBasedLineItemNo; - String resultValueFlag; - String sampleCollectedOn; - String sampleReceivedOn; - String setupID; + int? orderLineItemNo; + int? orderNo; + String? packageID; + int? patientID; + String? projectID; + String? referanceRange; + String? resultValue; + int? resultValueBasedLineItemNo; + String? resultValueFlag; + String? sampleCollectedOn; + String? sampleReceivedOn; + String? setupID; dynamic superVerifiedOn; - String testCode; - String uOM; - String verifiedOn; + String? testCode; + String? uOM; + String? verifiedOn; dynamic verifiedOnDateTime; LabResult( diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index c2908023..2dc69ef6 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -1,41 +1,41 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class PatientLabOrders { - int actualDoctorRate; - String clinicDescription; - String clinicDescriptionEnglish; + int? actualDoctorRate; + String? clinicDescription; + String? clinicDescriptionEnglish; Null clinicDescriptionN; - int clinicID; - int doctorID; - String doctorImageURL; - String doctorName; - String doctorNameEnglish; + int? clinicID; + int? doctorID; + String? doctorImageURL; + String? doctorName; + String? doctorNameEnglish; Null doctorNameN; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; - String invoiceNo; - String invoiceNo_VP; - bool isActiveDoctorProfile; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - bool isInOutPatient; - String isInOutPatientDescription; - String isInOutPatientDescriptionN; - bool isRead; - String nationalityFlagURL; - int noOfPatientsRate; - DateTime orderDate; - String orderNo; - String patientID; - String projectID; - String projectName; + int? doctorRate; + String ?doctorTitle; + int? gender; + String? genderDescription; + String? invoiceNo; + String? invoiceNo_VP; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + bool? isInOutPatient; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + bool? isRead; + String? nationalityFlagURL; + int? noOfPatientsRate; + DateTime? orderDate; + String? orderNo; + String? patientID; + String? projectID; + String? projectName; Null projectNameN; - String qR; - String setupID; - List speciality; - bool isLiveCareAppointment; + String? qR; + String? setupID; + List? speciality; + bool? isLiveCareAppointment; PatientLabOrders( {this.actualDoctorRate, this.clinicDescription, @@ -152,11 +152,11 @@ class PatientLabOrders { } class PatientLabOrdersList { - String filterName = ""; - List patientLabOrdersList = List(); + String? filterName = ""; + List patientLabOrdersList = []; PatientLabOrdersList( - {this.filterName, PatientLabOrders patientDoctorAppointment}) { - patientLabOrdersList.add(patientDoctorAppointment); + {this.filterName, PatientLabOrders? patientDoctorAppointment}) { + patientLabOrdersList.add(patientDoctorAppointment!); } } diff --git a/lib/core/model/labs/patient_lab_special_result.dart b/lib/core/model/labs/patient_lab_special_result.dart index 8e24a04d..87301f94 100644 --- a/lib/core/model/labs/patient_lab_special_result.dart +++ b/lib/core/model/labs/patient_lab_special_result.dart @@ -1,8 +1,8 @@ class PatientLabSpecialResult { - String invoiceNo; - String moduleID; - String resultData; - String resultDataHTML; + String? invoiceNo; + String? moduleID; + String? resultData; + String? resultDataHTML; dynamic resultDataTxt; PatientLabSpecialResult( diff --git a/lib/core/model/labs/request_patient_lab_orders.dart b/lib/core/model/labs/request_patient_lab_orders.dart index ce9263ef..9f9dd4d3 100644 --- a/lib/core/model/labs/request_patient_lab_orders.dart +++ b/lib/core/model/labs/request_patient_lab_orders.dart @@ -1,17 +1,17 @@ class RequestPatientLabOrders { - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int patientID; - String tokenID; - int patientTypeID; - int patientType; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; RequestPatientLabOrders( {this.versionID, diff --git a/lib/core/model/labs/request_patient_lab_special_result.dart b/lib/core/model/labs/request_patient_lab_special_result.dart index b3794e3c..6cfd8ef6 100644 --- a/lib/core/model/labs/request_patient_lab_special_result.dart +++ b/lib/core/model/labs/request_patient_lab_special_result.dart @@ -1,23 +1,23 @@ class RequestPatientLabSpecialResult { - String invoiceNo; - String invoiceNoVP; - String orderNo; - String setupID; - String projectID; - int clinicID; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int patientID; - String tokenID; - int patientTypeID; - int patientType; + String? invoiceNo; + String? invoiceNoVP; + String? orderNo; + String? setupID; + String? projectID; + int? clinicID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; RequestPatientLabSpecialResult( {this.invoiceNo, diff --git a/lib/core/model/labs/request_send_lab_report_email.dart b/lib/core/model/labs/request_send_lab_report_email.dart index 2188c500..440c4101 100644 --- a/lib/core/model/labs/request_send_lab_report_email.dart +++ b/lib/core/model/labs/request_send_lab_report_email.dart @@ -1,33 +1,33 @@ class RequestSendLabReportEmail { - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int patientID; - String tokenID; - int patientTypeID; - int patientType; - String to; - String dateofBirth; - String patientIditificationNum; - String patientMobileNumber; - String patientName; - String setupID; - String projectName; - String clinicName; - String doctorName; - String projectID; - String invoiceNo; - String invoiceNoVP; - String orderDate; - String orderNo; - bool isDownload; - int doctorID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + String? to; + String? dateofBirth; + String? patientIditificationNum; + String? patientMobileNumber; + String? patientName; + String? setupID; + String? projectName; + String? clinicName; + String? doctorName; + String? projectID; + String? invoiceNo; + String? invoiceNoVP; + String? orderDate; + String? orderNo; + bool? isDownload; + int? doctorID; RequestSendLabReportEmail( {this.versionID, diff --git a/lib/core/model/my_balance/AdvanceModel.dart b/lib/core/model/my_balance/AdvanceModel.dart index d2792990..a186f9f6 100644 --- a/lib/core/model/my_balance/AdvanceModel.dart +++ b/lib/core/model/my_balance/AdvanceModel.dart @@ -2,16 +2,16 @@ import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dar import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; class AdvanceModel { - String fileNumber; - String amount; - HospitalsModel hospitalsModel; - String email; - String note; - String depositorName; - String mobileNumber; - String patientName; - int projectID; - CitiesModel citiessModel; + String? fileNumber; + String? amount; + HospitalsModel? hospitalsModel; + String? email; + String? note; + String? depositorName; + String? mobileNumber; + String? patientName; + int? projectID; + CitiesModel? citiessModel; AdvanceModel( {this.amount, diff --git a/lib/core/model/my_balance/patient_advance_balance_amount.dart b/lib/core/model/my_balance/patient_advance_balance_amount.dart index bcceb3ff..3d8b133f 100644 --- a/lib/core/model/my_balance/patient_advance_balance_amount.dart +++ b/lib/core/model/my_balance/patient_advance_balance_amount.dart @@ -1,8 +1,8 @@ class PatientAdvanceBalanceAmount { - num distanceInKilometers; + num? distanceInKilometers; dynamic patientAdvanceBalanceAmount; - String projectDescription; - int projectID; + String? projectDescription; + int? projectID; PatientAdvanceBalanceAmount( {this.distanceInKilometers, diff --git a/lib/core/model/my_balance/patient_info.dart b/lib/core/model/my_balance/patient_info.dart index 6004f014..0f307ec4 100644 --- a/lib/core/model/my_balance/patient_info.dart +++ b/lib/core/model/my_balance/patient_info.dart @@ -1,9 +1,9 @@ class PatientInfo { - String fullName; - String mobileNumber; - int patientID; - int projectID; - String zipCode; + String? fullName; + String? mobileNumber; + int? patientID; + int? projectID; + String? zipCode; PatientInfo( {this.fullName, diff --git a/lib/core/model/my_balance/patient_info_and_mobile_number.dart b/lib/core/model/my_balance/patient_info_and_mobile_number.dart index 8f05b4d9..a201c4eb 100644 --- a/lib/core/model/my_balance/patient_info_and_mobile_number.dart +++ b/lib/core/model/my_balance/patient_info_and_mobile_number.dart @@ -1,10 +1,10 @@ class PatientInfoAndMobileNumber { - String setupID; - int projectID; - int mainAccountID; - int patientType; - int patientID; - String firstName; + String? setupID; + int? projectID; + int? mainAccountID; + int? patientType; + int? patientID; + String? firstName; Null middleName; Null lastName; Null firstNameN; @@ -14,29 +14,29 @@ class PatientInfoAndMobileNumber { Null dateofBirth; Null dateofBirthN; Null nationalityID; - String mobileNumber; - String emailAddress; + String? mobileNumber; + String? emailAddress; Null zipCode; PatientInfoAndMobileNumber( {this.setupID, - this.projectID, - this.mainAccountID, - this.patientType, - this.patientID, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.gender, - this.dateofBirth, - this.dateofBirthN, - this.nationalityID, - this.mobileNumber, - this.emailAddress, - this.zipCode}); + this.projectID, + this.mainAccountID, + this.patientType, + this.patientID, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.dateofBirthN, + this.nationalityID, + this.mobileNumber, + this.emailAddress, + this.zipCode}); PatientInfoAndMobileNumber.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/core/model/my_balance/tamara_installment_details.dart b/lib/core/model/my_balance/tamara_installment_details.dart index 33e331d7..891b9a86 100644 --- a/lib/core/model/my_balance/tamara_installment_details.dart +++ b/lib/core/model/my_balance/tamara_installment_details.dart @@ -1,30 +1,21 @@ class TamaraInstallmentDetails { - String name; - String description; - MinLimit minLimit; - MinLimit maxLimit; - List supportedInstalments; + String? name; + String? description; + MinLimit? minLimit; + MinLimit? maxLimit; + List? supportedInstalments; - TamaraInstallmentDetails( - {this.name, - this.description, - this.minLimit, - this.maxLimit, - this.supportedInstalments}); + TamaraInstallmentDetails({this.name, this.description, this.minLimit, this.maxLimit, this.supportedInstalments}); TamaraInstallmentDetails.fromJson(Map json) { name = json['name']; description = json['description']; - minLimit = json['minLimit'] != null - ? new MinLimit.fromJson(json['minLimit']) - : null; - maxLimit = json['maxLimit'] != null - ? new MinLimit.fromJson(json['maxLimit']) - : null; + minLimit = json['minLimit'] != null ? new MinLimit.fromJson(json['minLimit']) : null; + maxLimit = json['maxLimit'] != null ? new MinLimit.fromJson(json['maxLimit']) : null; if (json['supportedInstalments'] != null) { supportedInstalments = []; json['supportedInstalments'].forEach((v) { - supportedInstalments.add(new SupportedInstalments.fromJson(v)); + supportedInstalments!.add(new SupportedInstalments.fromJson(v)); }); } } @@ -34,22 +25,21 @@ class TamaraInstallmentDetails { data['name'] = this.name; data['description'] = this.description; if (this.minLimit != null) { - data['minLimit'] = this.minLimit.toJson(); + data['minLimit'] = this.minLimit!.toJson(); } if (this.maxLimit != null) { - data['maxLimit'] = this.maxLimit.toJson(); + data['maxLimit'] = this.maxLimit!.toJson(); } if (this.supportedInstalments != null) { - data['supportedInstalments'] = - this.supportedInstalments.map((v) => v.toJson()).toList(); + data['supportedInstalments'] = this.supportedInstalments!.map((v) => v.toJson()).toList(); } return data; } } class MinLimit { - String currency; - int amount; + String? currency; + int? amount; MinLimit({this.currency, this.amount}); @@ -67,30 +57,26 @@ class MinLimit { } class SupportedInstalments { - int instalments; - MinLimit minLimit; - MinLimit maxLimit; + int? instalments; + MinLimit? minLimit; + MinLimit? maxLimit; SupportedInstalments({this.instalments, this.minLimit, this.maxLimit}); SupportedInstalments.fromJson(Map json) { instalments = json['instalments']; - minLimit = json['minLimit'] != null - ? new MinLimit.fromJson(json['minLimit']) - : null; - maxLimit = json['maxLimit'] != null - ? new MinLimit.fromJson(json['maxLimit']) - : null; + minLimit = json['minLimit'] != null ? new MinLimit.fromJson(json['minLimit']) : null; + maxLimit = json['maxLimit'] != null ? new MinLimit.fromJson(json['maxLimit']) : null; } Map toJson() { final Map data = new Map(); data['instalments'] = this.instalments; if (this.minLimit != null) { - data['minLimit'] = this.minLimit.toJson(); + data['minLimit'] = this.minLimit!.toJson(); } if (this.maxLimit != null) { - data['maxLimit'] = this.maxLimit.toJson(); + data['maxLimit'] = this.maxLimit!.toJson(); } return data; } diff --git a/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart b/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart index 57f2cd54..1528c5f7 100644 --- a/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart +++ b/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart @@ -1,23 +1,23 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class BloodPressureResult { - int patientID; - int lineItemNo; - DateTime bloodPressureDate; - int measuredArm; - int systolicePressure; - int diastolicPressure; + int? patientID; + int? lineItemNo; + DateTime? bloodPressureDate; + int? measuredArm; + int? systolicePressure; + int? diastolicPressure; dynamic remark; - bool isActive; - int chartYear; - String chartMonth; + bool? isActive; + int? chartYear; + String? chartMonth; dynamic yearSystolicePressureAverageResult; dynamic monthSystolicePressureResult; dynamic weekSystolicePressureResult; - int yearDiastolicPressureAverageResult; + int? yearDiastolicPressureAverageResult; dynamic monthDiastolicPressureResult; dynamic weekDiastolicPressureResult; - String measuredArmDesc; + String? measuredArmDesc; dynamic weekDesc; BloodPressureResult( diff --git a/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart index 5343119c..ea0061a1 100644 --- a/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart +++ b/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart @@ -7,9 +7,9 @@ class MonthBloodPressureResultAverage { dynamic weektwoDiastolicPressureAverageResult; dynamic weekoneSystolicePressureAverageResult; dynamic weekoneDiastolicPressureAverageResult; - String weekDesc; - int weekDiastolicPressureAverageResult; - int weekSystolicePressureAverageResult; + String? weekDesc; + int? weekDiastolicPressureAverageResult; + int? weekSystolicePressureAverageResult; MonthBloodPressureResultAverage( {this.weekfourSystolicePressureAverageResult, diff --git a/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart index b7f3fc80..b3fd4b7f 100644 --- a/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart +++ b/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart @@ -1,9 +1,9 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class WeekBloodPressureResultAverage { - int dailySystolicePressureAverageResult; - int dailyDiastolicPressureAverageResult; - DateTime bloodPressureDate; + int? dailySystolicePressureAverageResult; + int? dailyDiastolicPressureAverageResult; + DateTime? bloodPressureDate; WeekBloodPressureResultAverage( {this.dailySystolicePressureAverageResult, diff --git a/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart index 095738d6..bd78d04c 100644 --- a/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart +++ b/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart @@ -1,12 +1,12 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class YearBloodPressureResultAverage { - int monthSystolicePressureAverageResult; - int monthDiastolicPressureAverageResult; + int? monthSystolicePressureAverageResult; + int? monthDiastolicPressureAverageResult; dynamic monthNumber; - String monthName; - String yearName; - DateTime date; + String? monthName; + String? yearName; + DateTime? date; YearBloodPressureResultAverage( {this.monthSystolicePressureAverageResult, @@ -23,7 +23,7 @@ class YearBloodPressureResultAverage { monthNumber = json['monthNumber']; monthName = json['monthName']; yearName = json['yearName']; - date = DateUtil.getMonthDateTime(monthName,yearName); + date = DateUtil.getMonthDateTime(monthName!,yearName); } diff --git a/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart b/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart index 86263155..62decb02 100644 --- a/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart +++ b/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart @@ -1,26 +1,26 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class DiabtecPatientResult { - String chartMonth; + String? chartMonth; var chartYear; - DateTime dateChart; + DateTime? dateChart; var description; var descriptionN; - int diabtecAvarage; - bool isActive; - int lineItemNo; + int? diabtecAvarage; + bool? isActive; + int? lineItemNo; var listMonth; var listWeek; - int measured; - String measuredDesc; + int? measured; + String? measuredDesc; var monthAverageResult; - int patientID; + int? patientID; var remark; var resultDesc; dynamic resultValue; - String unit; + String? unit; var weekAverageResult; - String weekDesc; + String? weekDesc; var yearAverageResult; DiabtecPatientResult( @@ -74,7 +74,7 @@ class DiabtecPatientResult { final Map data = new Map(); data['ChartMonth'] = this.chartMonth; data['ChartYear'] = this.chartYear; - data['DateChart'] = DateUtil.convertDateToString(this.dateChart); + data['DateChart'] = DateUtil.convertDateToString(this.dateChart!); data['Description'] = this.description; data['DescriptionN'] = this.descriptionN; data['DiabtecAvarage'] = this.diabtecAvarage; diff --git a/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart index 65522098..c52c08f3 100644 --- a/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart +++ b/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart @@ -4,7 +4,7 @@ class MonthDiabtectResultAverage { var weektwoAverageResult; var weekoneAverageResult; dynamic weekAverageResult; - String weekDesc; + String? weekDesc; MonthDiabtectResultAverage( {this.weekfourAverageResult, diff --git a/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart index 3b1a8d9c..4d7c7952 100644 --- a/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart +++ b/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart @@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class WeekDiabtectResultAverage { dynamic dailyAverageResult; - DateTime dateChart; + DateTime? dateChart; WeekDiabtectResultAverage({this.dailyAverageResult, this.dateChart}); @@ -14,7 +14,7 @@ class WeekDiabtectResultAverage { Map toJson() { final Map data = new Map(); data['DailyAverageResult'] = this.dailyAverageResult; - data['DateChart'] = DateUtil.convertDateToString(this.dateChart); + data['DateChart'] = DateUtil.convertDateToString(this.dateChart!); return data; } } diff --git a/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart index cfdec286..8521e011 100644 --- a/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart +++ b/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart @@ -3,9 +3,9 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class YearDiabtecResultAverage { dynamic monthAverageResult; var monthNumber; - String monthName; - String yearName; - DateTime date; + String? monthName; + String? yearName; + DateTime? date; YearDiabtecResultAverage( {this.monthAverageResult, @@ -19,7 +19,7 @@ class YearDiabtecResultAverage { monthNumber = json['monthNumber']; monthName = json['monthName']; yearName = json['yearName']; - date = DateUtil.getMonthDateTime(monthName,yearName); + date = DateUtil.getMonthDateTime(monthName!,yearName); } catch (e) { print(e); } diff --git a/lib/core/model/my_trakers/chartData/WeekChartDate.dart b/lib/core/model/my_trakers/chartData/WeekChartDate.dart index d972265d..ae3a9f47 100644 --- a/lib/core/model/my_trakers/chartData/WeekChartDate.dart +++ b/lib/core/model/my_trakers/chartData/WeekChartDate.dart @@ -1,5 +1,5 @@ class WeekChartDate { - final DateTime x; + final DateTime? x; final dynamic y; WeekChartDate({this.x, this.y}); diff --git a/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart index 8165302d..0296399a 100644 --- a/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart +++ b/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart @@ -4,7 +4,7 @@ class MonthWeightMeasurementResultAverage { dynamic weektwoAverageResult; dynamic weekoneAverageResult; dynamic weekAverageResult; - String weekDesc; + String? weekDesc; MonthWeightMeasurementResultAverage( {this.weekfourAverageResult, diff --git a/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart index b7345ad7..1c3566a9 100644 --- a/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart +++ b/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart @@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class WeekWeightMeasurementResultAverage { dynamic dailyAverageResult; - DateTime weightDate; + DateTime? weightDate; WeekWeightMeasurementResultAverage( {this.dailyAverageResult, this.weightDate}); diff --git a/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart b/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart index 337e8662..7436eccc 100644 --- a/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart +++ b/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart @@ -1,17 +1,17 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class WeightMeasurementResult { - int patientID; - int lineItemNo; - int weightMeasured; - DateTime weightDate; + int? patientID; + int? lineItemNo; + int? weightMeasured; + DateTime? weightDate; dynamic remark; - bool isActive; - int measured; + bool? isActive; + int? measured; dynamic unit; - int chartYear; + int? chartYear; dynamic chartMonth; - double yearAverageResult; + double? yearAverageResult; dynamic monthAverageResult; dynamic weekAverageResult; dynamic weekDesc; diff --git a/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart index c2e20cb9..a8d64423 100644 --- a/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart +++ b/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart @@ -2,10 +2,10 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class YearWeightMeasurementResultAverage { dynamic monthAverageResult; - int monthNumber; - String monthName; - String yearName; - DateTime date; + int? monthNumber; + String? monthName; + String? yearName; + DateTime? date; YearWeightMeasurementResultAverage( {this.monthAverageResult, @@ -18,7 +18,7 @@ class YearWeightMeasurementResultAverage { monthNumber = json['monthNumber']; monthName = json['monthName']; yearName = json['yearName']; - date = DateUtil.getMonthDateTime(monthName,yearName); + date = DateUtil.getMonthDateTime(monthName!,yearName); } diff --git a/lib/core/model/notifications/get_notifications_request_model.dart b/lib/core/model/notifications/get_notifications_request_model.dart index 9659754a..1cf99092 100644 --- a/lib/core/model/notifications/get_notifications_request_model.dart +++ b/lib/core/model/notifications/get_notifications_request_model.dart @@ -1,7 +1,7 @@ class GetNotificationsRequestModel { - int notificationStatusID; - int pagingSize; - int currentPage; + int? notificationStatusID; + int? pagingSize; + int? currentPage; GetNotificationsRequestModel( {this.notificationStatusID, this.pagingSize, this.currentPage}); diff --git a/lib/core/model/notifications/get_notifications_response_model.dart b/lib/core/model/notifications/get_notifications_response_model.dart index 1f3bbc28..60b9c764 100644 --- a/lib/core/model/notifications/get_notifications_response_model.dart +++ b/lib/core/model/notifications/get_notifications_response_model.dart @@ -1,25 +1,25 @@ class GetNotificationsResponseModel { - int id; - int recordId; - int patientID; - bool projectOutSA; - String deviceType; - String deviceToken; - String message; - String messageType; - String messageTypeData; + int? id; + int? recordId; + int? patientID; + bool? projectOutSA; + String? deviceType; + String? deviceToken; + String? message; + String? messageType; + String? messageTypeData; dynamic videoURL; - bool isQueue; - String isQueueOn; - String createdOn; - String createdBy; - String notificationType; - bool isSent; - String isSentOn; - bool isRead; - String isReadOn; - int channelID; - int projectID; + bool? isQueue; + String? isQueueOn; + String? createdOn; + String? createdBy; + String? notificationType; + bool? isSent; + String? isSentOn; + bool? isRead; + String? isReadOn; + int? channelID; + int? projectID; GetNotificationsResponseModel( {this.id, diff --git a/lib/core/model/notifications/mark_message_as_read_request_model.dart b/lib/core/model/notifications/mark_message_as_read_request_model.dart index 99dab006..9bf84bbe 100644 --- a/lib/core/model/notifications/mark_message_as_read_request_model.dart +++ b/lib/core/model/notifications/mark_message_as_read_request_model.dart @@ -1,5 +1,5 @@ class MarkMessageAsReadRequestModel { - int notificationPoolID; + int? notificationPoolID; MarkMessageAsReadRequestModel({this.notificationPoolID}); diff --git a/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart b/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart index 69e56ad7..f9a4e718 100644 --- a/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart +++ b/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart @@ -1,10 +1,10 @@ import 'package:flutter/cupertino.dart'; class AddProductToCartRequestModel { - int quantity; - int product_id; - String shopping_cart_type; - int customer_id; + int? quantity; + int? product_id; + String? shopping_cart_type; + int? customer_id; AddProductToCartRequestModel({@required this.product_id, this.customer_id, this.shopping_cart_type = "ShoppingCart", this.quantity = 1}); @@ -21,6 +21,6 @@ class AddProductToCartRequestModel { } class UpdateProductToCartRequestModel extends AddProductToCartRequestModel{ - UpdateProductToCartRequestModel({@required int product_id, @required int customer_id, String shopping_cart_type = "ShoppingCart", int quantity = 1}) + UpdateProductToCartRequestModel({required int product_id, required int customer_id, String shopping_cart_type = "ShoppingCart", int quantity = 1}) : super(customer_id: customer_id, product_id: product_id, quantity: quantity, shopping_cart_type: shopping_cart_type); } diff --git a/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart b/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart index d5022f0f..b3a3d3f6 100644 --- a/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart +++ b/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart @@ -4,13 +4,13 @@ import 'package:flutter/cupertino.dart'; class PackagesCustomerRequestModel { - String username; - String first_name; - String last_name; - String email; - String phone; - String national_id; - String date_of_birth; + String? username; + String? first_name; + String? last_name; + String? email; + String? phone; + String? national_id; + String? date_of_birth; PackagesCustomerRequestModel.fromUser(AuthenticatedUser user){ diff --git a/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart b/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart index 13dba945..ecaf0a5c 100644 --- a/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart +++ b/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart @@ -1,16 +1,16 @@ class OffersCategoriesRequestModel { - final int limit; - final int page; - final int sinceId; + final int? limit; + final int? page; + final int? sinceId; OffersCategoriesRequestModel({this.limit, this.page, this.sinceId}); Map toFlatMap() { return { - if(limit != null && limit > 0) + if(limit != null && limit! > 0) "limit": limit.toString(), - if(page != null && page > 0) + if(page != null && page! > 0) "page": page.toString(), }; } diff --git a/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart b/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart index 79e401a8..00e71e54 100644 --- a/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart +++ b/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart @@ -1,25 +1,25 @@ class OffersProductsRequestModel { - final int categoryId; - final int storeId; - final int limit; + final int? categoryId; + final int? storeId; + final int? limit; // final int page; - int sinceId; + int? sinceId; OffersProductsRequestModel({this.categoryId, this.limit = 50, this.storeId}); Map toFlatMap() { return { - if(limit != null && limit > 0) + if(limit != null && limit! > 0) "limit": limit.toString(), // if(page != null && page > 0) // "page": page.toString(), - if(categoryId != null && categoryId > 0) + if(categoryId != null && categoryId! > 0) "categoryId": categoryId.toString(), - if(storeId != null && storeId > 0) + if(storeId != null && storeId! > 0) "store_id": storeId.toString(), "sinceId": sinceId != null ? sinceId.toString() : "0", diff --git a/lib/core/model/packages_offers/responses/offers_stores_response_model.dart b/lib/core/model/packages_offers/responses/offers_stores_response_model.dart index 6a596e5d..b219aa56 100644 --- a/lib/core/model/packages_offers/responses/offers_stores_response_model.dart +++ b/lib/core/model/packages_offers/responses/offers_stores_response_model.dart @@ -1,21 +1,21 @@ class OfferProjectsResponseModel { OfferProjectsResponseModel({ - this.project,}); + this.project,}); OfferProjectsResponseModel.fromJson(dynamic json) { if (json['stores'] != null) { project = []; json['stores'].forEach((v) { - project.add(OfferProject.fromJson(v)); + project!.add(OfferProject.fromJson(v)); }); } } - List project; + List? project; Map toJson() { final map = {}; if (project != null) { - map['stores'] = project.map((v) => v.toJson()).toList(); + map['stores'] = project!.map((v) => v.toJson()).toList(); } return map; } @@ -31,8 +31,8 @@ class OfferProject { name = json['name']; id = json['id']; } - String name; - int id; + String? name; + int? id; Map toJson() { final map = {}; From 511c9788dab00f5ab943ad6c8d782350328b7d53 Mon Sep 17 00:00:00 2001 From: devamirsaleemahmad Date: Thu, 19 Oct 2023 10:40:30 +0300 Subject: [PATCH 2/2] models updates -> 3.13.6 --- .../PackagesCartItemsResponseModel.dart | 91 +- .../PackagesCategoriesResponseModel.dart | 66 +- .../PackagesCustomerResponseModel.dart | 126 +- .../responses/PackagesResponseModel.dart | 221 +-- .../responses/order_response_model.dart | 373 ++-- .../responses/tamara_payment_option.dart | 10 +- lib/core/model/pharmacies/Addresses.dart | 38 +- lib/core/model/pharmacies/BillingAddress.dart | 45 +- lib/core/model/pharmacies/Country.dart | 10 +- lib/core/model/pharmacies/Customer.dart | 76 +- .../pharmacies/LacumAccountInformation.dart | 820 ++++----- .../LakumInquiryInformationObjVersion.dart | 90 +- .../model/pharmacies/ListUserAgreement.dart | 8 +- lib/core/model/pharmacies/Manufacturer.dart | 36 +- .../pharmacies/PharmacyAddressesModel.dart | 56 +- .../model/pharmacies/PharmacyImageObject.dart | 10 +- .../model/pharmacies/PharmacyProduct.dart | 250 +-- .../pharmacies/PointsAmountPerMonth.dart | 16 +- .../model/pharmacies/PointsAmountPerYear.dart | 14 +- .../model/pharmacies/PointsAmountPerday.dart | 16 +- lib/core/model/pharmacies/PointsDetails.dart | 20 +- lib/core/model/pharmacies/Reviews.dart | 32 +- lib/core/model/pharmacies/ShippingOption.dart | 85 +- lib/core/model/pharmacies/ShoppingCart.dart | 40 +- .../pharmacies/ShoppingCartResponse.dart | 22 +- lib/core/model/pharmacies/order_detail.dart | 279 ++- lib/core/model/pharmacies/order_model.dart | 1562 ++++++++--------- lib/core/model/pharmacies/orders_model.dart | 26 +- .../pharmacies/payment-checkout-data.dart | 12 +- .../pharmacies/pharmacies_list_model.dart | 44 +- .../model/pharmacies/pharmacies_model.dart | 44 +- .../pharmacies/recommendedProduct_model.dart | 114 +- 32 files changed, 2323 insertions(+), 2329 deletions(-) diff --git a/lib/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart b/lib/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart index 99c8a8b4..31350efb 100644 --- a/lib/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart +++ b/lib/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart @@ -1,36 +1,34 @@ - import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; class PackagesCartItemsResponseModel { - int _quantity; + int? _quantity; set quantity(int value) { _quantity = value; } - String _shoppingCartType; - int _productId; - PackagesResponseModel _product; - int _id; - - int get quantity => _quantity; - String get shoppingCartType => _shoppingCartType; - int get productId => _productId; - PackagesResponseModel get product => _product; - int get id => _id; - - PackagesCartItemsResponseModel({ - int quantity, - String shoppingCartType, - int productId, - PackagesResponseModel product, - int id}){ - _quantity = quantity; + String? _shoppingCartType; + int? _productId; + PackagesResponseModel? _product; + int? _id; + + int get quantity => _quantity!; + + String get shoppingCartType => _shoppingCartType!; + + int get productId => _productId!; + + PackagesResponseModel get product => _product!; + + int get id => _id!; + + PackagesCartItemsResponseModel({int? quantity, String? shoppingCartType, int? productId, PackagesResponseModel? product, int? id}) { + _quantity = quantity!; _shoppingCartType = shoppingCartType; _productId = productId; _product = product; _id = id; -} + } PackagesCartItemsResponseModel.fromJson(dynamic json) { _quantity = json["quantity"]; @@ -46,39 +44,37 @@ class PackagesCartItemsResponseModel { map["shopping_cart_type"] = _shoppingCartType; map["product_id"] = _productId; if (_product != null) { - map["product"] = _product.toJson(); + map["product"] = _product!.toJson(); } map["id"] = _id; return map; } - } class Images { - int _id; - int _pictureId; - int _position; - String _src; + int? _id; + int? _pictureId; + int? _position; + String? _src; dynamic _attachment; - int get id => _id; - int get pictureId => _pictureId; - int get position => _position; - String get src => _src; + int get id => _id!; + + int get pictureId => _pictureId!; + + int get position => _position!; + + String get src => _src!; + dynamic get attachment => _attachment; - Images({ - int id, - int pictureId, - int position, - String src, - dynamic attachment}){ + Images({int? id, int? pictureId, int? position, String? src, dynamic attachment}) { _id = id; _pictureId = pictureId; _position = position; _src = src; _attachment = attachment; -} + } Images.fromJson(dynamic json) { _id = json["id"]; @@ -97,25 +93,23 @@ class Images { map["attachment"] = _attachment; return map; } - } /// language_id : 1 /// localized_name : "Dermatology testing" class Localized_names { - int _languageId; - String _localizedName; + int? _languageId; + String? _localizedName; - int get languageId => _languageId; - String get localizedName => _localizedName; + int get languageId => _languageId!; - Localized_names({ - int languageId, - String localizedName}){ + String get localizedName => _localizedName!; + + Localized_names({int? languageId, String? localizedName}) { _languageId = languageId; _localizedName = localizedName; -} + } Localized_names.fromJson(dynamic json) { _languageId = json["language_id"]; @@ -128,5 +122,4 @@ class Localized_names { map["localized_name"] = _localizedName; return map; } - -} \ No newline at end of file +} diff --git a/lib/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart b/lib/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart index 292022c0..a1e747ac 100644 --- a/lib/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart +++ b/lib/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart @@ -2,76 +2,76 @@ import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.da import 'package:diplomaticquarterapp/generated/json/base/json_field.dart'; class PackagesCategoriesResponseModel with JsonConvert { - int id; - String name; - String namen; + int? id; + String? name; + String? namen; @JSONField(name: "localized_names") - List localizedNames; + List? localizedNames; dynamic description; @JSONField(name: "category_template_id") - int categoryTemplateId; + int? categoryTemplateId; @JSONField(name: "meta_keywords") - String metaKeywords; + String? metaKeywords; @JSONField(name: "meta_description") - String metaDescription; + String? metaDescription; @JSONField(name: "meta_title") - String metaTitle; + String? metaTitle; @JSONField(name: "parent_category_id") - int parentCategoryId; + int? parentCategoryId; @JSONField(name: "page_size") - int pageSize; + int? pageSize; @JSONField(name: "page_size_options") - String pageSizeOptions; + String? pageSizeOptions; @JSONField(name: "price_ranges") dynamic priceRanges; @JSONField(name: "show_on_home_page") - bool showOnHomePage; + bool? showOnHomePage; @JSONField(name: "include_in_top_menu") - bool includeInTopMenu; + bool? includeInTopMenu; @JSONField(name: "has_discounts_applied") dynamic hasDiscountsApplied; - bool published; - bool deleted; + bool? published; + bool? deleted; @JSONField(name: "display_order") - int displayOrder; + int? displayOrder; @JSONField(name: "created_on_utc") - String createdOnUtc; + String? createdOnUtc; @JSONField(name: "updated_on_utc") - String updatedOnUtc; + String? updatedOnUtc; @JSONField(name: "role_ids") - List roleIds; + List? roleIds; @JSONField(name: "discount_ids") - List discountIds; + List? discountIds; @JSONField(name: "store_ids") - List storeIds; - OfferCategoriesResponseModelImage image; + List? storeIds; + OfferCategoriesResponseModelImage? image; @JSONField(name: "se_name") - String seName; + String? seName; @JSONField(name: "is_leaf") - bool isLeaf; + bool? isLeaf; @override String toString() { - if(localizedNames.length == 2){ - if(localizedNames.first.languageId == 1) - return localizedNames.first.localizedName ?? name; + if(localizedNames!.length == 2){ + if(localizedNames!.first.languageId == 1) + return localizedNames?.first.localizedName ?? name.toString(); - else if(localizedNames.first.languageId == 2) - return localizedNames.last.localizedName ?? name; + else if(localizedNames?.first.languageId == 2) + return localizedNames?.last.localizedName ?? name.toString(); } - return name; + return name.toString(); } } class OfferCategoriesResponseModelLocalizedName with JsonConvert { @JSONField(name: "language_id") - int languageId; + int? languageId; @JSONField(name: "localized_name") - String localizedName; + String? localizedName; } class OfferCategoriesResponseModelImage with JsonConvert { - String src; + String? src; dynamic thumb; dynamic attachment; } diff --git a/lib/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart b/lib/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart index 245973dd..8ddfd322 100644 --- a/lib/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart +++ b/lib/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart @@ -29,90 +29,90 @@ import 'PackagesCartItemsResponseModel.dart'; /// id : 76823 class PackagesCustomerResponseModel { - List _shoppingCartItems; + List? _shoppingCartItems; dynamic _billingAddress; dynamic _shippingAddress; - List _addresses; - String _customerGuid; + List? _addresses; + String? _customerGuid; dynamic _username; - String _email; + String? _email; dynamic _firstName; dynamic _lastName; dynamic _languageId; dynamic _dateOfBirth; dynamic _gender; dynamic _adminComment; - bool _isTaxExempt; - bool _hasShoppingCartItems; - bool _active; - bool _deleted; - bool _isSystemAccount; + bool? _isTaxExempt; + bool? _hasShoppingCartItems; + bool? _active; + bool? _deleted; + bool? _isSystemAccount; dynamic _systemName; dynamic _lastIpAddress; - String _createdOnUtc; + String? _createdOnUtc; dynamic _lastLoginDateUtc; - String _lastActivityDateUtc; - int _registeredInStoreId; - bool _subscribedToNewsletter; - List _roleIds; - int _id; + String? _lastActivityDateUtc; + int? _registeredInStoreId; + bool? _subscribedToNewsletter; + List? _roleIds; + int? _id; - List get shoppingCartItems => _shoppingCartItems; + List get shoppingCartItems => _shoppingCartItems!; dynamic get billingAddress => _billingAddress; dynamic get shippingAddress => _shippingAddress; - List get addresses => _addresses; - String get customerGuid => _customerGuid; + List get addresses => _addresses!; + String get customerGuid => _customerGuid!; dynamic get username => _username; - String get email => _email; + String get email => _email!; dynamic get firstName => _firstName; dynamic get lastName => _lastName; dynamic get languageId => _languageId; dynamic get dateOfBirth => _dateOfBirth; dynamic get gender => _gender; dynamic get adminComment => _adminComment; - bool get isTaxExempt => _isTaxExempt; - bool get hasShoppingCartItems => _hasShoppingCartItems; - bool get active => _active; - bool get deleted => _deleted; - bool get isSystemAccount => _isSystemAccount; + bool get isTaxExempt => _isTaxExempt!; + bool get hasShoppingCartItems => _hasShoppingCartItems!; + bool get active => _active!; + bool get deleted => _deleted!; + bool get isSystemAccount => _isSystemAccount!; dynamic get systemName => _systemName; dynamic get lastIpAddress => _lastIpAddress; - String get createdOnUtc => _createdOnUtc; + String get createdOnUtc => _createdOnUtc!; dynamic get lastLoginDateUtc => _lastLoginDateUtc; - String get lastActivityDateUtc => _lastActivityDateUtc; - int get registeredInStoreId => _registeredInStoreId; - bool get subscribedToNewsletter => _subscribedToNewsletter; - List get roleIds => _roleIds; - int get id => _id; + String get lastActivityDateUtc => _lastActivityDateUtc!; + int get registeredInStoreId => _registeredInStoreId!; + bool get subscribedToNewsletter => _subscribedToNewsletter!; + List get roleIds => _roleIds!; + int get id => _id!; PackagesCustomerResponseModel({ - List shoppingCartItems, + List? shoppingCartItems, dynamic billingAddress, dynamic shippingAddress, - List addresses, - String customerGuid, + List? addresses, + String? customerGuid, dynamic username, - String email, + String? email, dynamic firstName, dynamic lastName, dynamic languageId, dynamic dateOfBirth, dynamic gender, dynamic adminComment, - bool isTaxExempt, - bool hasShoppingCartItems, - bool active, - bool deleted, - bool isSystemAccount, + bool? isTaxExempt, + bool? hasShoppingCartItems, + bool? active, + bool? deleted, + bool? isSystemAccount, dynamic systemName, dynamic lastIpAddress, - String createdOnUtc, + String? createdOnUtc, dynamic lastLoginDateUtc, - String lastActivityDateUtc, - int registeredInStoreId, - bool subscribedToNewsletter, - List roleIds, - int id}){ + String? lastActivityDateUtc, + int? registeredInStoreId, + bool? subscribedToNewsletter, + List? roleIds, + int? id}){ _shoppingCartItems = shoppingCartItems; _billingAddress = billingAddress; _shippingAddress = shippingAddress; @@ -148,7 +148,7 @@ class PackagesCustomerResponseModel { if (json["addresses"] != null) { _addresses = []; json["addresses"].forEach((v) { - _addresses.add(Addresses.fromJson(v)); + _addresses!.add(Addresses.fromJson(v)); }); } _customerGuid = json["customer_guid"]; @@ -176,14 +176,14 @@ class PackagesCustomerResponseModel { if (json["role_ids"] != null) { _roleIds = []; json["role_ids"].forEach((v) { - _roleIds.add(v); + _roleIds!.add(v); }); } if (json["shopping_cart_items"] != null) { _shoppingCartItems = []; json["shopping_cart_items"].forEach((v) { - _shoppingCartItems.add(PackagesCartItemsResponseModel.fromJson(v)); + _shoppingCartItems!.add(PackagesCartItemsResponseModel.fromJson(v)); }); } @@ -193,12 +193,12 @@ class PackagesCustomerResponseModel { Map toJson() { var map = {}; if (_shoppingCartItems != null) { - map["shopping_cart_items"] = _shoppingCartItems.map((v) => v.toJson()).toList(); + map["shopping_cart_items"] = _shoppingCartItems!.map((v) => v.toJson()).toList(); } map["billing_address"] = _billingAddress; map["shipping_address"] = _shippingAddress; if (_addresses != null) { - map["addresses"] = _addresses.map((v) => v.toJson()).toList(); + map["addresses"] = _addresses!.map((v) => v.toJson()).toList(); } map["customer_guid"] = _customerGuid; map["username"] = _username; @@ -222,7 +222,7 @@ class PackagesCustomerResponseModel { map["registered_in_store_id"] = _registeredInStoreId; map["subscribed_to_newsletter"] = _subscribedToNewsletter; if (_roleIds != null) { - map["role_ids"] = _roleIds.map((v) => v).toList(); + map["role_ids"] = _roleIds!.map((v) => v).toList(); } map["id"] = _id; return map; @@ -251,7 +251,7 @@ class PackagesCustomerResponseModel { class Addresses { dynamic _firstName; dynamic _lastName; - String _email; + String? _email; dynamic _company; dynamic _countryId; dynamic _country; @@ -260,16 +260,16 @@ class Addresses { dynamic _address1; dynamic _address2; dynamic _zipPostalCode; - String _phoneNumber; + String? _phoneNumber; dynamic _faxNumber; dynamic _customerAttributes; - String _createdOnUtc; + String? _createdOnUtc; dynamic _province; - int _id; + int? _id; dynamic get firstName => _firstName; dynamic get lastName => _lastName; - String get email => _email; + String get email => _email!; dynamic get company => _company; dynamic get countryId => _countryId; dynamic get country => _country; @@ -278,17 +278,17 @@ class Addresses { dynamic get address1 => _address1; dynamic get address2 => _address2; dynamic get zipPostalCode => _zipPostalCode; - String get phoneNumber => _phoneNumber; + String get phoneNumber => _phoneNumber!; dynamic get faxNumber => _faxNumber; dynamic get customerAttributes => _customerAttributes; - String get createdOnUtc => _createdOnUtc; + String get createdOnUtc => _createdOnUtc!; dynamic get province => _province; - int get id => _id; + int get id => _id!; Addresses({ dynamic firstName, dynamic lastName, - String email, + String? email, dynamic company, dynamic countryId, dynamic country, @@ -297,12 +297,12 @@ class Addresses { dynamic address1, dynamic address2, dynamic zipPostalCode, - String phoneNumber, + String? phoneNumber, dynamic faxNumber, dynamic customerAttributes, - String createdOnUtc, + String? createdOnUtc, dynamic province, - int id}){ + int? id}){ _firstName = firstName; _lastName = lastName; _email = email; diff --git a/lib/core/model/packages_offers/responses/PackagesResponseModel.dart b/lib/core/model/packages_offers/responses/PackagesResponseModel.dart index 23a864f7..80169400 100644 --- a/lib/core/model/packages_offers/responses/PackagesResponseModel.dart +++ b/lib/core/model/packages_offers/responses/PackagesResponseModel.dart @@ -2,25 +2,25 @@ import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.da import 'package:diplomaticquarterapp/generated/json/base/json_field.dart'; class PackagesResponseModel with JsonConvert { - int id; + int? id; @JSONField(name: "visible_individually") - bool visibleIndividually; - String name; - String namen; + bool? visibleIndividually; + String? name; + String? namen; @JSONField(name: "localized_names") - List localizedNames; + List? localizedNames; @JSONField(name: "short_description") - String shortDescription; + String? shortDescription; @JSONField(name: "short_descriptionn") - String shortDescriptionn; + String? shortDescriptionn; @JSONField(name: "full_description") - String fullDescription; + String? fullDescription; @JSONField(name: "full_descriptionn") - String fullDescriptionn; + String? fullDescriptionn; @JSONField(name: "markas_new") - bool markasNew; + bool? markasNew; @JSONField(name: "show_on_home_page") - bool showOnHomePage; + bool? showOnHomePage; @JSONField(name: "meta_keywords") dynamic metaKeywords; @JSONField(name: "meta_description") @@ -28,20 +28,20 @@ class PackagesResponseModel with JsonConvert { @JSONField(name: "meta_title") dynamic metaTitle; @JSONField(name: "allow_customer_reviews") - bool allowCustomerReviews; + bool? allowCustomerReviews; @JSONField(name: "approved_rating_sum") - int approvedRatingSum; + int? approvedRatingSum; @JSONField(name: "not_approved_rating_sum") - int notApprovedRatingSum; + int? notApprovedRatingSum; @JSONField(name: "approved_total_reviews") - int approvedTotalReviews; + int? approvedTotalReviews; @JSONField(name: "not_approved_total_reviews") - int notApprovedTotalReviews; - String sku; + int? notApprovedTotalReviews; + String? sku; @JSONField(name: "is_rx") - bool isRx; + bool? isRx; @JSONField(name: "prescription_required") - bool prescriptionRequired; + bool? prescriptionRequired; @JSONField(name: "rx_message") dynamic rxMessage; @JSONField(name: "rx_messagen") @@ -50,88 +50,89 @@ class PackagesResponseModel with JsonConvert { dynamic manufacturerPartNumber; dynamic gtin; @JSONField(name: "is_gift_card") - bool isGiftCard; + bool? isGiftCard; @JSONField(name: "require_other_products") - bool requireOtherProducts; + bool? requireOtherProducts; @JSONField(name: "automatically_add_required_products") - bool automaticallyAddRequiredProducts; + bool? automaticallyAddRequiredProducts; @JSONField(name: "is_download") - bool isDownload; + bool? isDownload; + @JSONField(name: "unlimited_downloads") - bool unlimitedDownloads; + bool? unlimitedDownloads; @JSONField(name: "max_number_of_downloads") - int maxNumberOfDownloads; + int? maxNumberOfDownloads; @JSONField(name: "download_expiration_days") dynamic downloadExpirationDays; @JSONField(name: "has_sample_download") - bool hasSampleDownload; + bool? hasSampleDownload; @JSONField(name: "has_user_agreement") - bool hasUserAgreement; + bool? hasUserAgreement; @JSONField(name: "is_recurring") - bool isRecurring; + bool? isRecurring; @JSONField(name: "recurring_cycle_length") - int recurringCycleLength; + int? recurringCycleLength; @JSONField(name: "recurring_total_cycles") - int recurringTotalCycles; + int? recurringTotalCycles; @JSONField(name: "is_rental") - bool isRental; + bool? isRental; @JSONField(name: "rental_price_length") - int rentalPriceLength; + int? rentalPriceLength; @JSONField(name: "is_ship_enabled") - bool isShipEnabled; + bool? isShipEnabled; @JSONField(name: "is_free_shipping") - bool isFreeShipping; + bool? isFreeShipping; @JSONField(name: "ship_separately") - bool shipSeparately; + bool? shipSeparately; @JSONField(name: "additional_shipping_charge") - double additionalShippingCharge; + double? additionalShippingCharge; @JSONField(name: "is_tax_exempt") - bool isTaxExempt; + bool? isTaxExempt; @JSONField(name: "is_telecommunications_or_broadcasting_or_electronic_services") - bool isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; @JSONField(name: "use_multiple_warehouses") - bool useMultipleWarehouses; + bool? useMultipleWarehouses; @JSONField(name: "manage_inventory_method_id") - int manageInventoryMethodId; + int? manageInventoryMethodId; @JSONField(name: "stock_quantity") - int stockQuantity; + int? stockQuantity; @JSONField(name: "stock_availability") - String stockAvailability; + String? stockAvailability; @JSONField(name: "stock_availabilityn") - String stockAvailabilityn; + String? stockAvailabilityn; @JSONField(name: "display_stock_availability") - bool displayStockAvailability; + bool? displayStockAvailability; @JSONField(name: "display_stock_quantity") - bool displayStockQuantity; + bool? displayStockQuantity; @JSONField(name: "min_stock_quantity") - int minStockQuantity; + int? minStockQuantity; @JSONField(name: "notify_admin_for_quantity_below") - int notifyAdminForQuantityBelow; + int? notifyAdminForQuantityBelow; @JSONField(name: "allow_back_in_stock_subscriptions") - bool allowBackInStockSubscriptions; + bool? allowBackInStockSubscriptions; @JSONField(name: "order_minimum_quantity") - int orderMinimumQuantity; + int? orderMinimumQuantity; @JSONField(name: "order_maximum_quantity") - int orderMaximumQuantity; + int? orderMaximumQuantity; @JSONField(name: "allowed_quantities") dynamic allowedQuantities; @JSONField(name: "allow_adding_only_existing_attribute_combinations") - bool allowAddingOnlyExistingAttributeCombinations; + bool? allowAddingOnlyExistingAttributeCombinations; @JSONField(name: "disable_buy_button") - bool disableBuyButton; + bool? disableBuyButton; @JSONField(name: "disable_wishlist_button") - bool disableWishlistButton; + bool? disableWishlistButton; @JSONField(name: "available_for_pre_order") - bool availableForPreOrder; + bool? availableForPreOrder; @JSONField(name: "pre_order_availability_start_date_time_utc") dynamic preOrderAvailabilityStartDateTimeUtc; @JSONField(name: "call_for_price") - bool callForPrice; - double price; + bool? callForPrice; + double? price; @JSONField(name: "old_price") - double oldPrice; + double? oldPrice; @JSONField(name: "product_cost") - double productCost; + double? productCost; @JSONField(name: "special_price") dynamic specialPrice; @JSONField(name: "special_price_start_date_time_utc") @@ -139,21 +140,21 @@ class PackagesResponseModel with JsonConvert { @JSONField(name: "special_price_end_date_time_utc") dynamic specialPriceEndDateTimeUtc; @JSONField(name: "customer_enters_price") - bool customerEntersPrice; + bool? customerEntersPrice; @JSONField(name: "minimum_customer_entered_price") - double minimumCustomerEnteredPrice; + double? minimumCustomerEnteredPrice; @JSONField(name: "maximum_customer_entered_price") - double maximumCustomerEnteredPrice; + double? maximumCustomerEnteredPrice; @JSONField(name: "baseprice_enabled") - bool basepriceEnabled; + bool? basepriceEnabled; @JSONField(name: "baseprice_amount") - double basepriceAmount; + double? basepriceAmount; @JSONField(name: "baseprice_base_amount") - double basepriceBaseAmount; + double? basepriceBaseAmount; @JSONField(name: "has_tier_prices") - bool hasTierPrices; + bool? hasTierPrices; @JSONField(name: "has_discounts_applied") - bool hasDiscountsApplied; + bool? hasDiscountsApplied; @JSONField(name: "discount_name") dynamic discountName; @JSONField(name: "discount_namen") @@ -164,83 +165,83 @@ class PackagesResponseModel with JsonConvert { dynamic discountDescriptionn; @JSONField(name: "discount_percentage") dynamic discountPercentage; - String currency; - String currencyn; - double weight; - double length; - double width; - double height; + String? currency; + String? currencyn; + double? weight; + double? length; + double? width; + double? height; @JSONField(name: "available_start_date_time_utc") dynamic availableStartDateTimeUtc; @JSONField(name: "available_end_date_time_utc") dynamic availableEndDateTimeUtc; @JSONField(name: "display_order") - int displayOrder; - bool published; - bool deleted; + int? displayOrder; + bool? published; + bool? deleted; @JSONField(name: "created_on_utc") - String createdOnUtc; + String? createdOnUtc; @JSONField(name: "updated_on_utc") - String updatedOnUtc; + String? updatedOnUtc; @JSONField(name: "product_type") - String productType; + String? productType; @JSONField(name: "parent_grouped_product_id") - int parentGroupedProductId; + int? parentGroupedProductId; @JSONField(name: "role_ids") - List roleIds; + List? roleIds; @JSONField(name: "discount_ids") - List discountIds; + List? discountIds; @JSONField(name: "store_ids") - List storeIds; + List? storeIds; @JSONField(name: "store_names") - List storeNames; + List? storeNames; @JSONField(name: "manufacturer_ids") - List manufacturerIds; - List reviews; - List images; - List attributes; - List specifications; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; @JSONField(name: "associated_product_ids") - List associatedProductIds; - List tags; + List? associatedProductIds; + List? tags; @JSONField(name: "vendor_id") - int vendorId; + int? vendorId; @JSONField(name: "se_name") - String seName; + String? seName; String getName() { - if (localizedNames.length == 2) { - if (localizedNames.first.languageId == 2) - return localizedNames.first.localizedName ?? name; - else if (localizedNames.first.languageId == 1) return localizedNames.last.localizedName ?? name; + if (localizedNames!.length == 2) { + if (localizedNames?.first.languageId == 2) + return localizedNames!.first.localizedName ?? name.toString(); + else if (localizedNames!.first.languageId == 1) return localizedNames?.last.localizedName ?? name.toString(); } - return name; + return name.toString(); } } class OfferProductsResponseModelLocalizedName with JsonConvert { @JSONField(name: "language_id") - int languageId; + int? languageId; @JSONField(name: "localized_name") - String localizedName; + String? localizedName; } class OfferProductsResponseModelImage with JsonConvert { - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; } class OfferProductsResponseModelSpecification with JsonConvert { - int id; + int? id; @JSONField(name: "display_order") - int displayOrder; + int? displayOrder; @JSONField(name: "default_value") - String defaultValue; + String? defaultValue; @JSONField(name: "default_valuen") - String defaultValuen; - String name; - String nameN; + String? defaultValuen; + String? name; + String? nameN; } diff --git a/lib/core/model/packages_offers/responses/order_response_model.dart b/lib/core/model/packages_offers/responses/order_response_model.dart index 0a464043..aea27a86 100644 --- a/lib/core/model/packages_offers/responses/order_response_model.dart +++ b/lib/core/model/packages_offers/responses/order_response_model.dart @@ -1,36 +1,34 @@ - - import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart'; import 'PackagesCartItemsResponseModel.dart'; class PackagesOrderResponseModel { - String _customOrderNumber; - int _storeId; + String? _customOrderNumber; + int? _storeId; dynamic _pickUpInStore; - String _paymentMethodSystemName; - String _customerCurrencyCode; - double _currencyRate; - int _customerTaxDisplayTypeId; + String? _paymentMethodSystemName; + String? _customerCurrencyCode; + double? _currencyRate; + int? _customerTaxDisplayTypeId; dynamic _vatNumber; - double _orderSubtotalInclTax; - double _orderSubtotalExclTax; - double _orderSubTotalDiscountInclTax; - double _orderSubTotalDiscountExclTax; - double _orderShippingInclTax; - double _orderShippingExclTax; - double _paymentMethodAdditionalFeeInclTax; - double _paymentMethodAdditionalFeeExclTax; - String _taxRates; - double _orderTax; - double _orderDiscount; - double _orderTotal; - double _refundedAmount; + double? _orderSubtotalInclTax; + double? _orderSubtotalExclTax; + double? _orderSubTotalDiscountInclTax; + double? _orderSubTotalDiscountExclTax; + double? _orderShippingInclTax; + double? _orderShippingExclTax; + double? _paymentMethodAdditionalFeeInclTax; + double? _paymentMethodAdditionalFeeExclTax; + String? _taxRates; + double? _orderTax; + double? _orderDiscount; + double? _orderTotal; + double? _refundedAmount; dynamic _rewardPointsWereAdded; - String _checkoutAttributeDescription; - int _customerLanguageId; - int _affiliateId; - String _customerIp; + String? _checkoutAttributeDescription; + int? _customerLanguageId; + int? _affiliateId; + String? _customerIp; dynamic _authorizationTransactionId; dynamic _authorizationTransactionCode; dynamic _authorizationTransactionResult; @@ -40,147 +38,195 @@ class PackagesOrderResponseModel { dynamic _paidDateUtc; dynamic _shippingMethod; dynamic _shippingRateComputationMethodSystemName; - String _customValuesXml; + String? _customValuesXml; dynamic _paymentOption; - bool _deleted; - String _createdOnUtc; - PackagesCustomerResponseModel _customer; - int _customerId; + bool? _deleted; + String? _createdOnUtc; + PackagesCustomerResponseModel? _customer; + int? _customerId; dynamic _billingAddress; dynamic _shippingAddress; - List _orderItems; - String _orderStatus; - String _paymentStatus; - String _shippingStatus; - String _customerTaxDisplayType; - int _id; - - String get customOrderNumber => _customOrderNumber; - int get storeId => _storeId; + List? _orderItems; + String? _orderStatus; + String? _paymentStatus; + String? _shippingStatus; + String? _customerTaxDisplayType; + int? _id; + + String get customOrderNumber => _customOrderNumber!; + + int get storeId => _storeId!; + dynamic get pickUpInStore => _pickUpInStore; - String get paymentMethodSystemName => _paymentMethodSystemName; - String get customerCurrencyCode => _customerCurrencyCode; - double get currencyRate => _currencyRate; - int get customerTaxDisplayTypeId => _customerTaxDisplayTypeId; + + String get paymentMethodSystemName => _paymentMethodSystemName!; + + String get customerCurrencyCode => _customerCurrencyCode!; + + double get currencyRate => _currencyRate!; + + int get customerTaxDisplayTypeId => _customerTaxDisplayTypeId!; + dynamic get vatNumber => _vatNumber; - double get orderSubtotalInclTax => _orderSubtotalInclTax; - double get orderSubtotalExclTax => _orderSubtotalExclTax; - double get orderSubTotalDiscountInclTax => _orderSubTotalDiscountInclTax; - double get orderSubTotalDiscountExclTax => _orderSubTotalDiscountExclTax; - double get orderShippingInclTax => _orderShippingInclTax; - double get orderShippingExclTax => _orderShippingExclTax; - double get paymentMethodAdditionalFeeInclTax => _paymentMethodAdditionalFeeInclTax; - double get paymentMethodAdditionalFeeExclTax => _paymentMethodAdditionalFeeExclTax; - String get taxRates => _taxRates; - double get orderTax => _orderTax; - double get orderDiscount => _orderDiscount; - double get orderTotal => _orderTotal; - double get refundedAmount => _refundedAmount; + + double get orderSubtotalInclTax => _orderSubtotalInclTax!; + + double get orderSubtotalExclTax => _orderSubtotalExclTax!; + + double get orderSubTotalDiscountInclTax => _orderSubTotalDiscountInclTax!; + + double get orderSubTotalDiscountExclTax => _orderSubTotalDiscountExclTax!; + + double get orderShippingInclTax => _orderShippingInclTax!; + + double get orderShippingExclTax => _orderShippingExclTax!; + + double get paymentMethodAdditionalFeeInclTax => _paymentMethodAdditionalFeeInclTax!; + + double get paymentMethodAdditionalFeeExclTax => _paymentMethodAdditionalFeeExclTax!; + + String get taxRates => _taxRates!; + + double get orderTax => _orderTax!; + + double get orderDiscount => _orderDiscount!; + + double get orderTotal => _orderTotal!; + + double get refundedAmount => _refundedAmount!; + dynamic get rewardPointsWereAdded => _rewardPointsWereAdded; - String get checkoutAttributeDescription => _checkoutAttributeDescription; - int get customerLanguageId => _customerLanguageId; - int get affiliateId => _affiliateId; - String get customerIp => _customerIp; + + String get checkoutAttributeDescription => _checkoutAttributeDescription!; + + int get customerLanguageId => _customerLanguageId!; + + int get affiliateId => _affiliateId!; + + String get customerIp => _customerIp!; + dynamic get authorizationTransactionId => _authorizationTransactionId; + dynamic get authorizationTransactionCode => _authorizationTransactionCode; + dynamic get authorizationTransactionResult => _authorizationTransactionResult; + dynamic get captureTransactionId => _captureTransactionId; + dynamic get captureTransactionResult => _captureTransactionResult; + dynamic get subscriptionTransactionId => _subscriptionTransactionId; + dynamic get paidDateUtc => _paidDateUtc; + dynamic get shippingMethod => _shippingMethod; + dynamic get shippingRateComputationMethodSystemName => _shippingRateComputationMethodSystemName; - String get customValuesXml => _customValuesXml; + + String get customValuesXml => _customValuesXml!; + dynamic get paymentOption => _paymentOption; - bool get deleted => _deleted; - String get createdOnUtc => _createdOnUtc; - PackagesCustomerResponseModel get customer => _customer; - int get customerId => _customerId; + + bool get deleted => _deleted!; + + String get createdOnUtc => _createdOnUtc!; + + PackagesCustomerResponseModel get customer => _customer!; + + int get customerId => _customerId!; + dynamic get billingAddress => _billingAddress; + dynamic get shippingAddress => _shippingAddress; - List get orderItems => _orderItems; - String get orderStatus => _orderStatus; - String get paymentStatus => _paymentStatus; - String get shippingStatus => _shippingStatus; - String get customerTaxDisplayType => _customerTaxDisplayType; - int get id => _id; - - OrderResponseModel({ - String customOrderNumber, - int storeId, - dynamic pickUpInStore, - String paymentMethodSystemName, - String customerCurrencyCode, - double currencyRate, - int customerTaxDisplayTypeId, - dynamic vatNumber, - double orderSubtotalInclTax, - double orderSubtotalExclTax, - double orderSubTotalDiscountInclTax, - double orderSubTotalDiscountExclTax, - double orderShippingInclTax, - double orderShippingExclTax, - double paymentMethodAdditionalFeeInclTax, - double paymentMethodAdditionalFeeExclTax, - String taxRates, - double orderTax, - double orderDiscount, - double orderTotal, - double refundedAmount, - dynamic rewardPointsWereAdded, - String checkoutAttributeDescription, - int customerLanguageId, - int affiliateId, - String customerIp, - dynamic authorizationTransactionId, - dynamic authorizationTransactionCode, - dynamic authorizationTransactionResult, - dynamic captureTransactionId, - dynamic captureTransactionResult, - dynamic subscriptionTransactionId, - dynamic paidDateUtc, - dynamic shippingMethod, - dynamic shippingRateComputationMethodSystemName, - String customValuesXml, - dynamic paymentOption, - bool deleted, - String createdOnUtc, - PackagesCustomerResponseModel customer, - int customerId, - dynamic billingAddress, - dynamic shippingAddress, - List orderItems, - String orderStatus, - String paymentStatus, - String shippingStatus, - String customerTaxDisplayType, - int id}){ - _customOrderNumber = customOrderNumber; - _storeId = storeId; + + List get orderItems => _orderItems!; + + String get orderStatus => _orderStatus!; + + String get paymentStatus => _paymentStatus!; + + String get shippingStatus => _shippingStatus!; + + String get customerTaxDisplayType => _customerTaxDisplayType!; + + int get id => _id!; + + OrderResponseModel( + {String? customOrderNumber, + int? storeId, + dynamic pickUpInStore, + String? paymentMethodSystemName, + String? customerCurrencyCode, + double? currencyRate, + int? customerTaxDisplayTypeId, + dynamic vatNumber, + double? orderSubtotalInclTax, + double? orderSubtotalExclTax, + double? orderSubTotalDiscountInclTax, + double? orderSubTotalDiscountExclTax, + double? orderShippingInclTax, + double? orderShippingExclTax, + double? paymentMethodAdditionalFeeInclTax, + double? paymentMethodAdditionalFeeExclTax, + String? taxRates, + double? orderTax, + double? orderDiscount, + double? orderTotal, + double? refundedAmount, + dynamic rewardPointsWereAdded, + String? checkoutAttributeDescription, + int? customerLanguageId, + int? affiliateId, + String? customerIp, + dynamic authorizationTransactionId, + dynamic authorizationTransactionCode, + dynamic authorizationTransactionResult, + dynamic captureTransactionId, + dynamic captureTransactionResult, + dynamic subscriptionTransactionId, + dynamic paidDateUtc, + dynamic shippingMethod, + dynamic shippingRateComputationMethodSystemName, + String? customValuesXml, + dynamic paymentOption, + bool? deleted, + String? createdOnUtc, + PackagesCustomerResponseModel? customer, + int? customerId, + dynamic billingAddress, + dynamic shippingAddress, + List? orderItems, + String? orderStatus, + String? paymentStatus, + String? shippingStatus, + String? customerTaxDisplayType, + int? id}) { + _customOrderNumber = customOrderNumber!; + _storeId = storeId!; _pickUpInStore = pickUpInStore; - _paymentMethodSystemName = paymentMethodSystemName; - _customerCurrencyCode = customerCurrencyCode; - _currencyRate = currencyRate; - _customerTaxDisplayTypeId = customerTaxDisplayTypeId; + _paymentMethodSystemName = paymentMethodSystemName!; + _customerCurrencyCode = customerCurrencyCode!; + _currencyRate = currencyRate!; + _customerTaxDisplayTypeId = customerTaxDisplayTypeId!; _vatNumber = vatNumber; - _orderSubtotalInclTax = orderSubtotalInclTax; - _orderSubtotalExclTax = orderSubtotalExclTax; - _orderSubTotalDiscountInclTax = orderSubTotalDiscountInclTax; - _orderSubTotalDiscountExclTax = orderSubTotalDiscountExclTax; - _orderShippingInclTax = orderShippingInclTax; - _orderShippingExclTax = orderShippingExclTax; - _paymentMethodAdditionalFeeInclTax = paymentMethodAdditionalFeeInclTax; - _paymentMethodAdditionalFeeExclTax = paymentMethodAdditionalFeeExclTax; - _taxRates = taxRates; - _orderTax = orderTax; - _orderDiscount = orderDiscount; - _orderTotal = orderTotal; - _refundedAmount = refundedAmount; + _orderSubtotalInclTax = orderSubtotalInclTax!; + _orderSubtotalExclTax = orderSubtotalExclTax!; + _orderSubTotalDiscountInclTax = orderSubTotalDiscountInclTax!; + _orderSubTotalDiscountExclTax = orderSubTotalDiscountExclTax!; + _orderShippingInclTax = orderShippingInclTax!; + _orderShippingExclTax = orderShippingExclTax!; + _paymentMethodAdditionalFeeInclTax = paymentMethodAdditionalFeeInclTax!; + _paymentMethodAdditionalFeeExclTax = paymentMethodAdditionalFeeExclTax!; + _taxRates = taxRates!; + _orderTax = orderTax!; + _orderDiscount = orderDiscount!; + _orderTotal = orderTotal!; + _refundedAmount = refundedAmount!; _rewardPointsWereAdded = rewardPointsWereAdded; - _checkoutAttributeDescription = checkoutAttributeDescription; - _customerLanguageId = customerLanguageId; - _affiliateId = affiliateId; - _customerIp = customerIp; + _checkoutAttributeDescription = checkoutAttributeDescription!; + _customerLanguageId = customerLanguageId!; + _affiliateId = affiliateId!; + _customerIp = customerIp!; _authorizationTransactionId = authorizationTransactionId; _authorizationTransactionCode = authorizationTransactionCode; _authorizationTransactionResult = authorizationTransactionResult; @@ -190,21 +236,21 @@ class PackagesOrderResponseModel { _paidDateUtc = paidDateUtc; _shippingMethod = shippingMethod; _shippingRateComputationMethodSystemName = shippingRateComputationMethodSystemName; - _customValuesXml = customValuesXml; + _customValuesXml = customValuesXml!; _paymentOption = paymentOption; - _deleted = deleted; - _createdOnUtc = createdOnUtc; - _customer = customer; - _customerId = customerId; + _deleted = deleted!; + _createdOnUtc = createdOnUtc!; + _customer = customer!; + _customerId = customerId!; _billingAddress = billingAddress; _shippingAddress = shippingAddress; - _orderItems = orderItems; - _orderStatus = orderStatus; - _paymentStatus = paymentStatus; - _shippingStatus = shippingStatus; - _customerTaxDisplayType = customerTaxDisplayType; - _id = id; -} + _orderItems = orderItems!; + _orderStatus = orderStatus!; + _paymentStatus = paymentStatus!; + _shippingStatus = shippingStatus!; + _customerTaxDisplayType = customerTaxDisplayType!; + _id = id!; + } PackagesOrderResponseModel.fromJson(dynamic json) { _customOrderNumber = json["custom_order_number"]; @@ -213,7 +259,7 @@ class PackagesOrderResponseModel { _paymentMethodSystemName = json["payment_method_system_name"]; _customerCurrencyCode = json["customer_currency_code"]; _currencyRate = json["currency_rate"]; - _customerTaxDisplayTypeId = json["customer_tax_display_type_id"]; + _customerTaxDisplayTypeId = json["customer_tax_display_type_id"]!; _vatNumber = json["vat_number"]; _orderSubtotalInclTax = json["order_subtotal_incl_tax"]; _orderSubtotalExclTax = json["order_subtotal_excl_tax"]; @@ -246,15 +292,15 @@ class PackagesOrderResponseModel { _paymentOption = json["payment_option"]; _deleted = json["deleted"]; _createdOnUtc = json["created_on_utc"]; - _customer = json["customer"] != null ? PackagesCustomerResponseModel.fromJson(json["customer"]) : null; + _customer = (json["customer"] != null ? PackagesCustomerResponseModel.fromJson(json["customer"]) : null)!; _customerId = json["customer_id"]; _billingAddress = json["billing_address"]; _shippingAddress = json["shipping_address"]; if (json["order_items"] != null) { _orderItems = []; json["order_items"].forEach((v) { - _orderItems.add(PackagesCartItemsResponseModel.fromJson(v)); - }); + _orderItems!.add(PackagesCartItemsResponseModel.fromJson(v)); + })!; } _orderStatus = json["order_status"]; _paymentStatus = json["payment_status"]; @@ -305,13 +351,13 @@ class PackagesOrderResponseModel { map["deleted"] = _deleted; map["created_on_utc"] = _createdOnUtc; if (_customer != null) { - map["customer"] = _customer.toJson(); + map["customer"] = _customer!.toJson(); } map["customer_id"] = _customerId; map["billing_address"] = _billingAddress; map["shipping_address"] = _shippingAddress; if (_orderItems != null) { - map["order_items"] = _orderItems.map((v) => v.toJson()).toList(); + map["order_items"] = _orderItems!.map((v) => v.toJson()).toList(); } map["order_status"] = _orderStatus; map["payment_status"] = _paymentStatus; @@ -320,5 +366,4 @@ class PackagesOrderResponseModel { map["id"] = _id; return map; } - } diff --git a/lib/core/model/packages_offers/responses/tamara_payment_option.dart b/lib/core/model/packages_offers/responses/tamara_payment_option.dart index 2b694a23..dd82287f 100644 --- a/lib/core/model/packages_offers/responses/tamara_payment_option.dart +++ b/lib/core/model/packages_offers/responses/tamara_payment_option.dart @@ -1,9 +1,9 @@ class TamaraPaymentOption { - String name; - double minLimit; - double maxLimit; - int id; - bool enable = true; + String? name; + double? minLimit; + double? maxLimit; + int? id; + bool? enable = true; String fullName() => '$name Months'; diff --git a/lib/core/model/pharmacies/Addresses.dart b/lib/core/model/pharmacies/Addresses.dart index 40bcb778..791ffc7f 100644 --- a/lib/core/model/pharmacies/Addresses.dart +++ b/lib/core/model/pharmacies/Addresses.dart @@ -1,23 +1,23 @@ class Addresses { - String id; - String firstName; - String lastName; - String email; - String company; - int countryId; - String country; - String stateProvinceId; - String city; - String address1; - String address2; - String zipPostalCode; - String phoneNumber; - String faxNumber; - String customerAttributes; - String createdOnUtc; - String province; - String latLong; - bool isChecked; + String? id; + String? firstName; + String? lastName; + String? email; + String? company; + int? countryId; + String? country; + String? stateProvinceId; + String? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + String? faxNumber; + String? customerAttributes; + String? createdOnUtc; + String? province; + String? latLong; + bool? isChecked; Addresses( {this.id, diff --git a/lib/core/model/pharmacies/BillingAddress.dart b/lib/core/model/pharmacies/BillingAddress.dart index 418b28a7..faa56a45 100644 --- a/lib/core/model/pharmacies/BillingAddress.dart +++ b/lib/core/model/pharmacies/BillingAddress.dart @@ -1,24 +1,24 @@ import 'package:google_maps_flutter/google_maps_flutter.dart'; class BillingAddress { - String id; - String firstName; - String lastName; - String email; - String company; - int countryId; - String country; - String stateProvinceId; - String city; - String address1; - String address2; - String zipPostalCode; - String phoneNumber; - String faxNumber; - String customerAttributes; - String createdOnUtc; - String province; - String latLong; + String? id; + String? firstName; + String? lastName; + String? email; + String? company; + int? countryId; + String? country; + String? stateProvinceId; + String? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + String? faxNumber; + String? customerAttributes; + String? createdOnUtc; + String? province; + String? latLong; BillingAddress( {this.id, @@ -85,17 +85,18 @@ class BillingAddress { } LatLng getLocation(){ - if(latLong.contains(',')){ - var parts = latLong.trim().split(','); + if(latLong!.contains(',')){ + var parts = latLong!.trim().split(','); if(parts.length == 2){ var lat = double.tryParse(parts.first); var lng = double.tryParse(parts.last); if(lat != null || lng != null) { - var location = LatLng(lat, lng); + var location = LatLng(lat!, lng!); return location; } } } - return null; + return LatLng(double.nan, double.nan); + //Changed By Aamir } } diff --git a/lib/core/model/pharmacies/Country.dart b/lib/core/model/pharmacies/Country.dart index 77f519d3..26225d71 100644 --- a/lib/core/model/pharmacies/Country.dart +++ b/lib/core/model/pharmacies/Country.dart @@ -1,9 +1,9 @@ class CountryData { - int id; - String name; - String namen; - String twoLetterIsoCode; - String threeLetterIsoCode; + int? id; + String? name; + String? namen; + String? twoLetterIsoCode; + String? threeLetterIsoCode; CountryData( {this.id, diff --git a/lib/core/model/pharmacies/Customer.dart b/lib/core/model/pharmacies/Customer.dart index 9042930e..5d3e49c3 100644 --- a/lib/core/model/pharmacies/Customer.dart +++ b/lib/core/model/pharmacies/Customer.dart @@ -2,37 +2,37 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/BillingAddress.dart'; class Customer { - BillingAddress billingAddress; - BillingAddress shippingAddress; - List addresses; - String fileNumber; - String iqamaNumber; - int isOutSa; - int patientType; - String gender; - String birthDate; - String phone; - String countryCode; - String yahalaAccountno; - String id; - String username; - String email; - String firstName; - String lastName; - String languageId; - String adminComment; - bool isTaxExempt; - bool hasShoppingCartItems; - bool active; - bool deleted; - bool isSystemAccount; - String systemName; - String lastIpAddress; - String createdOnUtc; - String lastLoginDateUtc; - String lastActivityDateUtc; - int registeredInStoreId; - List roleIds; + BillingAddress? billingAddress; + BillingAddress? shippingAddress; + List? addresses; + String? fileNumber; + String? iqamaNumber; + int? isOutSa; + int? patientType; + String? gender; + String? birthDate; + String? phone; + String? countryCode; + String? yahalaAccountno; + String? id; + String? username; + String? email; + String? firstName; + String? lastName; + String? languageId; + String? adminComment; + bool? isTaxExempt; + bool? hasShoppingCartItems; + bool? active; + bool? deleted; + bool? isSystemAccount; + String? systemName; + String? lastIpAddress; + String? createdOnUtc; + String? lastLoginDateUtc; + String? lastActivityDateUtc; + int? registeredInStoreId; + List? roleIds; Customer( {this.billingAddress, @@ -75,9 +75,9 @@ class Customer { ? new BillingAddress.fromJson(json['shipping_address']) : null; if (json['addresses'] != null) { - addresses = new List(); + addresses = []; json['addresses'].forEach((v) { - addresses.add(new Addresses.fromJson(v)); + addresses!.add(new Addresses.fromJson(v)); }); } fileNumber = json['file_number']; @@ -108,9 +108,9 @@ class Customer { lastActivityDateUtc = json['last_activity_date_utc']; registeredInStoreId = json['registered_in_store_id']; if (json['role_ids'] != null) { - roleIds = new List(); + roleIds = []; json['role_ids'].forEach((v) { - roleIds.add(v); + roleIds!.add(v); }); } } @@ -118,13 +118,13 @@ class Customer { Map toJson() { final Map data = new Map(); if (this.billingAddress != null) { - data['billing_address'] = this.billingAddress.toJson(); + data['billing_address'] = this.billingAddress!.toJson(); } if (this.shippingAddress != null) { - data['shipping_address'] = this.shippingAddress.toJson(); + data['shipping_address'] = this.shippingAddress!.toJson(); } if (this.addresses != null) { - data['addresses'] = this.addresses.map((v) => v.toJson()).toList(); + data['addresses'] = this.addresses!.map((v) => v.toJson()).toList(); } data['file_number'] = this.fileNumber; data['iqama_number'] = this.iqamaNumber; diff --git a/lib/core/model/pharmacies/LacumAccountInformation.dart b/lib/core/model/pharmacies/LacumAccountInformation.dart index 4f1d0455..c78b1563 100644 --- a/lib/core/model/pharmacies/LacumAccountInformation.dart +++ b/lib/core/model/pharmacies/LacumAccountInformation.dart @@ -2,414 +2,414 @@ import 'LakumInquiryInformationObjVersion.dart'; class LacumAccountInformation { - String date; - int languageID; - int serviceName; - String time; - String androidLink; - String authenticationTokenID; - String data; - bool dataw; - int dietType; - String errorCode; - String errorEndUserMessage; - String errorEndUserMessageN; - String errorMessage; - int errorType; - int foodCategory; - String iOSLink; - bool isAuthenticated; - int mealOrderStatus; - int mealType; - int messageStatus; - int numberOfResultRecords; - String patientBlodType; - String successMsg; - String successMsgN; - int accountStatus; - String activeArchiveObject; - int activeMedicationCount; - String allMedicationTakenDuringAdmissionList; - int appointmentNo; - String arePatientsOnlineList; - String balanceAmount; - String bloodGroupList; - int cVIUnreadCount; - String checkUserHasAccount; - int complaintNo; - String dischargeList; - int episodeID; - String finalRadiologyList; - String fullName; - String geoFPointsList; - String geoGetPateintInfo; - String getAllDoctorsByProjectAndClinicList; - String getAppointmentNumbersForDoctorList; - String getCheckUpItemsList; - String getCosmeticConferenceForTodayList; - String getDoctorERClinicResult; - String getInvoiceApprovalList; - String getNearestProjectList; - String getPatientAdmissionOrAppoinmentNoList; - String getPatientBloodType; - String getPatientInsuranceCardStatusStatisticsList; - String getSurveyList; - String getTotalRegisteredPatientList; - String getUserDetailsList; - String getCustomerPointInfo; - String hISApprovalList; - String hISInpAdmissionList; - String hISProgNoteAssesmentModelList; - String hMGGetAllOffersList; - bool hasApproval; - bool hasConsultation; - bool hasDental; - bool hasLab; - bool hasPharmacy; - bool hasRad; - String hmgSMSGetByProjectIDAndPatientIDList; - int hoursLeft; - String iNPMGetAllAdmissionList; - String iNPMGetPatientInfoForSickLeaveReportList; - String iNPMHISPatientMedicalStatusUnreadCount; - String iNPMLABGetPatientLabOrdersResultsList; - String iNPMLABGetPatientLabResultsList; - String iNPMLABGetPatientRADReportList; - String iNPMLABGetPatientRadResultsList; - String iNPMRadGetPatientRadOrdersCVIList; - String iNPMRadGetPatientRadOrdersList; - String iNPMRadGetRadMedicalRecordsList; - String iNPGetPrescriptionDischargesList; - String iNPGetPrescriptionReportList; - String identificationNo; - bool isHomeMedicineDeliverySupported; - int isInsertedOrUpdated; - bool isMainAcoountEqualPatienID; - bool isPatientAlreadyAgreed; - bool isPatientCallBackBlackList; - bool isPatientHaveFingerPrint; - bool isPatientOnline; - bool isPatientTokenRemoved; - bool isPaused; - bool isProjectWorkingHours; - String isStoreRateAllowed; - String isStoreRateInserted; - String isStoreRateUpdated; - int labRadUpdatedToRead; - int labReportUnreadNo; - String lakumInquiryInformationObj; - LakumInquiryInformationObjVersion lakumInquiryInformationObjVersion; - String lakumResponseList; - String laserGetBodyPartsByCategoryList; - String laserGetCategoriesList; - String list; - int listCount; - int listCountDeliverd; - int listCountUnDeliverd; - String listDeviceInfo; - String listFamilyAppointments; - String listLabResultsByAppNo; - String listLakumInquiryInformationObj; - String listOpinionGetAllPeriod; - String listOpinionGetAllServices; - String listOpinionGetIsAgreeValue; - String listOpinionGetOpinionLogin; - String listOpinionGetRequestedSerives; - String listOpinionGetShareServicesDetails; - String listOpinionUserTerms; - String listPLO; - String listPLR; - String listPLSR; - String listPRM; - String listPatientFamilyFiles; - String listPatientFileInfo; - String listRAD; - String listRADAPI; - String listActiveGetPrescriptionReportByPatientID; - String listAppointmentsForDentalClinic; - String listBabyInfoResult; - String listCheckInsuranceCoverage; - String listCompanyClass; - String listConsentMedicalReport; - String listDentalAppointments; - String listDeviceTokenIDByAppointmentNo; - String listDischargeDiagnosis; - String listDischargeMedicine; - String listDischargeSummary; - String listDoctorResponse; - String listDoneVaccines; - String listEReferralResult; - String listEReferrals; - String listGetAllPatientsLiveCareAdmin; - String listGetDataForExcel; - String listGetMainCountID; - String listGetPrescriptionReportByPatientID; - String listGetSickLeave; - String listHISInvoice; - String listHISInvoiceProcedures; - String listInpatientInvoices; - String listInsuranceCheckList; - String listInsuranceCompanies; - String listInsuranceCompaniesGroup; - String listInsuranceUpdateDetails; - String listInvoiceApprovalProcedureInfo; - String listIsLastSatisfactionSurveyReviewedModel; - String listLabOrderDetailsModel; - String listMedicalReport; - String listMedicalReportApprovals; - String listMedicalReportStatus; - String listMonthBloodPressureResult; - String listMonthBloodPressureResultAverage; - String listMonthDiabtecPatientResult; - String listMonthDiabtectResultAverage; - String listMonthWeightMeasurementResult; - String listMonthWeightMeasurementResultAverage; - String listOnlinePrescriptionResult; - String listOutPatientInvoices; - String listPHRInvoice; - String listPHRInvoiceItems; - String listPHRPaymentMethods; - String listPateintDetails; - String listPateintInformation; - String listPatientAdmissionInfo; - String listPatientAdvanceBalanceAmount; - String listPatientCallBackLogs; - String listPatientCallBackToUpdateFromICServer; - String listPatientCount; - String listPatientDashboard; - String listPatientERGetAdminClinicsModel; - String listPatientERGetAdminProjectsModel; - String listPatientERGetAllClinicsModel; - String listPatientHISInvoices; - String listPatientICProjects; - String listPatientICProjectsByID; - String listPatientICProjectsTimings; - String listPatientIDByUID; - String listPatientIDForSurveyResult; - String listPatientInfo; - String listPatientInfoForDDScreen; - String listPatientInfoForSickleaveReport; - String listPatientInsuranceCard; - String listPatientInsuranceCardHistory; - String listPatientInsuranceDetails; - String listPatientPHRInvoices; - String listPatientServicePoint; - String listPatientStatusCount; - String listPatientChatRequestMapModel; - String listPatientChatRequestModel; - String listPatientChatRequestVCModel; - String listPaymentMethods; - String listPointServices; - String listPregnancyStagesInfo; - String listProjectAvgERWaitingTime; - String listProjectAvgERWaitingTimeHourly; - String listRadMedicalRecords; - String listRadMedicalRecordsAPI; - String listRadMedicalRecordsCVI; - String listRadMedicalRecordsCVIAPI; - String listRadMedicalRecordsResults; - String listSickLeave; - String listTransaction; - String listVideoConferenceSessions; - String listWeekBloodPressureResult; - String listWeekBloodPressureResultAverage; - String listWeekDiabtecPatientResult; - String listWeekDiabtectResultAverage; - String listWeekWeightMeasurementResult; - String listWeekWeightMeasurementResultAverage; - String listYearBloodPressureResult; - String listYearBloodPressureResultAverage; - String listYearDiabtecPatientResult; - String listYearDiabtecResultAverage; - String listYearWeightMeasurementResult; - String listYearWeightMeasurementResultAverage; - String listEInvoiceForDental; - String listEInvoiceForOnlineCheckIn; - String medGetActivitiesTransactionsStsList; - String medGetAvgMonthTransactionsStsList; - String medGetAvgWeekTransactionsStsList; - String medGetCategoriesList; - String medGetMonthActivitiesTransactionsStsList; - String medGetMonthStepsTransactionsStsList; - String medGetMonthTransactionsStsList; - String medGetPatientLastRecordList; - String medGetSubCategoriesList; - String medGetTransactionsAndActTransactionsResult; - String medGetTransactionsList; - String medGetWeekActivitiesTransactionsStsList; - String medGetWeekStepsTransactionsStsList; - String medGetWeekTransactionsStsList; - String medGetYearActivitiesTransactionsStsList; - String medGetYearSleepTransactionsStsList; - String medGetYearStepsTransactionsStsList; - String medGetYearTransactionsStsList; - String medInsertTransactionsOutputsList; - String medicalRecordImages; - int medicalReportToRead; - int medicalReportUnreadNo; - bool missingIDCardAttachment; - bool missingInsuranceCardAttachment; - bool missingMedicalReportAttachment; - bool missingOtherRelationship; - bool missingPatientContactNo; - bool missingPatientId; - bool missingPatientIdentityNumber; - bool missingPatientName; - bool missingReferralContactNo; - bool missingReferralRelationship; - bool missingReferralRequesterName; - String mobileNumber; - int nationalityNumber; - String onlineCheckInAppointments; - String opinionUserAgreementContent; - bool orderInsert; - String pateintInfoForUpdateList; - String pateintUpatedList; - String patientBirthdayCertificate; - String patientERCMCRequestSummaryByProject; - String patientERCMCRequestWithTotal; - String patientERCMCGetAllServicesList; - String patientERCMCGetTransactionsForOrderList; - String patientERCoordinates; - String patientERCountOrderList; - String patientERCountsForApprovalOffice; - String patientERDeleteOldCurrentDoctorsOutputsList; - String patientERDeliveryGetAllDeliverdOrderList; - String patientERDeliveryGetAllOrderList; - bool patientERDeliveryIsOrderInserted; - bool patientERDeliveryIsOrderUpdated; - bool patientERDeliveryIsPausedChanged; - String patientERDeliveryNextOrder; - int patientERDeliveryOrderInsert; - int patientERDeliveryUpdateOrderStatus; - bool patientERDriverUpdate; - String patientERExacartCheckIsDispenseAccpetableList; - String patientERExacartGetDispenseQuantitiesByOrderIDList; - String patientERExacartGetOrderDetailsByePharmacyOrderNoList; - String patientERExacartGetOrderDetailsList; - String patientERExacartGetTotalDispenseQuantitiesByPresNoList; - bool patientERExacartIsDispenseAdded; - String patientERExacartIsDispenseAddedList; - bool patientERExacartIsOrderCompleted; - String patientERGetAdminByProjectAndRoleList; - String patientERGetAdminProjectsList; - String patientERGetAllDriversList; - String patientERGetAllNeedAproveStatusList; - String patientERGetAllPresOrdersStatusList; - String patientERGetAllProjectsList; - String patientERGetArchiveInformationList; - String patientERGetAskDoctorTotalByDateFilterList; - String patientERGetBookScheduleConfigsList; - String patientERGetClinicAndTimeAndEpisodeForAppointmentList; - String patientERGetClinicAndTimeForDischargeList; - String patientERGetDashboardDataforApporvalSectionForAdminList; - String patientERGetDashboardDataforApporvalSectionList; - String patientERGetDashboardDataforHHCSectionForAdminList; - String patientERGetDashboardDataforHHCSectionList; - String patientERGetDashboardDataforPrescriptionSectionForAdminList; - String patientERGetDashboardDataforPrescriptionSectionList; - String patientERGetDoctorDashboardDataModelList; - String patientERGetDriverLocationList; - String patientERGetInsuranceCardRequestByDateFilterList; - String patientERGetLiveCareSummaryBookedAppoinmentStatusList; - String patientERGetLiveCareSummaryCovidList; - String patientERGetLiveCareSummaryForCMCList; - String patientERGetLiveCareSummaryForHHCList; - String patientERGetLiveCareSummaryForHomeDeliveryList; - String patientERGetLiveCareSummaryForInsuranceCardRequestList; - String patientERGetLiveCareSummaryForNewFilesList; - String patientERGetLiveCareSummaryForOnlinePaymetRequestList; - String patientERGetLiveCareSummaryForOnlinePharmacyOrdersList; - String patientERGetLiveCareSummaryForTrasnportationList; - String patientERGetLiveCareSummaryLiveCareCountsList; - String patientERGetMedicalRequestTotalByDateFilterList; - String patientERGetNearestPendingOrdersList; - String patientERGetNeedAproveHistoryForOrderList; - String patientERGetNeedAprovePendingOrdersList; - String patientERGetNeedAproveStatusStatisticsList; - String patientERGetPatientAllPresOrdersList; - String patientERGetPendingPatientsCountList; - String patientERGetPresOrdersHistoryForAdminList; - String patientERGetPresOrdersHistoryForOrderList; - String patientERGetPresOrdersStatusStatisticsList; - String patientERHHCRequest; - String patientERHHCRequestSummaryByProject; - String patientERHHCRequestWithTotal; - String patientERHHCGetAllServicesList; - String patientERHHCGetTransactionsForOrderList; - String patientERHomeDeliveryCounts; - bool patientERInsertDriver; - String patientERInsertNewCurrentDoctorsOutputsList; - String patientERInsuranceStatusCountList; - bool patientERIsNearestProjectUpdated; - bool patientERIsNeedAproveReturnedToQueue; - bool patientERIsNeedAproveUpdated; - bool patientERIsOrderClientRequestUpdated; - bool patientERIsOrderReturnedToQueue; - bool patientERIsPresOrderInserted; - bool patientERIsPresOrderUpdated; - bool patientERIsProjectUpdated; - String patientERNotCompletedDetails; - String patientERPatientsCountByCallStatus; - String patientERPeakHourCounts; - String patientERPresOrderInfo; - String patientERPrescriptionCounts; - String patientERProjectsContribution; - String patientERRRTGetAllQuestionsList; - String patientERRRTGetAllTransportationMethodList; - String patientERRRTGetPickUpRequestByPresOrderIDList; - String patientERRealRRTGetAllServicesList; - String patientERRealRRTGetOrderDetailsList; - String patientERRealRRTGetTransactionsForOrderList; - bool patientERRealRRTIsTransInserted; - String patientERRequestList; - String patientERTransportationRequestWithTotal; - String patientERealRRTGetServicePriceList; - String patientInfoByAdmissionNoList; - String patientMonitorGetPatientHeartRate; - int patientNotServedCounts; - String patientPrescriptionList; - String patientAllergies; - String patientCheckAppointmentValidationList; - String patientLoginTokenList; - String patientQRLoginInfoList; - String patientSELECTDeviceIMEIbyIMEIList; - String pharmList; - String prefLang; - int radReportUnreadNo; - String radGetPatientRadOrdersForDentalList; - int referralNumber; - String reminderConfigurations; - String requestNo; - int rowCount; - String servicePrivilegeList; - String shareFamilyFileObj; - String status; - int successCode; - String surveyRate; - String symptomCheckerConditionList; - String symptomCheckerGetAllDefaultQuestionsList; - String symptomCheckerGetBodyPartSymptomsList; - String symptomCheckerGetBodyPartsByCodeList; - String symptomCheckerGetBodyPartsList; - String symptomCheckerJsonResponseInString; - int timerTime; - int totalAdvanceBalanceAmount; - int totalPatientsCount; - int totalPendingApprovalCount; - int totalUnUsedCount; - int transactionNo; - int unReadCounts; - bool updateStatus; - String userAgreementContent; - int yahalaAccountNo; - bool check24HourComplaint; - String currency; - String message; - int patientID; - int returnValue; - String returnValueStr; - int statusCode; + String? date; + int? languageID; + int? serviceName; + String? time; + String? androidLink; + String? authenticationTokenID; + String? data; + bool? dataw; + int? dietType; + String? errorCode; + String? errorEndUserMessage; + String? errorEndUserMessageN; + String? errorMessage; + int? errorType; + int? foodCategory; + String? iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + String? patientBlodType; + String? successMsg; + String? successMsgN; + int? accountStatus; + String? activeArchiveObject; + int? activeMedicationCount; + String? allMedicationTakenDuringAdmissionList; + int? appointmentNo; + String? arePatientsOnlineList; + String? balanceAmount; + String? bloodGroupList; + int? cVIUnreadCount; + String? checkUserHasAccount; + int? complaintNo; + String? dischargeList; + int? episodeID; + String? finalRadiologyList; + String? fullName; + String? geoFPointsList; + String? geoGetPateintInfo; + String? getAllDoctorsByProjectAndClinicList; + String? getAppointmentNumbersForDoctorList; + String? getCheckUpItemsList; + String? getCosmeticConferenceForTodayList; + String? getDoctorERClinicResult; + String? getInvoiceApprovalList; + String? getNearestProjectList; + String? getPatientAdmissionOrAppoinmentNoList; + String? getPatientBloodType; + String? getPatientInsuranceCardStatusStatisticsList; + String? getSurveyList; + String? getTotalRegisteredPatientList; + String? getUserDetailsList; + String? getCustomerPointInfo; + String? hISApprovalList; + String? hISInpAdmissionList; + String? hISProgNoteAssesmentModelList; + String? hMGGetAllOffersList; + bool? hasApproval; + bool? hasConsultation; + bool? hasDental; + bool? hasLab; + bool? hasPharmacy; + bool? hasRad; + String? hmgSMSGetByProjectIDAndPatientIDList; + int? hoursLeft; + String? iNPMGetAllAdmissionList; + String? iNPMGetPatientInfoForSickLeaveReportList; + String? iNPMHISPatientMedicalStatusUnreadCount; + String? iNPMLABGetPatientLabOrdersResultsList; + String? iNPMLABGetPatientLabResultsList; + String? iNPMLABGetPatientRADReportList; + String? iNPMLABGetPatientRadResultsList; + String? iNPMRadGetPatientRadOrdersCVIList; + String? iNPMRadGetPatientRadOrdersList; + String? iNPMRadGetRadMedicalRecordsList; + String? iNPGetPrescriptionDischargesList; + String? iNPGetPrescriptionReportList; + String? identificationNo; + bool? isHomeMedicineDeliverySupported; + int? isInsertedOrUpdated; + bool? isMainAcoountEqualPatienID; + bool? isPatientAlreadyAgreed; + bool? isPatientCallBackBlackList; + bool? isPatientHaveFingerPrint; + bool? isPatientOnline; + bool? isPatientTokenRemoved; + bool? isPaused; + bool? isProjectWorkingHours; + String? isStoreRateAllowed; + String? isStoreRateInserted; + String? isStoreRateUpdated; + int? labRadUpdatedToRead; + int? labReportUnreadNo; + String? lakumInquiryInformationObj; + LakumInquiryInformationObjVersion? lakumInquiryInformationObjVersion; + String? lakumResponseList; + String? laserGetBodyPartsByCategoryList; + String? laserGetCategoriesList; + String? list; + int? listCount; + int? listCountDeliverd; + int? listCountUnDeliverd; + String? listDeviceInfo; + String? listFamilyAppointments; + String? listLabResultsByAppNo; + String? listLakumInquiryInformationObj; + String? listOpinionGetAllPeriod; + String? listOpinionGetAllServices; + String? listOpinionGetIsAgreeValue; + String? listOpinionGetOpinionLogin; + String? listOpinionGetRequestedSerives; + String? listOpinionGetShareServicesDetails; + String? listOpinionUserTerms; + String? listPLO; + String? listPLR; + String? listPLSR; + String? listPRM; + String? listPatientFamilyFiles; + String? listPatientFileInfo; + String? listRAD; + String? listRADAPI; + String? listActiveGetPrescriptionReportByPatientID; + String? listAppointmentsForDentalClinic; + String? listBabyInfoResult; + String? listCheckInsuranceCoverage; + String? listCompanyClass; + String? listConsentMedicalReport; + String? listDentalAppointments; + String? listDeviceTokenIDByAppointmentNo; + String? listDischargeDiagnosis; + String? listDischargeMedicine; + String? listDischargeSummary; + String? listDoctorResponse; + String? listDoneVaccines; + String? listEReferralResult; + String? listEReferrals; + String? listGetAllPatientsLiveCareAdmin; + String? listGetDataForExcel; + String? listGetMainCountID; + String? listGetPrescriptionReportByPatientID; + String? listGetSickLeave; + String? listHISInvoice; + String? listHISInvoiceProcedures; + String? listInpatientInvoices; + String? listInsuranceCheckList; + String? listInsuranceCompanies; + String? listInsuranceCompaniesGroup; + String? listInsuranceUpdateDetails; + String? listInvoiceApprovalProcedureInfo; + String? listIsLastSatisfactionSurveyReviewedModel; + String? listLabOrderDetailsModel; + String? listMedicalReport; + String? listMedicalReportApprovals; + String? listMedicalReportStatus; + String? listMonthBloodPressureResult; + String? listMonthBloodPressureResultAverage; + String? listMonthDiabtecPatientResult; + String? listMonthDiabtectResultAverage; + String? listMonthWeightMeasurementResult; + String? listMonthWeightMeasurementResultAverage; + String? listOnlinePrescriptionResult; + String? listOutPatientInvoices; + String? listPHRInvoice; + String? listPHRInvoiceItems; + String? listPHRPaymentMethods; + String? listPateintDetails; + String? listPateintInformation; + String? listPatientAdmissionInfo; + String? listPatientAdvanceBalanceAmount; + String? listPatientCallBackLogs; + String? listPatientCallBackToUpdateFromICServer; + String? listPatientCount; + String? listPatientDashboard; + String? listPatientERGetAdminClinicsModel; + String? listPatientERGetAdminProjectsModel; + String? listPatientERGetAllClinicsModel; + String? listPatientHISInvoices; + String? listPatientICProjects; + String? listPatientICProjectsByID; + String? listPatientICProjectsTimings; + String? listPatientIDByUID; + String? listPatientIDForSurveyResult; + String? listPatientInfo; + String? listPatientInfoForDDScreen; + String? listPatientInfoForSickleaveReport; + String? listPatientInsuranceCard; + String? listPatientInsuranceCardHistory; + String? listPatientInsuranceDetails; + String? listPatientPHRInvoices; + String? listPatientServicePoint; + String? listPatientStatusCount; + String? listPatientChatRequestMapModel; + String? listPatientChatRequestModel; + String? listPatientChatRequestVCModel; + String? listPaymentMethods; + String? listPointServices; + String? listPregnancyStagesInfo; + String? listProjectAvgERWaitingTime; + String? listProjectAvgERWaitingTimeHourly; + String? listRadMedicalRecords; + String? listRadMedicalRecordsAPI; + String? listRadMedicalRecordsCVI; + String? listRadMedicalRecordsCVIAPI; + String? listRadMedicalRecordsResults; + String? listSickLeave; + String? listTransaction; + String? listVideoConferenceSessions; + String? listWeekBloodPressureResult; + String? listWeekBloodPressureResultAverage; + String? listWeekDiabtecPatientResult; + String? listWeekDiabtectResultAverage; + String? listWeekWeightMeasurementResult; + String? listWeekWeightMeasurementResultAverage; + String? listYearBloodPressureResult; + String? listYearBloodPressureResultAverage; + String? listYearDiabtecPatientResult; + String? listYearDiabtecResultAverage; + String? listYearWeightMeasurementResult; + String? listYearWeightMeasurementResultAverage; + String? listEInvoiceForDental; + String? listEInvoiceForOnlineCheckIn; + String? medGetActivitiesTransactionsStsList; + String? medGetAvgMonthTransactionsStsList; + String? medGetAvgWeekTransactionsStsList; + String? medGetCategoriesList; + String? medGetMonthActivitiesTransactionsStsList; + String? medGetMonthStepsTransactionsStsList; + String? medGetMonthTransactionsStsList; + String? medGetPatientLastRecordList; + String? medGetSubCategoriesList; + String? medGetTransactionsAndActTransactionsResult; + String? medGetTransactionsList; + String? medGetWeekActivitiesTransactionsStsList; + String? medGetWeekStepsTransactionsStsList; + String? medGetWeekTransactionsStsList; + String? medGetYearActivitiesTransactionsStsList; + String? medGetYearSleepTransactionsStsList; + String? medGetYearStepsTransactionsStsList; + String? medGetYearTransactionsStsList; + String? medInsertTransactionsOutputsList; + String? medicalRecordImages; + int? medicalReportToRead; + int? medicalReportUnreadNo; + bool? missingIDCardAttachment; + bool? missingInsuranceCardAttachment; + bool? missingMedicalReportAttachment; + bool? missingOtherRelationship; + bool? missingPatientContactNo; + bool? missingPatientId; + bool? missingPatientIdentityNumber; + bool? missingPatientName; + bool? missingReferralContactNo; + bool? missingReferralRelationship; + bool? missingReferralRequesterName; + String? mobileNumber; + int? nationalityNumber; + String? onlineCheckInAppointments; + String? opinionUserAgreementContent; + bool? orderInsert; + String? pateintInfoForUpdateList; + String? pateintUpatedList; + String? patientBirthdayCertificate; + String? patientERCMCRequestSummaryByProject; + String? patientERCMCRequestWithTotal; + String? patientERCMCGetAllServicesList; + String? patientERCMCGetTransactionsForOrderList; + String? patientERCoordinates; + String? patientERCountOrderList; + String? patientERCountsForApprovalOffice; + String? patientERDeleteOldCurrentDoctorsOutputsList; + String? patientERDeliveryGetAllDeliverdOrderList; + String? patientERDeliveryGetAllOrderList; + bool? patientERDeliveryIsOrderInserted; + bool? patientERDeliveryIsOrderUpdated; + bool? patientERDeliveryIsPausedChanged; + String? patientERDeliveryNextOrder; + int? patientERDeliveryOrderInsert; + int? patientERDeliveryUpdateOrderStatus; + bool? patientERDriverUpdate; + String? patientERExacartCheckIsDispenseAccpetableList; + String? patientERExacartGetDispenseQuantitiesByOrderIDList; + String? patientERExacartGetOrderDetailsByePharmacyOrderNoList; + String? patientERExacartGetOrderDetailsList; + String? patientERExacartGetTotalDispenseQuantitiesByPresNoList; + bool? patientERExacartIsDispenseAdded; + String? patientERExacartIsDispenseAddedList; + bool? patientERExacartIsOrderCompleted; + String? patientERGetAdminByProjectAndRoleList; + String? patientERGetAdminProjectsList; + String? patientERGetAllDriversList; + String? patientERGetAllNeedAproveStatusList; + String? patientERGetAllPresOrdersStatusList; + String? patientERGetAllProjectsList; + String? patientERGetArchiveInformationList; + String? patientERGetAskDoctorTotalByDateFilterList; + String? patientERGetBookScheduleConfigsList; + String? patientERGetClinicAndTimeAndEpisodeForAppointmentList; + String? patientERGetClinicAndTimeForDischargeList; + String? patientERGetDashboardDataforApporvalSectionForAdminList; + String? patientERGetDashboardDataforApporvalSectionList; + String? patientERGetDashboardDataforHHCSectionForAdminList; + String? patientERGetDashboardDataforHHCSectionList; + String? patientERGetDashboardDataforPrescriptionSectionForAdminList; + String? patientERGetDashboardDataforPrescriptionSectionList; + String? patientERGetDoctorDashboardDataModelList; + String? patientERGetDriverLocationList; + String? patientERGetInsuranceCardRequestByDateFilterList; + String? patientERGetLiveCareSummaryBookedAppoinmentStatusList; + String? patientERGetLiveCareSummaryCovidList; + String? patientERGetLiveCareSummaryForCMCList; + String? patientERGetLiveCareSummaryForHHCList; + String? patientERGetLiveCareSummaryForHomeDeliveryList; + String? patientERGetLiveCareSummaryForInsuranceCardRequestList; + String? patientERGetLiveCareSummaryForNewFilesList; + String? patientERGetLiveCareSummaryForOnlinePaymetRequestList; + String? patientERGetLiveCareSummaryForOnlinePharmacyOrdersList; + String? patientERGetLiveCareSummaryForTrasnportationList; + String? patientERGetLiveCareSummaryLiveCareCountsList; + String? patientERGetMedicalRequestTotalByDateFilterList; + String? patientERGetNearestPendingOrdersList; + String? patientERGetNeedAproveHistoryForOrderList; + String? patientERGetNeedAprovePendingOrdersList; + String? patientERGetNeedAproveStatusStatisticsList; + String? patientERGetPatientAllPresOrdersList; + String? patientERGetPendingPatientsCountList; + String? patientERGetPresOrdersHistoryForAdminList; + String? patientERGetPresOrdersHistoryForOrderList; + String? patientERGetPresOrdersStatusStatisticsList; + String? patientERHHCRequest; + String? patientERHHCRequestSummaryByProject; + String? patientERHHCRequestWithTotal; + String? patientERHHCGetAllServicesList; + String? patientERHHCGetTransactionsForOrderList; + String? patientERHomeDeliveryCounts; + bool? patientERInsertDriver; + String? patientERInsertNewCurrentDoctorsOutputsList; + String? patientERInsuranceStatusCountList; + bool? patientERIsNearestProjectUpdated; + bool? patientERIsNeedAproveReturnedToQueue; + bool? patientERIsNeedAproveUpdated; + bool? patientERIsOrderClientRequestUpdated; + bool? patientERIsOrderReturnedToQueue; + bool? patientERIsPresOrderInserted; + bool? patientERIsPresOrderUpdated; + bool? patientERIsProjectUpdated; + String? patientERNotCompletedDetails; + String? patientERPatientsCountByCallStatus; + String? patientERPeakHourCounts; + String? patientERPresOrderInfo; + String? patientERPrescriptionCounts; + String? patientERProjectsContribution; + String? patientERRRTGetAllQuestionsList; + String? patientERRRTGetAllTransportationMethodList; + String? patientERRRTGetPickUpRequestByPresOrderIDList; + String? patientERRealRRTGetAllServicesList; + String? patientERRealRRTGetOrderDetailsList; + String? patientERRealRRTGetTransactionsForOrderList; + bool? patientERRealRRTIsTransInserted; + String? patientERRequestList; + String? patientERTransportationRequestWithTotal; + String? patientERealRRTGetServicePriceList; + String? patientInfoByAdmissionNoList; + String? patientMonitorGetPatientHeartRate; + int? patientNotServedCounts; + String? patientPrescriptionList; + String? patientAllergies; + String? patientCheckAppointmentValidationList; + String? patientLoginTokenList; + String? patientQRLoginInfoList; + String? patientSELECTDeviceIMEIbyIMEIList; + String? pharmList; + String? prefLang; + int? radReportUnreadNo; + String? radGetPatientRadOrdersForDentalList; + int? referralNumber; + String? reminderConfigurations; + String? requestNo; + int? rowCount; + String? servicePrivilegeList; + String? shareFamilyFileObj; + String? status; + int? successCode; + String? surveyRate; + String? symptomCheckerConditionList; + String? symptomCheckerGetAllDefaultQuestionsList; + String? symptomCheckerGetBodyPartSymptomsList; + String? symptomCheckerGetBodyPartsByCodeList; + String? symptomCheckerGetBodyPartsList; + String? symptomCheckerJsonResponseInString; + int? timerTime; + int? totalAdvanceBalanceAmount; + int? totalPatientsCount; + int? totalPendingApprovalCount; + int? totalUnUsedCount; + int? transactionNo; + int? unReadCounts; + bool? updateStatus; + String? userAgreementContent; + int? yahalaAccountNo; + bool? check24HourComplaint; + String? currency; + String? message; + int? patientID; + int? returnValue; + String? returnValueStr; + int? statusCode; LacumAccountInformation( {this.date, @@ -935,7 +935,7 @@ class LacumAccountInformation { lakumInquiryInformationObj = json['LakumInquiryInformationObj']; lakumInquiryInformationObjVersion = json['LakumInquiryInformationObjVersion'] != null - ? new LakumInquiryInformationObjVersion.fromJson( + ? LakumInquiryInformationObjVersion.fromJson( json['LakumInquiryInformationObjVersion']) : null; lakumResponseList = json['LakumResponseList']; @@ -1477,7 +1477,7 @@ class LacumAccountInformation { data['LakumInquiryInformationObj'] = this.lakumInquiryInformationObj; if (this.lakumInquiryInformationObjVersion != null) { data['LakumInquiryInformationObjVersion'] = - this.lakumInquiryInformationObjVersion.toJson(); + this.lakumInquiryInformationObjVersion!.toJson(); } data['LakumResponseList'] = this.lakumResponseList; data['Laser_GetBodyPartsByCategoryList'] = diff --git a/lib/core/model/pharmacies/LakumInquiryInformationObjVersion.dart b/lib/core/model/pharmacies/LakumInquiryInformationObjVersion.dart index f1b64b1e..37f5c662 100644 --- a/lib/core/model/pharmacies/LakumInquiryInformationObjVersion.dart +++ b/lib/core/model/pharmacies/LakumInquiryInformationObjVersion.dart @@ -2,36 +2,36 @@ import 'PointsAmountPerYear.dart'; import 'PointsDetails.dart'; class LakumInquiryInformationObjVersion { - num accountNumber; - String accountStatus; - String barCode; - num consumedPoints; - String consumedPointsAmount; - List consumedPointsAmountPerYear; - List consumedPointsDetails; - String createdDate; - num expiredPoints; - String expiryDate; - num gainedPoints; - num gainedPointsAmount; - List gainedPointsAmountPerYear; - List gainedPointsDetails; - String lakumMessageStatus; - String memberName; - String memberUniversalId; - String mobileNumber; - num pointsBalance; - num pointsBalanceAmount; - num pointsWillBeExpired; - String prefLang; - num statusCode; - num transferPoints; - List transferPointsAmountPerYear; - List transferPointsDetails; + num? accountNumber; + String? accountStatus; + String? barCode; + num? consumedPoints; + String? consumedPointsAmount; + List? consumedPointsAmountPerYear; + List? consumedPointsDetails; + String? createdDate; + num? expiredPoints; + String? expiryDate; + num? gainedPoints; + num? gainedPointsAmount; + List? gainedPointsAmountPerYear; + List? gainedPointsDetails; + String? lakumMessageStatus; + String? memberName; + String? memberUniversalId; + String? mobileNumber; + num? pointsBalance; + num? pointsBalanceAmount; + num? pointsWillBeExpired; + String? prefLang; + num? statusCode; + num? transferPoints; + List? transferPointsAmountPerYear; + List? transferPointsDetails; dynamic waitingPoints; dynamic loyalityAmount; dynamic loyalityPoints; - num purchaseRate; + num? purchaseRate; LakumInquiryInformationObjVersion( {this.accountNumber, @@ -72,15 +72,15 @@ class LakumInquiryInformationObjVersion { consumedPoints = json['ConsumedPoints']; consumedPointsAmount = json['ConsumedPointsAmount']; if (json['ConsumedPointsAmountPerYear'] != null) { - consumedPointsAmountPerYear = new List(); + consumedPointsAmountPerYear = []; json['ConsumedPointsAmountPerYear'].forEach((v) { - consumedPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v)); + consumedPointsAmountPerYear!.add(PointsAmountPerYear.fromJson(v)); }); } if (json['ConsumedPointsDetails'] != null) { - consumedPointsDetails = new List(); + consumedPointsDetails = []; json['ConsumedPointsDetails'].forEach((v) { - consumedPointsDetails.add(PointsDetails.fromJson(v)); + consumedPointsDetails!.add(PointsDetails.fromJson(v)); }); } createdDate = json['CreatedDate']; @@ -89,15 +89,15 @@ class LakumInquiryInformationObjVersion { gainedPoints = json['GainedPoints']; gainedPointsAmount = json['GainedPointsAmount']; if (json['GainedPointsAmountPerYear'] != null) { - gainedPointsAmountPerYear = new List(); + gainedPointsAmountPerYear = []; json['GainedPointsAmountPerYear'].forEach((v) { - gainedPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v)); + gainedPointsAmountPerYear!.add(PointsAmountPerYear.fromJson(v)); }); } if (json['GainedPointsDetails'] != null) { - gainedPointsDetails = new List(); + gainedPointsDetails = []; json['GainedPointsDetails'].forEach((v) { - gainedPointsDetails.add(PointsDetails.fromJson(v)); + gainedPointsDetails!.add(PointsDetails.fromJson(v)); }); } lakumMessageStatus = json['LakumMessageStatus']; @@ -111,15 +111,15 @@ class LakumInquiryInformationObjVersion { statusCode = json['StatusCode']; transferPoints = json['TransferPoints']; if (json['TransferPointsAmountPerYear'] != null) { - transferPointsAmountPerYear = new List(); + transferPointsAmountPerYear = []; json['TransferPointsAmountPerYear'].forEach((v) { - transferPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v)); + transferPointsAmountPerYear!.add(PointsAmountPerYear.fromJson(v)); }); } if (json['TransferPointsDetails'] != null) { - transferPointsDetails = new List(); + transferPointsDetails = []; json['TransferPointsDetails'].forEach((v) { - transferPointsDetails.add(PointsDetails.fromJson(v)); + transferPointsDetails!.add(PointsDetails.fromJson(v)); }); } waitingPoints = json['WaitingPoints']; @@ -137,11 +137,11 @@ class LakumInquiryInformationObjVersion { data['ConsumedPointsAmount'] = this.consumedPointsAmount; if (this.consumedPointsAmountPerYear != null) { data['ConsumedPointsAmountPerYear'] = - this.consumedPointsAmountPerYear.map((v) => v).toList(); + this.consumedPointsAmountPerYear!.map((v) => v).toList(); } if (this.consumedPointsDetails != null) { data['ConsumedPointsDetails'] = - this.consumedPointsDetails.map((v) => v).toList(); + this.consumedPointsDetails!.map((v) => v).toList(); } data['CreatedDate'] = this.createdDate; data['ExpiredPoints'] = this.expiredPoints; @@ -150,11 +150,11 @@ class LakumInquiryInformationObjVersion { data['GainedPointsAmount'] = this.gainedPointsAmount; if (this.gainedPointsAmountPerYear != null) { data['GainedPointsAmountPerYear'] = - this.gainedPointsAmountPerYear.map((v) => v).toList(); + this.gainedPointsAmountPerYear!.map((v) => v).toList(); } if (this.gainedPointsDetails != null) { data['GainedPointsDetails'] = - this.gainedPointsDetails.map((v) => v).toList(); + this.gainedPointsDetails!.map((v) => v).toList(); } data['LakumMessageStatus'] = this.lakumMessageStatus; data['MemberName'] = this.memberName; @@ -168,11 +168,11 @@ class LakumInquiryInformationObjVersion { data['TransferPoints'] = this.transferPoints; if (this.transferPointsAmountPerYear != null) { data['TransferPointsAmountPerYear'] = - this.transferPointsAmountPerYear.map((v) => v).toList(); + this.transferPointsAmountPerYear!.map((v) => v).toList(); } if (this.transferPointsDetails != null) { data['TransferPointsDetails'] = - this.transferPointsDetails.map((v) => v).toList(); + this.transferPointsDetails!.map((v) => v).toList(); } data['WaitingPoints'] = this.waitingPoints; data['loyalityAmount'] = this.loyalityAmount; diff --git a/lib/core/model/pharmacies/ListUserAgreement.dart b/lib/core/model/pharmacies/ListUserAgreement.dart index 4237e304..3c2a6231 100644 --- a/lib/core/model/pharmacies/ListUserAgreement.dart +++ b/lib/core/model/pharmacies/ListUserAgreement.dart @@ -1,8 +1,8 @@ class ListUserAgreement { - String userAgreementLAKUM; - String userAgreementLAKUMn; - String userAgreementTxt; - String userAgreementTxtn; + String? userAgreementLAKUM; + String? userAgreementLAKUMn; + String? userAgreementTxt; + String? userAgreementTxtn; ListUserAgreement( {this.userAgreementLAKUM, diff --git a/lib/core/model/pharmacies/Manufacturer.dart b/lib/core/model/pharmacies/Manufacturer.dart index 3b16337b..543a1b43 100644 --- a/lib/core/model/pharmacies/Manufacturer.dart +++ b/lib/core/model/pharmacies/Manufacturer.dart @@ -1,24 +1,24 @@ import 'PharmacyImageObject.dart'; class Manufacturer { - String id; - String name; - String namen; + String? id; + String? name; + String? namen; // List localizedNames; - String description; - int manufacturerTemplateId; - String metaKeywords; - String metaDescription; - String metaTitle; - int pageSize; - String pageSizeOptions; - String priceRanges; - bool published; - bool deleted; - int displayOrder; - String createdOnUtc; - String updatedOnUtc; - PharmacyImageObject image; + String? description; + int? manufacturerTemplateId; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + int? pageSize; + String? pageSizeOptions; + String? priceRanges; + bool? published; + bool? deleted; + int? displayOrder; + String? createdOnUtc; + String? updatedOnUtc; + PharmacyImageObject? image; Manufacturer( {this.id, @@ -91,7 +91,7 @@ class Manufacturer { data['created_on_utc'] = this.createdOnUtc; data['updated_on_utc'] = this.updatedOnUtc; if (this.image != null) { - data['image'] = this.image.toJson(); + data['image'] = this.image!.toJson(); } return data; } diff --git a/lib/core/model/pharmacies/PharmacyAddressesModel.dart b/lib/core/model/pharmacies/PharmacyAddressesModel.dart index db9c20ae..82d448ed 100644 --- a/lib/core/model/pharmacies/PharmacyAddressesModel.dart +++ b/lib/core/model/pharmacies/PharmacyAddressesModel.dart @@ -10,14 +10,14 @@ class PharmacyAddressesModel { this.customers, }); - List customers; + List? customers; factory PharmacyAddressesModel.fromJson(Map json) => PharmacyAddressesModel( customers: List.from(json["customers"].map((x) => Customer.fromJson(x))), ); Map toJson() => { - "customers": List.from(customers.map((x) => x.toJson())), + "customers": List.from(customers!.map((x) => x.toJson())), }; } @@ -26,14 +26,14 @@ class Customer { this.addresses, }); - List
addresses; + List
? addresses; factory Customer.fromJson(Map json) => Customer( addresses: List
.from(json["addresses"].map((x) => Address.fromJson(x))), ); Map toJson() => { - "addresses": List.from(addresses.map((x) => x.toJson())), + "addresses": List.from(addresses!.map((x) => x.toJson())), }; } @@ -59,35 +59,35 @@ class Address { this.latLong, }); - String id; - FirstName firstName; - LastName lastName; - Email email; + String? id; + FirstName? firstName; + LastName? lastName; + Email? email; dynamic company; - int countryId; - Country country; + int? countryId; + Country? country; dynamic stateProvinceId; - City city; - String address1; - String address2; - String zipPostalCode; - String phoneNumber; + City? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; dynamic faxNumber; - String customerAttributes; - DateTime createdOnUtc; + String? customerAttributes; + DateTime? createdOnUtc; dynamic province; - String latLong; + String? latLong; factory Address.fromJson(Map json) => Address( id: json["id"], - firstName: firstNameValues.map[json["first_name"]], - lastName: lastNameValues.map[json["last_name"]], - email: emailValues.map[json["email"]], + firstName: firstNameValues.map![json["first_name"]], + lastName: lastNameValues.map![json["last_name"]], + email: emailValues.map![json["email"]], company: json["company"], countryId: json["country_id"], - country: countryValues.map[json["country"]], + country: countryValues.map![json["country"]], stateProvinceId: json["state_province_id"], - city: cityValues.map[json["city"]], + city: cityValues.map![json["city"]], address1: json["address1"], address2: json["address2"], zipPostalCode: json["zip_postal_code"], @@ -115,7 +115,7 @@ class Address { "phone_number": phoneNumber, "fax_number": faxNumber, "customer_attributes": customerAttributes, - "created_on_utc": createdOnUtc.toIso8601String(), + "created_on_utc": createdOnUtc!.toIso8601String(), "province": province, "lat_long": latLong, }; @@ -156,15 +156,15 @@ final lastNameValues = EnumValues({ }); class EnumValues { - Map map; - Map reverseMap; + Map? map; + Map? reverseMap; EnumValues(this.map); Map get reverse { if (reverseMap == null) { - reverseMap = map.map((k, v) => new MapEntry(v, k)); + reverseMap = map!.map((k, v) => new MapEntry(v, k)); } - return reverseMap; + return reverseMap!; } } diff --git a/lib/core/model/pharmacies/PharmacyImageObject.dart b/lib/core/model/pharmacies/PharmacyImageObject.dart index d3db634b..2806551e 100644 --- a/lib/core/model/pharmacies/PharmacyImageObject.dart +++ b/lib/core/model/pharmacies/PharmacyImageObject.dart @@ -1,9 +1,9 @@ class PharmacyImageObject { - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; PharmacyImageObject({this.id, this.position, this.src, this.thumb, this.attachment}); diff --git a/lib/core/model/pharmacies/PharmacyProduct.dart b/lib/core/model/pharmacies/PharmacyProduct.dart index 8f846480..3656aac8 100644 --- a/lib/core/model/pharmacies/PharmacyProduct.dart +++ b/lib/core/model/pharmacies/PharmacyProduct.dart @@ -5,115 +5,115 @@ import 'Reviews.dart'; class PharmacyProduct { dynamic id; - bool visibleIndividually; + bool? visibleIndividually; dynamic name; dynamic namen; dynamic shortDescription; dynamic shortDescriptionn; dynamic fullDescription; dynamic fullDescriptionn; - bool markasNew; - bool showOnHomePage; + bool? markasNew; + bool? showOnHomePage; dynamic metaKeywords; dynamic metaDescription; dynamic metaTitle; - bool allowCustomerReviews; - int approvedRatingSum; - int notApprovedRatingSum; + bool? allowCustomerReviews; + int? approvedRatingSum; + int? notApprovedRatingSum; dynamic approvedTotalReviews; - int notApprovedTotalReviews; + int? notApprovedTotalReviews; dynamic sku; - bool isRx; - bool prescriptionRequired; + bool? isRx; + bool? prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; - String manufacturerPartNumber; - String gtin; - bool isGiftCard; - bool requireOtherProducts; - bool automaticallyAddRequiredProducts; - bool isDownload; - bool unlimitedDownloads; - int maxNumberOfDownloads; - String downloadExpirationDays; - bool hasSampleDownload; - bool hasUserAgreement; - bool isRecurring; - int recurringCycleLength; - int recurringTotalCycles; - bool isRental; - int rentalPriceLength; - bool isShipEnabled; - bool isFreeShipping; - bool shipSeparately; - double additionalShippingCharge; - bool isTaxExempt; - bool isTelecommunicationsOrBroadcastingOrElectronicServices; - bool useMultipleWarehouses; - int manageInventoryMethodId; - int stockQuantity; - String stockAvailability; - String stockAvailabilityn; - bool displayStockAvailability; - bool displayStockQuantity; - int minStockQuantity; - int notifyAdminForQuantityBelow; - bool allowBackInStockSubscriptions; - int orderMinimumQuantity; - int orderMaximumQuantity; - String allowedQuantities; - bool allowAddingOnlyExistingAttributeCombinations; - bool disableBuyButton; - bool disableWishlistButton; - bool availableForPreOrder; - String preOrderAvailabilityStartDateTimeUtc; - bool callForPrice; - double price; - double oldPrice; - double productCost; - String specialPrice; - String specialPriceStartDateTimeUtc; - String specialPriceEndDateTimeUtc; - bool customerEntersPrice; - double minimumCustomerEnteredPrice; - double maximumCustomerEnteredPrice; - bool basepriceEnabled; - double basepriceAmount; - double basepriceBaseAmount; - bool hasTierPrices; - bool hasDiscountsApplied; - String discountName; - String discountNamen; - String discountDescription; - String discountDescriptionn; - String discountPercentage; - String currency; - String currencyn; - double weight; - double length; - double width; - double height; - String availableStartDateTimeUtc; - String availableEndDateTimeUtc; - int displayOrder; - bool published; - bool deleted; - String createdOnUtc; - String updatedOnUtc; - String productType; - int parentGroupedProductId; - List roleIds; - List discountIds; - List storeIds; - List manufacturerIds; - List reviews; - List images; - List attributes; - List specifications; - List associatedProductIds; - List tags; - int vendorId; - String seName; + String? manufacturerPartNumber; + String? gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + int? maxNumberOfDownloads; + String? downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + int? recurringCycleLength; + int? recurringTotalCycles; + bool? isRental; + int? rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + double? additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + int? manageInventoryMethodId; + int? stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + int? minStockQuantity; + int? notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + int? orderMinimumQuantity; + int? orderMaximumQuantity; + String? allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + String? preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + double? price; + double? oldPrice; + double? productCost; + String? specialPrice; + String? specialPriceStartDateTimeUtc; + String? specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + double? minimumCustomerEnteredPrice; + double? maximumCustomerEnteredPrice; + bool? basepriceEnabled; + double? basepriceAmount; + double? basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + String? discountName; + String? discountNamen; + String? discountDescription; + String? discountDescriptionn; + String? discountPercentage; + String? currency; + String? currencyn; + double? weight; + double? length; + double? width; + double? height; + String? availableStartDateTimeUtc; + String? availableEndDateTimeUtc; + int? displayOrder; + bool? published; + bool? deleted; + String? createdOnUtc; + String? updatedOnUtc; + String? productType; + int? parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + int? vendorId; + String? seName; PharmacyProduct( {this.id, @@ -331,63 +331,63 @@ class PharmacyProduct { productType = json['product_type']; parentGroupedProductId = json['parent_grouped_product_id']; if (json['role_ids'] != null) { - roleIds = new List(); + roleIds = []; json['role_ids'].forEach((v) { - roleIds.add(v); + roleIds!.add(v); }); } if (json['discount_ids'] != null) { - discountIds = new List(); + discountIds = []; json['discount_ids'].forEach((v) { - discountIds.add(v); + discountIds!.add(v); }); } if (json['store_ids'] != null) { - storeIds = new List(); + storeIds = []; json['store_ids'].forEach((v) { - storeIds.add(v); + storeIds!.add(v); }); } if (json['manufacturer_ids'] != null) { - manufacturerIds = new List(); + manufacturerIds =[]; json['manufacturer_ids'].forEach((v) { - manufacturerIds.add(v); + manufacturerIds!.add(v); }); } if (json['reviews'] != null) { - reviews = new List(); + reviews = []; json['reviews'].forEach((v) { - reviews.add(new Reviews.fromJson(v)); + reviews!.add(new Reviews.fromJson(v)); }); } if (json['images'] != null) { - images = new List(); + images =[]; json['images'].forEach((v) { - images.add(new PharmacyImageObject.fromJson(v)); + images!.add(new PharmacyImageObject.fromJson(v)); }); } if (json['attributes'] != null) { - attributes = new List(); + attributes = []; json['attributes'].forEach((v) { - attributes.add(v); + attributes!.add(v); }); } if (json['specifications'] != null) { - specifications = new List(); + specifications = []; json['specifications'].forEach((v) { - specifications.add(new Specifications.fromJson(v)); + specifications!.add(new Specifications.fromJson(v)); }); } if (json['associated_product_ids'] != null) { - associatedProductIds = new List(); + associatedProductIds =[]; json['associated_product_ids'].forEach((v) { - associatedProductIds.add(v); + associatedProductIds!.add(v); }); } if (json['tags'] != null) { - tags = new List(); + tags = []; json['tags'].forEach((v) { - tags.add(v); + tags!.add(v); }); } vendorId = json['vendor_id']; @@ -501,34 +501,34 @@ class PharmacyProduct { data['product_type'] = this.productType; data['parent_grouped_product_id'] = this.parentGroupedProductId; if (this.roleIds != null) { - data['role_ids'] = this.roleIds.map((v) => v).toList(); + data['role_ids'] = this.roleIds!.map((v) => v).toList(); } if (this.discountIds != null) { - data['discount_ids'] = this.discountIds.map((v) => v).toList(); + data['discount_ids'] = this.discountIds!.map((v) => v).toList(); } if (this.storeIds != null) { - data['store_ids'] = this.storeIds.map((v) => v).toList(); + data['store_ids'] = this.storeIds!.map((v) => v).toList(); } data['manufacturer_ids'] = this.manufacturerIds; if (this.reviews != null) { - data['reviews'] = this.reviews.map((v) => v.toJson()).toList(); + data['reviews'] = this.reviews!.map((v) => v.toJson()).toList(); } if (this.images != null) { - data['images'] = this.images.map((v) => v.toJson()).toList(); + data['images'] = this.images!.map((v) => v.toJson()).toList(); } if (this.attributes != null) { - data['attributes'] = this.attributes.map((v) => v).toList(); + data['attributes'] = this.attributes!.map((v) => v).toList(); } if (this.specifications != null) { data['specifications'] = - this.specifications.map((v) => v.toJson()).toList(); + this.specifications!.map((v) => v.toJson()).toList(); } if (this.associatedProductIds != null) { data['associated_product_ids'] = - this.associatedProductIds.map((v) => v).toList(); + this.associatedProductIds!.map((v) => v).toList(); } if (this.tags != null) { - data['tags'] = this.tags.map((v) => v).toList(); + data['tags'] = this.tags!.map((v) => v).toList(); } data['vendor_id'] = this.vendorId; data['se_name'] = this.seName; diff --git a/lib/core/model/pharmacies/PointsAmountPerMonth.dart b/lib/core/model/pharmacies/PointsAmountPerMonth.dart index bd566828..2504975c 100644 --- a/lib/core/model/pharmacies/PointsAmountPerMonth.dart +++ b/lib/core/model/pharmacies/PointsAmountPerMonth.dart @@ -1,11 +1,11 @@ import 'PointsAmountPerday.dart'; class PointsAmountPerMonth { - num amountPerMonth; - String month; - num monthNumber; - List pointsAmountPerday; - num pointsPerMonth; + num? amountPerMonth; + String? month; + num? monthNumber; + List? pointsAmountPerday; + num? pointsPerMonth; PointsAmountPerMonth( {this.amountPerMonth, @@ -19,9 +19,9 @@ class PointsAmountPerMonth { month = json['Month']; monthNumber = json['MonthNumber']; if (json['PointsAmountPerday'] != null) { - pointsAmountPerday = new List(); + pointsAmountPerday = []; json['PointsAmountPerday'].forEach((v) { - pointsAmountPerday.add(new PointsAmountPerday.fromJson(v)); + pointsAmountPerday!.add(new PointsAmountPerday.fromJson(v)); }); } pointsPerMonth = json['PointsPerMonth']; @@ -34,7 +34,7 @@ class PointsAmountPerMonth { data['MonthNumber'] = this.monthNumber; if (this.pointsAmountPerday != null) { data['PointsAmountPerday'] = - this.pointsAmountPerday.map((v) => v.toJson()).toList(); + this.pointsAmountPerday!.map((v) => v.toJson()).toList(); } data['PointsPerMonth'] = this.pointsPerMonth; return data; diff --git a/lib/core/model/pharmacies/PointsAmountPerYear.dart b/lib/core/model/pharmacies/PointsAmountPerYear.dart index 2d25855f..7d1e4a61 100644 --- a/lib/core/model/pharmacies/PointsAmountPerYear.dart +++ b/lib/core/model/pharmacies/PointsAmountPerYear.dart @@ -1,10 +1,10 @@ import 'PointsAmountPerMonth.dart'; class PointsAmountPerYear { - num amountPerYear; - List pointsAmountPerMonth; - num pointsPerYear; - num year; + num? amountPerYear; + List? pointsAmountPerMonth; + num? pointsPerYear; + num? year; PointsAmountPerYear( {this.amountPerYear, @@ -15,9 +15,9 @@ class PointsAmountPerYear { PointsAmountPerYear.fromJson(Map json) { amountPerYear = json['AmountPerYear']; if (json['PointsAmountPerMonth'] != null) { - pointsAmountPerMonth = new List(); + pointsAmountPerMonth = []; json['PointsAmountPerMonth'].forEach((v) { - pointsAmountPerMonth.add(new PointsAmountPerMonth.fromJson(v)); + pointsAmountPerMonth!.add(new PointsAmountPerMonth.fromJson(v)); }); } pointsPerYear = json['PointsPerYear']; @@ -29,7 +29,7 @@ class PointsAmountPerYear { data['AmountPerYear'] = this.amountPerYear; if (this.pointsAmountPerMonth != null) { data['PointsAmountPerMonth'] = - this.pointsAmountPerMonth.map((v) => v.toJson()).toList(); + this.pointsAmountPerMonth!.map((v) => v.toJson()).toList(); } data['PointsPerYear'] = this.pointsPerYear; data['Year'] = this.year; diff --git a/lib/core/model/pharmacies/PointsAmountPerday.dart b/lib/core/model/pharmacies/PointsAmountPerday.dart index 634233b9..28515bc6 100644 --- a/lib/core/model/pharmacies/PointsAmountPerday.dart +++ b/lib/core/model/pharmacies/PointsAmountPerday.dart @@ -1,11 +1,11 @@ import 'PointsDetails.dart'; class PointsAmountPerday { - num amountPerDay; - String day; - List pointsDetails; - num pointsPerDay; - String transationDate; + num? amountPerDay; + String? day; + List? pointsDetails; + num? pointsPerDay; + String? transationDate; PointsAmountPerday( {this.amountPerDay, @@ -18,9 +18,9 @@ class PointsAmountPerday { amountPerDay = json['AmountPerDay']; day = json['Day']; if (json['PointsDetails'] != null) { - pointsDetails = new List(); + pointsDetails = []; json['PointsDetails'].forEach((v) { - pointsDetails.add(new PointsDetails.fromJson(v)); + pointsDetails!.add(new PointsDetails.fromJson(v)); }); } pointsPerDay = json['PointsPerDay']; @@ -33,7 +33,7 @@ class PointsAmountPerday { data['Day'] = this.day; if (this.pointsDetails != null) { data['PointsDetails'] = - this.pointsDetails.map((v) => v.toJson()).toList(); + this.pointsDetails!.map((v) => v.toJson()).toList(); } data['PointsPerDay'] = this.pointsPerDay; data['TransationDate'] = this.transationDate; diff --git a/lib/core/model/pharmacies/PointsDetails.dart b/lib/core/model/pharmacies/PointsDetails.dart index 9a251d83..f3091b1d 100644 --- a/lib/core/model/pharmacies/PointsDetails.dart +++ b/lib/core/model/pharmacies/PointsDetails.dart @@ -1,14 +1,14 @@ class PointsDetails { - int accNumber; - String accountStatus; - num amount; - int lineItemNo; - String operationType; - num points; - num purchasePoints; - int subTransactionType; - String subTransactionTypeDescription; - String transactionDate; + int? accNumber; + String? accountStatus; + num? amount; + int? lineItemNo; + String? operationType; + num? points; + num? purchasePoints; + int? subTransactionType; + String? subTransactionTypeDescription; + String? transactionDate; PointsDetails( {this.accNumber, diff --git a/lib/core/model/pharmacies/Reviews.dart b/lib/core/model/pharmacies/Reviews.dart index 2c767cdd..da563239 100644 --- a/lib/core/model/pharmacies/Reviews.dart +++ b/lib/core/model/pharmacies/Reviews.dart @@ -1,21 +1,21 @@ import '../pharmacies/Customer.dart'; class Reviews { - int id; - int position; - int reviewId; - int customerId; - int productId; - int storeId; - bool isApproved; - String title; - String reviewText; - String replyText; - int rating; - int helpfulYesTotal; - int helpfulNoTotal; - String createdOnUtc; - Customer customer; + int? id; + int? position; + int? reviewId; + int? customerId; + int? productId; + int? storeId; + bool? isApproved; + String? title; + String? reviewText; + String? replyText; + int? rating; + int? helpfulYesTotal; + int? helpfulNoTotal; + String? createdOnUtc; + Customer? customer; //Null product; Reviews( @@ -75,7 +75,7 @@ class Reviews { data['helpful_no_total'] = this.helpfulNoTotal; data['created_on_utc'] = this.createdOnUtc; if (this.customer != null) { - data['customer'] = this.customer.toJson(); + data['customer'] = this.customer!.toJson(); } // data['product'] = this.product; return data; diff --git a/lib/core/model/pharmacies/ShippingOption.dart b/lib/core/model/pharmacies/ShippingOption.dart index 1b589537..4b161b4c 100644 --- a/lib/core/model/pharmacies/ShippingOption.dart +++ b/lib/core/model/pharmacies/ShippingOption.dart @@ -1,48 +1,48 @@ class ShippingOption { - String shippingRateComputationMethodSystemName; - double rate; - double rateVat; - double rateVatPercent; - String name; - String namen; - String description; - String descriptionn; - bool allowShippingSunday; - bool allowShippingMonday; - bool allowShippingTuesday; - bool allowShippingWednesday; - bool allowShippingThursday; - bool allowShippingFriday; - bool allowShippingSaturday; - String allowShippingTime1From; - String allowShippingTime1To; - String allowShippingTime2From; - String allowShippingTime2To; - String allowShippingNote; - String allowShippingNoten; + String? shippingRateComputationMethodSystemName; + double? rate; + double? rateVat; + double? rateVatPercent; + String? name; + String? namen; + String? description; + String? descriptionn; + bool? allowShippingSunday; + bool? allowShippingMonday; + bool? allowShippingTuesday; + bool? allowShippingWednesday; + bool? allowShippingThursday; + bool? allowShippingFriday; + bool? allowShippingSaturday; + String? allowShippingTime1From; + String? allowShippingTime1To; + String? allowShippingTime2From; + String? allowShippingTime2To; + String? allowShippingNote; + String? allowShippingNoten; ShippingOption( {this.shippingRateComputationMethodSystemName, - this.rate, - this.rateVat, - this.rateVatPercent, - this.name, - this.namen, - this.description, - this.descriptionn, - this.allowShippingSunday, - this.allowShippingMonday, - this.allowShippingTuesday, - this.allowShippingWednesday, - this.allowShippingThursday, - this.allowShippingFriday, - this.allowShippingSaturday, - this.allowShippingTime1From, - this.allowShippingTime1To, - this.allowShippingTime2From, - this.allowShippingTime2To, - this.allowShippingNote, - this.allowShippingNoten}); + this.rate, + this.rateVat, + this.rateVatPercent, + this.name, + this.namen, + this.description, + this.descriptionn, + this.allowShippingSunday, + this.allowShippingMonday, + this.allowShippingTuesday, + this.allowShippingWednesday, + this.allowShippingThursday, + this.allowShippingFriday, + this.allowShippingSaturday, + this.allowShippingTime1From, + this.allowShippingTime1To, + this.allowShippingTime2From, + this.allowShippingTime2To, + this.allowShippingNote, + this.allowShippingNoten}); ShippingOption.fromJson(Map json) { shippingRateComputationMethodSystemName = json['shipping_rate_computation_method_system_name']; @@ -70,8 +70,7 @@ class ShippingOption { Map toJson() { final Map data = new Map(); - data['shipping_rate_computation_method_system_name'] = - this.shippingRateComputationMethodSystemName; + data['shipping_rate_computation_method_system_name'] = this.shippingRateComputationMethodSystemName; data['rate'] = this.rate; data['rate_vat'] = this.rateVat; data['rate_vat_percent'] = this.rateVatPercent; diff --git a/lib/core/model/pharmacies/ShoppingCart.dart b/lib/core/model/pharmacies/ShoppingCart.dart index 4bd460aa..d19aba2c 100644 --- a/lib/core/model/pharmacies/ShoppingCart.dart +++ b/lib/core/model/pharmacies/ShoppingCart.dart @@ -2,11 +2,11 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Customer.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; class ShoppingCart { - int languageId; - String id; + int? languageId; + String? id; // List productAttributes; - double customerEnteredPrice; - int quantity; + double? customerEnteredPrice; + int? quantity; dynamic discountAmountInclTax; dynamic subtotal; dynamic subtotalWithVat; @@ -19,21 +19,21 @@ class ShoppingCart { dynamic createdOnUtc; dynamic updatedOnUtc; dynamic shoppingCartType; - int productId; - PharmacyProduct product; - int customerId; - Customer customer; - double unitPriceInclTax; - double unitPriceExclTax; - double priceInclTax; - double priceExclTax; + int? productId; + PharmacyProduct? product; + int? customerId; + Customer? customer; + double? unitPriceInclTax; + double? unitPriceExclTax; + double? priceInclTax; + double? priceExclTax; dynamic discountAmountExclTax; - double originalProductCost; - String attributeDescription; - int downloadCount; - bool isDownloadActivated; - int licenseDownloadId; - double itemWeight; + double? originalProductCost; + String? attributeDescription; + int? downloadCount; + bool? isDownloadActivated; + int? licenseDownloadId; + double? itemWeight; ShoppingCart( {this.languageId, @@ -139,11 +139,11 @@ class ShoppingCart { data['shopping_cart_type'] = this.shoppingCartType; data['product_id'] = this.productId; if (this.product != null) { - data['product'] = this.product.toJson(); + data['product'] = this.product!.toJson(); } data['customer_id'] = this.customerId; if (this.customer != null) { - data['customer'] = this.customer.toJson(); + data['customer'] = this.customer!.toJson(); } data['unit_price_incl_tax'] = this.unitPriceInclTax; data['unit_price_excl_tax'] = this.unitPriceExclTax; diff --git a/lib/core/model/pharmacies/ShoppingCartResponse.dart b/lib/core/model/pharmacies/ShoppingCartResponse.dart index 1d90464d..ff0ed1ae 100644 --- a/lib/core/model/pharmacies/ShoppingCartResponse.dart +++ b/lib/core/model/pharmacies/ShoppingCartResponse.dart @@ -2,14 +2,14 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; import 'package:flutter/material.dart'; class ShoppingCartResponse { - int itemCount; - int quantityCount; - double subtotal; - double subtotalWithVat; - double subtotalVatAmount; - double subtotalVatRate; - double totalAmount; - List shoppingCarts; + int? itemCount; + int? quantityCount; + double? subtotal; + double? subtotalWithVat; + double? subtotalVatAmount; + double? subtotalVatRate; + double? totalAmount; + List? shoppingCarts; ShoppingCartResponse( {this.itemCount =0, @@ -31,9 +31,9 @@ class ShoppingCartResponse { subtotalVatAmount = json['subtotal_vat_amount']; subtotalVatRate = json['subtotal_vat_rate']; if (json['shopping_carts'] != null) { - shoppingCarts = new List(); + shoppingCarts = []; json['shopping_carts'].forEach((v) { - shoppingCarts.add(new ShoppingCart.fromJson(v)); + shoppingCarts!.add(new ShoppingCart.fromJson(v)); }); } } @@ -48,7 +48,7 @@ class ShoppingCartResponse { data['subtotal_vat_rate'] = this.subtotalVatRate; if (this.shoppingCarts != null) { data['shopping_carts'] = - this.shoppingCarts.map((v) => v.toJson()).toList(); + this.shoppingCarts!.map((v) => v.toJson()).toList(); } return data; } diff --git a/lib/core/model/pharmacies/order_detail.dart b/lib/core/model/pharmacies/order_detail.dart index 74e89295..d6a6dd70 100644 --- a/lib/core/model/pharmacies/order_detail.dart +++ b/lib/core/model/pharmacies/order_detail.dart @@ -3,37 +3,37 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Customer.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; class OrderDetailModel { - String id; - int storeId; - String orderGuid; - bool pickUpInStore; - String paymentMethodSystemName; - String paymentName; - String paymentNamen; - String customerCurrencyCode; + String? id; + int? storeId; + String? orderGuid; + bool? pickUpInStore; + String? paymentMethodSystemName; + String? paymentName; + String? paymentNamen; + String? customerCurrencyCode; dynamic currencyRate; dynamic customerTaxDisplayTypeId; dynamic vatNumber; - double orderSubtotalInclTax; - double orderSubtotalExclTax; + double? orderSubtotalInclTax; + double? orderSubtotalExclTax; dynamic orderSubTotalDiscountInclTax; dynamic orderSubTotalDiscountExclTax; - double orderShippingInclTax; + double? orderShippingInclTax; dynamic orderShippingExclTax; dynamic paymentMethodAdditionalFeeInclTax; dynamic paymentMethodAdditionalFeeExclTax; - String taxRates; - double orderTax; + String? taxRates; + double? orderTax; dynamic orderDiscount; dynamic productCount; dynamic orderTotal; dynamic refundedAmount; dynamic rewardPointsWereAdded; dynamic rxAttachments; - String checkoutAttributeDescription; - int customerLanguageId; - int affiliateId; - String customerIp; + String? checkoutAttributeDescription; + int? customerLanguageId; + int? affiliateId; + String? customerIp; dynamic authorizationTransactionId; dynamic authorizationTransactionCode; dynamic authorizationTransactionResult; @@ -41,100 +41,101 @@ class OrderDetailModel { dynamic captureTransactionResult; dynamic subscriptionTransactionId; dynamic paidDateUtc; - String shippingMethod; - String shippingRateComputationMethodSystemName; - String customValuesXml; - bool deleted; - String createdOnUtc; - Customer customer; - int customerId; - BillingAddress billingAddress; - BillingAddress shippingAddress; - List orderItems; - int orderStatusId; - String orderStatus; - String orderStatusn; - int paymentStatusId; - String paymentStatus; - String paymentStatusn; - String shippingStatus; - String shippingStatusn; - String customerTaxDisplayType; - bool canCancel; - bool canRefund; + String? shippingMethod; + String? shippingRateComputationMethodSystemName; + String? customValuesXml; + bool? deleted; + String? createdOnUtc; + Customer? customer; + int? customerId; + BillingAddress? billingAddress; + BillingAddress? shippingAddress; + List? orderItems; + int? orderStatusId; + String? orderStatus; + String? orderStatusn; + int? paymentStatusId; + String? paymentStatus; + String? paymentStatusn; + String? shippingStatus; + String? shippingStatusn; + String? customerTaxDisplayType; + bool? canCancel; + bool? canRefund; dynamic lakumAmount; - String preferDeliveryDate; - String preferDeliveryTime; - String preferDeliveryTimen; - String driverOTP; - String driverID; + String? preferDeliveryDate; + String? preferDeliveryTime; + String? preferDeliveryTimen; + String? driverOTP; + String? driverID; - OrderDetailModel( - {this.id, - this.storeId, - this.orderGuid, - this.pickUpInStore, - this.paymentMethodSystemName, - this.paymentName, - this.paymentNamen, - this.customerCurrencyCode, - this.currencyRate, - this.customerTaxDisplayTypeId, - this.vatNumber, - this.orderSubtotalInclTax, - this.orderSubtotalExclTax, - this.orderSubTotalDiscountInclTax, - this.orderSubTotalDiscountExclTax, - this.orderShippingInclTax, - this.orderShippingExclTax, - this.paymentMethodAdditionalFeeInclTax, - this.paymentMethodAdditionalFeeExclTax, - this.taxRates, - this.orderTax, - this.orderDiscount, - this.productCount, - this.orderTotal, - this.refundedAmount, - this.rewardPointsWereAdded, - this.rxAttachments, - this.checkoutAttributeDescription, - this.customerLanguageId, - this.affiliateId, - this.customerIp, - this.authorizationTransactionId, - this.authorizationTransactionCode, - this.authorizationTransactionResult, - this.captureTransactionId, - this.captureTransactionResult, - this.subscriptionTransactionId, - this.paidDateUtc, - this.shippingMethod, - this.shippingRateComputationMethodSystemName, - this.customValuesXml, - this.deleted, - this.createdOnUtc, - this.customer, - this.customerId, - this.billingAddress, - this.shippingAddress, - this.orderItems, - this.orderStatusId, - this.orderStatus, - this.orderStatusn, - this.paymentStatusId, - this.paymentStatus, - this.paymentStatusn, - this.shippingStatus, - this.shippingStatusn, - this.customerTaxDisplayType, - this.canCancel, - this.canRefund, - this.lakumAmount, - this.preferDeliveryDate, - this.preferDeliveryTime, - this.preferDeliveryTimen, - this.driverID, - this.driverOTP,}); + OrderDetailModel({ + this.id, + this.storeId, + this.orderGuid, + this.pickUpInStore, + this.paymentMethodSystemName, + this.paymentName, + this.paymentNamen, + this.customerCurrencyCode, + this.currencyRate, + this.customerTaxDisplayTypeId, + this.vatNumber, + this.orderSubtotalInclTax, + this.orderSubtotalExclTax, + this.orderSubTotalDiscountInclTax, + this.orderSubTotalDiscountExclTax, + this.orderShippingInclTax, + this.orderShippingExclTax, + this.paymentMethodAdditionalFeeInclTax, + this.paymentMethodAdditionalFeeExclTax, + this.taxRates, + this.orderTax, + this.orderDiscount, + this.productCount, + this.orderTotal, + this.refundedAmount, + this.rewardPointsWereAdded, + this.rxAttachments, + this.checkoutAttributeDescription, + this.customerLanguageId, + this.affiliateId, + this.customerIp, + this.authorizationTransactionId, + this.authorizationTransactionCode, + this.authorizationTransactionResult, + this.captureTransactionId, + this.captureTransactionResult, + this.subscriptionTransactionId, + this.paidDateUtc, + this.shippingMethod, + this.shippingRateComputationMethodSystemName, + this.customValuesXml, + this.deleted, + this.createdOnUtc, + this.customer, + this.customerId, + this.billingAddress, + this.shippingAddress, + this.orderItems, + this.orderStatusId, + this.orderStatus, + this.orderStatusn, + this.paymentStatusId, + this.paymentStatus, + this.paymentStatusn, + this.shippingStatus, + this.shippingStatusn, + this.customerTaxDisplayType, + this.canCancel, + this.canRefund, + this.lakumAmount, + this.preferDeliveryDate, + this.preferDeliveryTime, + this.preferDeliveryTimen, + this.driverID, + this.driverOTP, + }); OrderDetailModel.fromJson(Map json) { id = json['id']; @@ -154,10 +155,8 @@ class OrderDetailModel { orderSubTotalDiscountExclTax = json['order_sub_total_discount_excl_tax']; orderShippingInclTax = json['order_shipping_incl_tax']; orderShippingExclTax = json['order_shipping_excl_tax']; - paymentMethodAdditionalFeeInclTax = - json['payment_method_additional_fee_incl_tax']; - paymentMethodAdditionalFeeExclTax = - json['payment_method_additional_fee_excl_tax']; + paymentMethodAdditionalFeeInclTax = json['payment_method_additional_fee_incl_tax']; + paymentMethodAdditionalFeeExclTax = json['payment_method_additional_fee_excl_tax']; taxRates = json['tax_rates']; orderTax = json['order_tax']; orderDiscount = json['order_discount']; @@ -178,25 +177,18 @@ class OrderDetailModel { subscriptionTransactionId = json['subscription_transaction_id']; paidDateUtc = json['paid_date_utc']; shippingMethod = json['shipping_method']; - shippingRateComputationMethodSystemName = - json['shipping_rate_computation_method_system_name']; + shippingRateComputationMethodSystemName = json['shipping_rate_computation_method_system_name']; customValuesXml = json['custom_values_xml']; deleted = json['deleted']; createdOnUtc = json['created_on_utc']; - customer = json['customer'] != null - ? new Customer.fromJson(json['customer']) - : null; + customer = json['customer'] != null ? new Customer.fromJson(json['customer']) : null; customerId = json['customer_id']; - billingAddress = json['billing_address'] != null - ? new BillingAddress.fromJson(json['billing_address']) - : null; - shippingAddress = json['shipping_address'] != null - ? new BillingAddress.fromJson(json['shipping_address']) - : null; + billingAddress = json['billing_address'] != null ? new BillingAddress.fromJson(json['billing_address']) : null; + shippingAddress = json['shipping_address'] != null ? new BillingAddress.fromJson(json['shipping_address']) : null; if (json['order_items'] != null) { - orderItems = new List(); + orderItems = []; json['order_items'].forEach((v) { - orderItems.add(new ShoppingCart.fromJson(v)); + orderItems!.add(new ShoppingCart.fromJson(v)); }); } orderStatusId = json['order_status_id']; @@ -216,8 +208,10 @@ class OrderDetailModel { preferDeliveryTimen = json['prefer_delivery_timen']; // Driver Detail - driverID: json["DriverID"]; - driverOTP: json["DriverOTP"]; + driverID: + json["DriverID"]; + driverOTP: + json["DriverOTP"]; } Map toJson() { @@ -235,16 +229,12 @@ class OrderDetailModel { data['vat_number'] = this.vatNumber; data['order_subtotal_incl_tax'] = this.orderSubtotalInclTax; data['order_subtotal_excl_tax'] = this.orderSubtotalExclTax; - data['order_sub_total_discount_incl_tax'] = - this.orderSubTotalDiscountInclTax; - data['order_sub_total_discount_excl_tax'] = - this.orderSubTotalDiscountExclTax; + data['order_sub_total_discount_incl_tax'] = this.orderSubTotalDiscountInclTax; + data['order_sub_total_discount_excl_tax'] = this.orderSubTotalDiscountExclTax; data['order_shipping_incl_tax'] = this.orderShippingInclTax; data['order_shipping_excl_tax'] = this.orderShippingExclTax; - data['payment_method_additional_fee_incl_tax'] = - this.paymentMethodAdditionalFeeInclTax; - data['payment_method_additional_fee_excl_tax'] = - this.paymentMethodAdditionalFeeExclTax; + data['payment_method_additional_fee_incl_tax'] = this.paymentMethodAdditionalFeeInclTax; + data['payment_method_additional_fee_excl_tax'] = this.paymentMethodAdditionalFeeExclTax; data['tax_rates'] = this.taxRates; data['order_tax'] = this.orderTax; data['order_discount'] = this.orderDiscount; @@ -259,30 +249,28 @@ class OrderDetailModel { data['customer_ip'] = this.customerIp; data['authorization_transaction_id'] = this.authorizationTransactionId; data['authorization_transaction_code'] = this.authorizationTransactionCode; - data['authorization_transaction_result'] = - this.authorizationTransactionResult; + data['authorization_transaction_result'] = this.authorizationTransactionResult; data['capture_transaction_id'] = this.captureTransactionId; data['capture_transaction_result'] = this.captureTransactionResult; data['subscription_transaction_id'] = this.subscriptionTransactionId; data['paid_date_utc'] = this.paidDateUtc; data['shipping_method'] = this.shippingMethod; - data['shipping_rate_computation_method_system_name'] = - this.shippingRateComputationMethodSystemName; + data['shipping_rate_computation_method_system_name'] = this.shippingRateComputationMethodSystemName; data['custom_values_xml'] = this.customValuesXml; data['deleted'] = this.deleted; data['created_on_utc'] = this.createdOnUtc; if (this.customer != null) { - data['customer'] = this.customer.toJson(); + data['customer'] = this.customer!.toJson(); } data['customer_id'] = this.customerId; if (this.billingAddress != null) { - data['billing_address'] = this.billingAddress.toJson(); + data['billing_address'] = this.billingAddress!.toJson(); } if (this.shippingAddress != null) { - data['shipping_address'] = this.shippingAddress.toJson(); + data['shipping_address'] = this.shippingAddress!.toJson(); } if (this.orderItems != null) { - data['order_items'] = this.orderItems.map((v) => v.toJson()).toList(); + data['order_items'] = this.orderItems!.map((v) => v.toJson()).toList(); } data['order_status_id'] = this.orderStatusId; data['order_status'] = this.orderStatus; @@ -301,5 +289,4 @@ class OrderDetailModel { data['prefer_delivery_timen'] = this.preferDeliveryTimen; return data; } - -} \ No newline at end of file +} diff --git a/lib/core/model/pharmacies/order_model.dart b/lib/core/model/pharmacies/order_model.dart index d025faa6..005d9337 100644 --- a/lib/core/model/pharmacies/order_model.dart +++ b/lib/core/model/pharmacies/order_model.dart @@ -1,4 +1,3 @@ - import 'dart:convert'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; @@ -9,72 +8,71 @@ List orderModelFromJson(String str) => List.from(json.de String orderModelToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); class OrderModel { - - String id; + String? id; dynamic storeId; - String orderGuid; - bool pickUpInStore; - PaymentMethodSystemName paymentMethodSystemName; - PaymentName paymentName; - PaymentName paymentNamen; - CustomerCurrencyCode customerCurrencyCode; + String? orderGuid; + bool? pickUpInStore; + PaymentMethodSystemName? paymentMethodSystemName; + PaymentName? paymentName; + PaymentName? paymentNamen; + CustomerCurrencyCode? customerCurrencyCode; dynamic currencyRate; dynamic customerTaxDisplayTypeId; dynamic vatNumber; - double orderSubtotalInclTax; - double orderSubtotalExclTax; + double? orderSubtotalInclTax; + double? orderSubtotalExclTax; dynamic orderSubTotalDiscountInclTax; dynamic orderSubTotalDiscountExclTax; - double orderShippingInclTax; + double? orderShippingInclTax; dynamic orderShippingExclTax; dynamic paymentMethodAdditionalFeeInclTax; dynamic paymentMethodAdditionalFeeExclTax; - String taxRates; - double orderTax; + String? taxRates; + double? orderTax; dynamic orderDiscount; dynamic productCount; - double orderTotal; + double? orderTotal; dynamic refundedAmount; dynamic rewardPointsWereAdded; - String rxAttachments; - CheckoutAttributeDescription checkoutAttributeDescription; + String? rxAttachments; + CheckoutAttributeDescription? checkoutAttributeDescription; dynamic customerLanguageId; dynamic affiliateId; - CustomerIp customerIp; - String authorizationTransactionId; + CustomerIp? customerIp; + String? authorizationTransactionId; dynamic authorizationTransactionCode; dynamic authorizationTransactionResult; dynamic captureTransactionId; dynamic captureTransactionResult; dynamic subscriptionTransactionId; - DateTime paidDateUtc; - ShippingMethod shippingMethod; - ShippingRateComputationMethodSystemName shippingRateComputationMethodSystemName; - String customValuesXml; - bool deleted; - DateTime createdOnUtc; - OrderModelCustomer customer; + DateTime? paidDateUtc; + ShippingMethod? shippingMethod; + ShippingRateComputationMethodSystemName? shippingRateComputationMethodSystemName; + String? customValuesXml; + bool? deleted; + DateTime? createdOnUtc; + OrderModelCustomer? customer; dynamic customerId; - IngAddress billingAddress; - IngAddress shippingAddress; - List orderItems; + IngAddress? billingAddress; + IngAddress? shippingAddress; + List? orderItems; dynamic orderStatusId; - OrderStatus orderStatus; - OrderStatusn orderStatusn; + OrderStatus? orderStatus; + OrderStatusn? orderStatusn; dynamic paymentStatusId; - PaymentStatus paymentStatus; - PaymentStatusn paymentStatusn; - ShippingStatus shippingStatus; - ShippingStatusn shippingStatusn; - CustomerTaxDisplayType customerTaxDisplayType; - bool canCancel; - bool canRefund; + PaymentStatus? paymentStatus; + PaymentStatusn? paymentStatusn; + ShippingStatus? shippingStatus; + ShippingStatusn? shippingStatusn; + CustomerTaxDisplayType? customerTaxDisplayType; + bool? canCancel; + bool? canRefund; dynamic lakumAmount; - DateTime preferDeliveryDate; - PreferDeliveryTime preferDeliveryTime; - PreferDeliveryTimen preferDeliveryTimen; - String driverOTP; - String driverID; + DateTime? preferDeliveryDate; + PreferDeliveryTime? preferDeliveryTime; + PreferDeliveryTimen? preferDeliveryTimen; + String? driverOTP; + String? driverID; OrderModel({ this.id, @@ -145,140 +143,141 @@ class OrderModel { }); factory OrderModel.fromJson(Map json) => OrderModel( - id: json["id"], - storeId: json["store_id"], - orderGuid: json["order_guid"], - pickUpInStore: json["pick_up_in_store"], - paymentMethodSystemName: paymentMethodSystemNameValues.map[json["payment_method_system_name"]], - paymentName: paymentNameValues.map[json["payment_name"]], - paymentNamen: paymentNameValues.map[json["payment_namen"]], - customerCurrencyCode: customerCurrencyCodeValues.map[json["customer_currency_code"]], - currencyRate: json["currency_rate"], - customerTaxDisplayTypeId: json["customer_tax_display_type_id"], - vatNumber: json["vat_number"], - orderSubtotalInclTax: json["order_subtotal_incl_tax"].toDouble(), - orderSubtotalExclTax: json["order_subtotal_excl_tax"].toDouble(), - orderSubTotalDiscountInclTax: json["order_sub_total_discount_incl_tax"], - orderSubTotalDiscountExclTax: json["order_sub_total_discount_excl_tax"], - orderShippingInclTax: json["order_shipping_incl_tax"].toDouble(), - orderShippingExclTax: json["order_shipping_excl_tax"], - paymentMethodAdditionalFeeInclTax: json["payment_method_additional_fee_incl_tax"], - paymentMethodAdditionalFeeExclTax: json["payment_method_additional_fee_excl_tax"], - taxRates: json["tax_rates"], - orderTax: json["order_tax"].toDouble(), - orderDiscount: json["order_discount"], - productCount: json["product_count"], - orderTotal: json["order_total"].toDouble(), - refundedAmount: json["refunded_amount"], - rewardPointsWereAdded: json["reward_points_were_added"], - rxAttachments: json["rx_attachments"] == null ? null : json["rx_attachments"], - checkoutAttributeDescription: checkoutAttributeDescriptionValues.map[json["checkout_attribute_description"]], - customerLanguageId: json["customer_language_id"], - affiliateId: json["affiliate_id"], - customerIp: customerIpValues.map[json["customer_ip"]], - authorizationTransactionId: json["authorization_transaction_id"] == null ? null : json["authorization_transaction_id"], - authorizationTransactionCode: json["authorization_transaction_code"], - authorizationTransactionResult: json["authorization_transaction_result"], - captureTransactionId: json["capture_transaction_id"], - captureTransactionResult: json["capture_transaction_result"], - subscriptionTransactionId: json["subscription_transaction_id"], - paidDateUtc: json["paid_date_utc"] == null ? null : DateTime.parse(json["paid_date_utc"]), - shippingMethod: shippingMethodValues.map[json["shipping_method"]], - shippingRateComputationMethodSystemName: shippingRateComputationMethodSystemNameValues.map[json["shipping_rate_computation_method_system_name"]], - customValuesXml: json["custom_values_xml"], - deleted: json["deleted"], - createdOnUtc: DateTime.parse(json["created_on_utc"]), - customer: OrderModelCustomer.fromJson(json["customer"]), - customerId: json["customer_id"], - billingAddress: IngAddress.fromJson(json["billing_address"]), - shippingAddress: IngAddress.fromJson(json["shipping_address"]), - orderItems: List.from(json["order_items"].map((x) => OrderItem.fromJson(x))), - orderStatusId: json["order_status_id"], - orderStatus: orderStatusValues.map[json["order_status"]], - orderStatusn: orderStatusnValues.map[json["order_statusn"]], - paymentStatusId: json["payment_status_id"], - paymentStatus: paymentStatusValues.map[json["payment_status"]], - paymentStatusn: paymentStatusnValues.map[json["payment_statusn"]], - shippingStatus: shippingStatusValues.map[json["shipping_status"]], - shippingStatusn: shippingStatusnValues.map[json["shipping_statusn"]], - customerTaxDisplayType: customerTaxDisplayTypeValues.map[json["customer_tax_display_type"]], - canCancel: json["can_cancel"], - canRefund: json["can_refund"], - lakumAmount: json["lakum_amount"], - preferDeliveryDate: json["prefer_delivery_date"] == null ? null : DateTime.parse(json["prefer_delivery_date"]), - preferDeliveryTime: json["prefer_delivery_time"] == null ? null : preferDeliveryTimeValues.map[json["prefer_delivery_time"]], - preferDeliveryTimen: json["prefer_delivery_timen"] == null ? null : preferDeliveryTimenValues.map[json["prefer_delivery_timen"]], - - // Driver Detail - driverID: json["DriverID"], - driverOTP: json["DriverOTP"], - - ); + id: json["id"], + storeId: json["store_id"], + orderGuid: json["order_guid"], + pickUpInStore: json["pick_up_in_store"], + paymentMethodSystemName: paymentMethodSystemNameValues.map![json["payment_method_system_name"]], + paymentName: paymentNameValues.map![json["payment_name"]], + paymentNamen: paymentNameValues.map![json["payment_namen"]], + customerCurrencyCode: customerCurrencyCodeValues.map![json["customer_currency_code"]], + currencyRate: json["currency_rate"], + customerTaxDisplayTypeId: json["customer_tax_display_type_id"], + vatNumber: json["vat_number"], + orderSubtotalInclTax: json["order_subtotal_incl_tax"].toDouble(), + orderSubtotalExclTax: json["order_subtotal_excl_tax"].toDouble(), + orderSubTotalDiscountInclTax: json["order_sub_total_discount_incl_tax"], + orderSubTotalDiscountExclTax: json["order_sub_total_discount_excl_tax"], + orderShippingInclTax: json["order_shipping_incl_tax"].toDouble(), + orderShippingExclTax: json["order_shipping_excl_tax"], + paymentMethodAdditionalFeeInclTax: json["payment_method_additional_fee_incl_tax"], + paymentMethodAdditionalFeeExclTax: json["payment_method_additional_fee_excl_tax"], + taxRates: json["tax_rates"], + orderTax: json["order_tax"].toDouble(), + orderDiscount: json["order_discount"], + productCount: json["product_count"], + orderTotal: json["order_total"].toDouble(), + refundedAmount: json["refunded_amount"], + rewardPointsWereAdded: json["reward_points_were_added"], + rxAttachments: json["rx_attachments"] == null ? null : json["rx_attachments"], + checkoutAttributeDescription: checkoutAttributeDescriptionValues.map![json["checkout_attribute_description"]], + customerLanguageId: json["customer_language_id"], + affiliateId: json["affiliate_id"], + customerIp: customerIpValues.map![json["customer_ip"]], + authorizationTransactionId: json["authorization_transaction_id"] == null ? null : json["authorization_transaction_id"], + authorizationTransactionCode: json["authorization_transaction_code"], + authorizationTransactionResult: json["authorization_transaction_result"], + captureTransactionId: json["capture_transaction_id"], + captureTransactionResult: json["capture_transaction_result"], + subscriptionTransactionId: json["subscription_transaction_id"], + paidDateUtc: json["paid_date_utc"] == null ? null : DateTime.parse(json["paid_date_utc"]), + shippingMethod: shippingMethodValues.map![json["shipping_method"]], + shippingRateComputationMethodSystemName: shippingRateComputationMethodSystemNameValues.map![json["shipping_rate_computation_method_system_name"]], + customValuesXml: json["custom_values_xml"], + deleted: json["deleted"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + customer: OrderModelCustomer.fromJson(json["customer"]), + customerId: json["customer_id"], + billingAddress: IngAddress.fromJson(json["billing_address"]), + shippingAddress: IngAddress.fromJson(json["shipping_address"]), + orderItems: List.from(json["order_items"].map((x) => OrderItem.fromJson(x))), + orderStatusId: json["order_status_id"], + orderStatus: orderStatusValues.map![json["order_status"]], + orderStatusn: orderStatusnValues.map![json["order_statusn"]], + paymentStatusId: json["payment_status_id"], + paymentStatus: paymentStatusValues.map![json["payment_status"]], + paymentStatusn: paymentStatusnValues.map![json["payment_statusn"]], + shippingStatus: shippingStatusValues.map![json["shipping_status"]], + shippingStatusn: shippingStatusnValues.map![json["shipping_statusn"]], + customerTaxDisplayType: customerTaxDisplayTypeValues.map![json["customer_tax_display_type"]], + canCancel: json["can_cancel"], + canRefund: json["can_refund"], + lakumAmount: json["lakum_amount"], + preferDeliveryDate: json["prefer_delivery_date"] == null ? null : DateTime.parse(json["prefer_delivery_date"]), + preferDeliveryTime: json["prefer_delivery_time"] == null ? null : preferDeliveryTimeValues.map![json["prefer_delivery_time"]], + preferDeliveryTimen: json["prefer_delivery_timen"] == null ? null : preferDeliveryTimenValues.map![json["prefer_delivery_timen"]], + + // Driver Detail + driverID: json["DriverID"], + driverOTP: json["DriverOTP"], + ); Map toJson() => { - "id": id, - "store_id": storeId, - "order_guid": orderGuid, - "pick_up_in_store": pickUpInStore, - "payment_method_system_name": paymentMethodSystemNameValues.reverse[paymentMethodSystemName], - "payment_name": paymentNameValues.reverse[paymentName], - "payment_namen": paymentNameValues.reverse[paymentNamen], - "customer_currency_code": customerCurrencyCodeValues.reverse[customerCurrencyCode], - "currency_rate": currencyRate, - "customer_tax_display_type_id": customerTaxDisplayTypeId, - "vat_number": vatNumber, - "order_subtotal_incl_tax": orderSubtotalInclTax, - "order_subtotal_excl_tax": orderSubtotalExclTax, - "order_sub_total_discount_incl_tax": orderSubTotalDiscountInclTax, - "order_sub_total_discount_excl_tax": orderSubTotalDiscountExclTax, - "order_shipping_incl_tax": orderShippingInclTax, - "order_shipping_excl_tax": orderShippingExclTax, - "payment_method_additional_fee_incl_tax": paymentMethodAdditionalFeeInclTax, - "payment_method_additional_fee_excl_tax": paymentMethodAdditionalFeeExclTax, - "tax_rates": taxRates, - "order_tax": orderTax, - "order_discount": orderDiscount, - "order_total": orderTotal, - "refunded_amount": refundedAmount, - "reward_points_were_added": rewardPointsWereAdded, - "rx_attachments": rxAttachments == null ? null : rxAttachments, - "checkout_attribute_description": checkoutAttributeDescriptionValues.reverse[checkoutAttributeDescription], - "customer_language_id": customerLanguageId, - "affiliate_id": affiliateId, - "customer_ip": customerIpValues.reverse[customerIp], - "authorization_transaction_id": authorizationTransactionId == null ? null : authorizationTransactionId, - "authorization_transaction_code": authorizationTransactionCode, - "authorization_transaction_result": authorizationTransactionResult, - "capture_transaction_id": captureTransactionId, - "capture_transaction_result": captureTransactionResult, - "subscription_transaction_id": subscriptionTransactionId, - "paid_date_utc": paidDateUtc == null ? null : paidDateUtc.toIso8601String(), - "shipping_method": shippingMethodValues.reverse[shippingMethod], - "shipping_rate_computation_method_system_name": shippingRateComputationMethodSystemNameValues.reverse[shippingRateComputationMethodSystemName], - "custom_values_xml": customValuesXml, - "deleted": deleted, - "created_on_utc": createdOnUtc.toIso8601String(), - "customer": customer.toJson(), - "customer_id": customerId, - "billing_address": billingAddress.toJson(), - "shipping_address": shippingAddress.toJson(), - "order_items": List.from(orderItems.map((x) => x.toJson())), - "order_status_id": orderStatusId, - "order_status": orderStatusValues.reverse[orderStatus], - "order_statusn": orderStatusnValues.reverse[orderStatusn], - "payment_status_id": paymentStatusId, - "payment_status": paymentStatusValues.reverse[paymentStatus], - "payment_statusn": paymentStatusnValues.reverse[paymentStatusn], - "shipping_status": shippingStatusValues.reverse[shippingStatus], - "shipping_statusn": shippingStatusnValues.reverse[shippingStatusn], - "customer_tax_display_type": customerTaxDisplayTypeValues.reverse[customerTaxDisplayType], - "can_cancel": canCancel, - "can_refund": canRefund, - "lakum_amount": lakumAmount, - "prefer_delivery_date": preferDeliveryDate == null ? null : "${preferDeliveryDate.year.toString().padLeft(4, '0')}-${preferDeliveryDate.month.toString().padLeft(2, '0')}-${preferDeliveryDate.day.toString().padLeft(2, '0')}", - "prefer_delivery_time": preferDeliveryTime == null ? null : preferDeliveryTimeValues.reverse[preferDeliveryTime], - "prefer_delivery_timen": preferDeliveryTimen == null ? null : preferDeliveryTimenValues.reverse[preferDeliveryTimen], - }; + "id": id, + "store_id": storeId, + "order_guid": orderGuid, + "pick_up_in_store": pickUpInStore, + "payment_method_system_name": paymentMethodSystemNameValues.reverse[paymentMethodSystemName], + "payment_name": paymentNameValues.reverse[paymentName], + "payment_namen": paymentNameValues.reverse[paymentNamen], + "customer_currency_code": customerCurrencyCodeValues.reverse[customerCurrencyCode], + "currency_rate": currencyRate, + "customer_tax_display_type_id": customerTaxDisplayTypeId, + "vat_number": vatNumber, + "order_subtotal_incl_tax": orderSubtotalInclTax, + "order_subtotal_excl_tax": orderSubtotalExclTax, + "order_sub_total_discount_incl_tax": orderSubTotalDiscountInclTax, + "order_sub_total_discount_excl_tax": orderSubTotalDiscountExclTax, + "order_shipping_incl_tax": orderShippingInclTax, + "order_shipping_excl_tax": orderShippingExclTax, + "payment_method_additional_fee_incl_tax": paymentMethodAdditionalFeeInclTax, + "payment_method_additional_fee_excl_tax": paymentMethodAdditionalFeeExclTax, + "tax_rates": taxRates, + "order_tax": orderTax, + "order_discount": orderDiscount, + "order_total": orderTotal, + "refunded_amount": refundedAmount, + "reward_points_were_added": rewardPointsWereAdded, + "rx_attachments": rxAttachments == null ? null : rxAttachments, + "checkout_attribute_description": checkoutAttributeDescriptionValues.reverse[checkoutAttributeDescription], + "customer_language_id": customerLanguageId, + "affiliate_id": affiliateId, + "customer_ip": customerIpValues.reverse[customerIp], + "authorization_transaction_id": authorizationTransactionId == null ? null : authorizationTransactionId, + "authorization_transaction_code": authorizationTransactionCode, + "authorization_transaction_result": authorizationTransactionResult, + "capture_transaction_id": captureTransactionId, + "capture_transaction_result": captureTransactionResult, + "subscription_transaction_id": subscriptionTransactionId, + "paid_date_utc": paidDateUtc == null ? null : paidDateUtc!.toIso8601String(), + "shipping_method": shippingMethodValues.reverse[shippingMethod], + "shipping_rate_computation_method_system_name": shippingRateComputationMethodSystemNameValues.reverse[shippingRateComputationMethodSystemName], + "custom_values_xml": customValuesXml, + "deleted": deleted, + "created_on_utc": createdOnUtc!.toIso8601String(), + "customer": customer!.toJson(), + "customer_id": customerId, + "billing_address": billingAddress!.toJson(), + "shipping_address": shippingAddress!.toJson(), + "order_items": List.from(orderItems!.map((x) => x.toJson())), + "order_status_id": orderStatusId, + "order_status": orderStatusValues.reverse[orderStatus], + "order_statusn": orderStatusnValues.reverse[orderStatusn], + "payment_status_id": paymentStatusId, + "payment_status": paymentStatusValues.reverse[paymentStatus], + "payment_statusn": paymentStatusnValues.reverse[paymentStatusn], + "shipping_status": shippingStatusValues.reverse[shippingStatus], + "shipping_statusn": shippingStatusnValues.reverse[shippingStatusn], + "customer_tax_display_type": customerTaxDisplayTypeValues.reverse[customerTaxDisplayType], + "can_cancel": canCancel, + "can_refund": canRefund, + "lakum_amount": lakumAmount, + "prefer_delivery_date": preferDeliveryDate == null + ? null + : "${preferDeliveryDate!.year.toString().padLeft(4, '0')}-${preferDeliveryDate!.month.toString().padLeft(2, '0')}-${preferDeliveryDate!.day.toString().padLeft(2, '0')}", + "prefer_delivery_time": preferDeliveryTime == null ? null : preferDeliveryTimeValues.reverse[preferDeliveryTime], + "prefer_delivery_timen": preferDeliveryTimen == null ? null : preferDeliveryTimenValues.reverse[preferDeliveryTimen], + }; } class IngAddress { @@ -303,84 +302,93 @@ class IngAddress { this.latLong, }); - String id; - FirstName firstName; - LastName lastName; - BillingAddressEmail email; + String? id; + FirstName? firstName; + LastName? lastName; + BillingAddressEmail? email; dynamic company; dynamic countryId; - Country country; + Country? country; dynamic stateProvinceId; - City city; - Address1 address1; - Address2 address2; - String zipPostalCode; - String phoneNumber; + City? city; + Address1? address1; + Address2? address2; + String? zipPostalCode; + String? phoneNumber; dynamic faxNumber; - String customerAttributes; - DateTime createdOnUtc; + String? customerAttributes; + DateTime? createdOnUtc; dynamic province; - String latLong; + String? latLong; - LatLng getLocation(){ - if(latLong.contains(',')){ - var parts = latLong.trim().split(','); - if(parts.length == 2){ + LatLng getLocation() { + if (latLong!.contains(',')) { + var parts = latLong!.trim().split(','); + if (parts.length == 2) { var lat = double.tryParse(parts.first); var lng = double.tryParse(parts.last); - if(lat != null || lng != null) { - var location = LatLng(lat, lng); + if (lat != null || lng != null) { + var location = LatLng(lat!, lng!); return location; } } } - return null; + return LatLng(double.nan, double.nan); + //changed by Aamir } factory IngAddress.fromJson(Map json) => IngAddress( - id: json["id"], - firstName: firstNameValues.map[json["first_name"]], - lastName: lastNameValues.map[json["last_name"]], - email: billingAddressEmailValues.map[json["email"]], - company: json["company"], - countryId: json["country_id"], - country: countryValues.map[json["country"]], - stateProvinceId: json["state_province_id"], - city: cityValues.map[json["city"]], - address1: address1Values.map[json["address1"]], - address2: address2Values.map[json["address2"]], - zipPostalCode: json["zip_postal_code"], - phoneNumber: json["phone_number"], - faxNumber: json["fax_number"], - customerAttributes: json["customer_attributes"], - createdOnUtc: DateTime.parse(json["created_on_utc"]), - province: json["province"], - latLong: json["lat_long"], - ); + id: json["id"], + firstName: firstNameValues.map![json["first_name"]], + lastName: lastNameValues.map![json["last_name"]], + email: billingAddressEmailValues.map![json["email"]], + company: json["company"], + countryId: json["country_id"], + country: countryValues.map![json["country"]], + stateProvinceId: json["state_province_id"], + city: cityValues.map![json["city"]], + address1: address1Values.map![json["address1"]], + address2: address2Values.map![json["address2"]], + zipPostalCode: json["zip_postal_code"], + phoneNumber: json["phone_number"], + faxNumber: json["fax_number"], + customerAttributes: json["customer_attributes"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + province: json["province"], + latLong: json["lat_long"], + ); Map toJson() => { - "id": id, - "first_name": firstNameValues.reverse[firstName], - "last_name": lastNameValues.reverse[lastName], - "email": billingAddressEmailValues.reverse[email], - "company": company, - "country_id": countryId, - "country": countryValues.reverse[country], - "state_province_id": stateProvinceId, - "city": cityValues.reverse[city], - "address1": address1Values.reverse[address1], - "address2": address2Values.reverse[address2], - "zip_postal_code": zipPostalCode, - "phone_number": phoneNumber, - "fax_number": faxNumber, - "customer_attributes": customerAttributes, - "created_on_utc": createdOnUtc.toIso8601String(), - "province": province, - "lat_long": latLong, - }; + "id": id, + "first_name": firstNameValues.reverse[firstName], + "last_name": lastNameValues.reverse[lastName], + "email": billingAddressEmailValues.reverse[email], + "company": company, + "country_id": countryId, + "country": countryValues.reverse[country], + "state_province_id": stateProvinceId, + "city": cityValues.reverse[city], + "address1": address1Values.reverse[address1], + "address2": address2Values.reverse[address2], + "zip_postal_code": zipPostalCode, + "phone_number": phoneNumber, + "fax_number": faxNumber, + "customer_attributes": customerAttributes, + "created_on_utc": createdOnUtc!.toIso8601String(), + "province": province, + "lat_long": latLong, + }; } -enum Address1 { THE_7960_MOSAB_IBN_UMAIR_STREET_AL_RIYADH, THE_6500_AL_AMEEN_ABDULLAH_AL_ALI_AL_NAEEM_STREET_AL_RIYADH, THE_6603_IBRAHIM_IBN_AL_HAMASI_AR_RIYAD, THE_9626_SALAH_AD_DIN_AL_AYYUBI_ROAD_AL_RIYADH, THE_3075_PRINCE_MANSUR_BIN_ABDULAZIZ_STREET_AL_RIYADH, THE_40, THE_7801_AL_IHSA_AL_RIYADH } +enum Address1 { + THE_7960_MOSAB_IBN_UMAIR_STREET_AL_RIYADH, + THE_6500_AL_AMEEN_ABDULLAH_AL_ALI_AL_NAEEM_STREET_AL_RIYADH, + THE_6603_IBRAHIM_IBN_AL_HAMASI_AR_RIYAD, + THE_9626_SALAH_AD_DIN_AL_AYYUBI_ROAD_AL_RIYADH, + THE_3075_PRINCE_MANSUR_BIN_ABDULAZIZ_STREET_AL_RIYADH, + THE_40, + THE_7801_AL_IHSA_AL_RIYADH +} final address1Values = EnumValues({ "3075, Prince Mansur Bin Abdulaziz Street, Al Riyadh, ": Address1.THE_3075_PRINCE_MANSUR_BIN_ABDULAZIZ_STREET_AL_RIYADH, @@ -392,7 +400,15 @@ final address1Values = EnumValues({ "9626, Salah Ad Din Al Ayyubi Road, Al Riyadh, ": Address1.THE_9626_SALAH_AD_DIN_AL_AYYUBI_ROAD_AL_RIYADH }); -enum Address2 { AL_MALAZ_RIYADH_PROVINCE_3460, AL_MALAZ_RIYADH_PROVINCE_2817, AR_RAHMANIYYAH_RIYADH_PROVINCE_3816, AL_MALAZ_RIYADH_PROVINCE_3815, AL_WIZARAT_RIYADH_PROVINCE_7039, EASTERN_PROVINCE, AL_MALAZ_RIYADH_PROVINCE_3084 } +enum Address2 { + AL_MALAZ_RIYADH_PROVINCE_3460, + AL_MALAZ_RIYADH_PROVINCE_2817, + AR_RAHMANIYYAH_RIYADH_PROVINCE_3816, + AL_MALAZ_RIYADH_PROVINCE_3815, + AL_WIZARAT_RIYADH_PROVINCE_7039, + EASTERN_PROVINCE, + AL_MALAZ_RIYADH_PROVINCE_3084 +} final address2Values = EnumValues({ "Al Malaz, Riyadh Province, 2817, ": Address2.AL_MALAZ_RIYADH_PROVINCE_2817, @@ -406,16 +422,11 @@ final address2Values = EnumValues({ enum City { RIYADH, DAMMAM } -final cityValues = EnumValues({ - "Dammam": City.DAMMAM, - "Riyadh": City.RIYADH -}); +final cityValues = EnumValues({"Dammam": City.DAMMAM, "Riyadh": City.RIYADH}); enum Country { SAUDI_ARABIA } -final countryValues = EnumValues({ - "Saudi Arabia": Country.SAUDI_ARABIA -}); +final countryValues = EnumValues({"Saudi Arabia": Country.SAUDI_ARABIA}); enum BillingAddressEmail { TAMER_FANASHEH_GMAIL_COM, TAMER_DASDASDAS_GMAIL_COM, TAMER_FANASHEH_DRSULAIMANALHABIB_COM } @@ -427,21 +438,23 @@ final billingAddressEmailValues = EnumValues({ enum FirstName { TAMER, TAMER_FANASHEH, FIRST_NAME_TAMER } -final firstNameValues = EnumValues({ - "tamer": FirstName.FIRST_NAME_TAMER, - "TAMER": FirstName.TAMER, - "TAMER FANASHEH": FirstName.TAMER_FANASHEH -}); +final firstNameValues = EnumValues({"tamer": FirstName.FIRST_NAME_TAMER, "TAMER": FirstName.TAMER, "TAMER FANASHEH": FirstName.TAMER_FANASHEH}); enum LastName { FANASHEH, MUSA, LAST_NAME_FANASHEH } -final lastNameValues = EnumValues({ - "FANASHEH": LastName.FANASHEH, - "Fanasheh": LastName.LAST_NAME_FANASHEH, - "MUSA": LastName.MUSA -}); - -enum LatLong { THE_246784385694919524674091019299842, THE_24664749106968054673501121876645, THE_2470993657522702246664724647270134, THE_246626170308533764673348444086107, THE_24664875225999005467347443322574, THE_24674331807435784671024726818286, THE_263430228396836664991113909164471, THE_246767400793488074673774399406786, THE_24665374673515 } +final lastNameValues = EnumValues({"FANASHEH": LastName.FANASHEH, "Fanasheh": LastName.LAST_NAME_FANASHEH, "MUSA": LastName.MUSA}); + +enum LatLong { + THE_246784385694919524674091019299842, + THE_24664749106968054673501121876645, + THE_2470993657522702246664724647270134, + THE_246626170308533764673348444086107, + THE_24664875225999005467347443322574, + THE_24674331807435784671024726818286, + THE_263430228396836664991113909164471, + THE_246767400793488074673774399406786, + THE_24665374673515 +} final latLongValues = EnumValues({ "24.662617030853376,46.73348444086107": LatLong.THE_246626170308533764673348444086107, @@ -457,10 +470,7 @@ final latLongValues = EnumValues({ enum CheckoutAttributeDescription { EMPTY, CHECKOUT_ATTRIBUTE_DESCRIPTION } -final checkoutAttributeDescriptionValues = EnumValues({ - "ارفاق وصفة: ": CheckoutAttributeDescription.CHECKOUT_ATTRIBUTE_DESCRIPTION, - "": CheckoutAttributeDescription.EMPTY -}); +final checkoutAttributeDescriptionValues = EnumValues({"ارفاق وصفة: ": CheckoutAttributeDescription.CHECKOUT_ATTRIBUTE_DESCRIPTION, "": CheckoutAttributeDescription.EMPTY}); class OrderModelCustomer { OrderModelCustomer({ @@ -485,88 +495,82 @@ class OrderModelCustomer { this.roleIds, }); - String id; + String? id; dynamic username; dynamic email; dynamic firstName; dynamic lastName; - String languageId; + String? languageId; dynamic adminComment; - bool isTaxExempt; - bool hasShoppingCartItems; - bool active; - bool deleted; - bool isSystemAccount; + bool? isTaxExempt; + bool? hasShoppingCartItems; + bool? active; + bool? deleted; + bool? isSystemAccount; dynamic systemName; dynamic lastIpAddress; dynamic createdOnUtc; dynamic lastLoginDateUtc; dynamic lastActivityDateUtc; dynamic registeredInStoreId; - List roleIds; + List? roleIds; factory OrderModelCustomer.fromJson(Map json) => OrderModelCustomer( - id: json["id"], - username: usernameValues.map[json["username"]], - email: billingAddressEmailValues.map[json["email"]], - firstName: firstNameValues.map[json["first_name"]], - lastName: lastNameValues.map[json["last_name"]], - languageId: json["language_id"], - adminComment: json["admin_comment"], - isTaxExempt: json["is_tax_exempt"], - hasShoppingCartItems: json["has_shopping_cart_items"], - active: json["active"], - deleted: json["deleted"], - isSystemAccount: json["is_system_account"], - systemName: json["system_name"], - lastIpAddress: lastIpAddressValues.map[json["last_ip_address"]], - createdOnUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["created_on_utc"]) : null, - lastLoginDateUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["last_login_date_utc"]) : null, - lastActivityDateUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["last_activity_date_utc"]) : null, - registeredInStoreId: json["registered_in_store_id"], - roleIds: List.from(json["role_ids"].map((x) => x)), - ); + id: json["id"], + username: usernameValues.map![json["username"]], + email: billingAddressEmailValues.map![json["email"]], + firstName: firstNameValues.map![json["first_name"]], + lastName: lastNameValues.map![json["last_name"]], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: lastIpAddressValues.map![json["last_ip_address"]], + createdOnUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["created_on_utc"]) : null, + lastLoginDateUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["last_login_date_utc"]) : null, + lastActivityDateUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["last_activity_date_utc"]) : null, + registeredInStoreId: json["registered_in_store_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + ); Map toJson() => { - "id": id, - "username": usernameValues.reverse[username], - "email": billingAddressEmailValues.reverse[email], - "first_name": firstNameValues.reverse[firstName], - "last_name": lastNameValues.reverse[lastName], - "language_id": languageId, - "admin_comment": adminComment, - "is_tax_exempt": isTaxExempt, - "has_shopping_cart_items": hasShoppingCartItems, - "active": active, - "deleted": deleted, - "is_system_account": isSystemAccount, - "system_name": systemName, - "last_ip_address": lastIpAddressValues.reverse[lastIpAddress], - "created_on_utc": createdOnUtc.toIso8601String(), - "last_login_date_utc": lastLoginDateUtc.toIso8601String(), - "last_activity_date_utc": lastActivityDateUtc.toIso8601String(), - "registered_in_store_id": registeredInStoreId, - "role_ids": List.from(roleIds.map((x) => x)), - }; + "id": id, + "username": usernameValues.reverse[username], + "email": billingAddressEmailValues.reverse[email], + "first_name": firstNameValues.reverse[firstName], + "last_name": lastNameValues.reverse[lastName], + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddressValues.reverse[lastIpAddress], + "created_on_utc": createdOnUtc.toIso8601String(), + "last_login_date_utc": lastLoginDateUtc.toIso8601String(), + "last_activity_date_utc": lastActivityDateUtc.toIso8601String(), + "registered_in_store_id": registeredInStoreId, + "role_ids": List.from(roleIds!.map((x) => x)), + }; } enum LastIpAddress { THE_1050220126 } -final lastIpAddressValues = EnumValues({ - "10.50.220.126": LastIpAddress.THE_1050220126 -}); +final lastIpAddressValues = EnumValues({"10.50.220.126": LastIpAddress.THE_1050220126}); enum Username { TAMERF } -final usernameValues = EnumValues({ - "tamerf": Username.TAMERF -}); +final usernameValues = EnumValues({"tamerf": Username.TAMERF}); enum CustomerCurrencyCode { SAR } -final customerCurrencyCodeValues = EnumValues({ - "SAR": CustomerCurrencyCode.SAR -}); +final customerCurrencyCodeValues = EnumValues({"SAR": CustomerCurrencyCode.SAR}); enum CustomerIp { THE_105010210, THE_127001, THE_1020200101, THE_102020041, THE_10501028, THE_102020033, THE_1020200170, THE_102020011 } @@ -583,10 +587,7 @@ final customerIpValues = EnumValues({ enum CustomerTaxDisplayType { EXCLUDING_TAX } -final customerTaxDisplayTypeValues = EnumValues({ - "ExcludingTax": CustomerTaxDisplayType.EXCLUDING_TAX -}); - +final customerTaxDisplayTypeValues = EnumValues({"ExcludingTax": CustomerTaxDisplayType.EXCLUDING_TAX}); class OrderItem { OrderItem({ @@ -610,62 +611,62 @@ class OrderItem { }); dynamic quantity; - double unitPriceInclTax; - double unitPriceExclTax; - double priceInclTax; - double priceExclTax; - double discountAmountInclTax; - double discountAmountExclTax; - double originalProductCost; - String attributeDescription; + double? unitPriceInclTax; + double? unitPriceExclTax; + double? priceInclTax; + double? priceExclTax; + double? discountAmountInclTax; + double? discountAmountExclTax; + double? originalProductCost; + String? attributeDescription; dynamic downloadCount; - bool isDownloadActivated; + bool? isDownloadActivated; dynamic licenseDownloadId; - double itemWeight; + double? itemWeight; dynamic rentalStartDateUtc; dynamic rentalEndDateUtc; - Product product; + Product? product; dynamic productId; factory OrderItem.fromJson(Map json) => OrderItem( - quantity: json["quantity"], - unitPriceInclTax: json["unit_price_incl_tax"].toDouble(), - unitPriceExclTax: json["unit_price_excl_tax"].toDouble(), - priceInclTax: json["price_incl_tax"].toDouble(), - priceExclTax: json["price_excl_tax"].toDouble(), - discountAmountInclTax: json["discount_amount_incl_tax"].toDouble(), - discountAmountExclTax: json["discount_amount_excl_tax"].toDouble(), - originalProductCost: json["original_product_cost"].toDouble(), - attributeDescription: json["attribute_description"], - downloadCount: json["download_count"], - isDownloadActivated: json["isDownload_activated"], - licenseDownloadId: json["license_download_id"], - itemWeight: json["item_weight"].toDouble(), - rentalStartDateUtc: json["rental_start_date_utc"], - rentalEndDateUtc: json["rental_end_date_utc"], - product: Product.fromJson(json["product"]), - productId: json["product_id"], - ); + quantity: json["quantity"], + unitPriceInclTax: json["unit_price_incl_tax"].toDouble(), + unitPriceExclTax: json["unit_price_excl_tax"].toDouble(), + priceInclTax: json["price_incl_tax"].toDouble(), + priceExclTax: json["price_excl_tax"].toDouble(), + discountAmountInclTax: json["discount_amount_incl_tax"].toDouble(), + discountAmountExclTax: json["discount_amount_excl_tax"].toDouble(), + originalProductCost: json["original_product_cost"].toDouble(), + attributeDescription: json["attribute_description"], + downloadCount: json["download_count"], + isDownloadActivated: json["isDownload_activated"], + licenseDownloadId: json["license_download_id"], + itemWeight: json["item_weight"].toDouble(), + rentalStartDateUtc: json["rental_start_date_utc"], + rentalEndDateUtc: json["rental_end_date_utc"], + product: Product.fromJson(json["product"]), + productId: json["product_id"], + ); Map toJson() => { - "quantity": quantity, - "unit_price_incl_tax": unitPriceInclTax, - "unit_price_excl_tax": unitPriceExclTax, - "price_incl_tax": priceInclTax, - "price_excl_tax": priceExclTax, - "discount_amount_incl_tax": discountAmountInclTax, - "discount_amount_excl_tax": discountAmountExclTax, - "original_product_cost": originalProductCost, - "attribute_description": attributeDescription, - "download_count": downloadCount, - "isDownload_activated": isDownloadActivated, - "license_download_id": licenseDownloadId, - "item_weight": itemWeight, - "rental_start_date_utc": rentalStartDateUtc, - "rental_end_date_utc": rentalEndDateUtc, - "product": product.toJson(), - "product_id": productId, - }; + "quantity": quantity, + "unit_price_incl_tax": unitPriceInclTax, + "unit_price_excl_tax": unitPriceExclTax, + "price_incl_tax": priceInclTax, + "price_excl_tax": priceExclTax, + "discount_amount_incl_tax": discountAmountInclTax, + "discount_amount_excl_tax": discountAmountExclTax, + "original_product_cost": originalProductCost, + "attribute_description": attributeDescription, + "download_count": downloadCount, + "isDownload_activated": isDownloadActivated, + "license_download_id": licenseDownloadId, + "item_weight": itemWeight, + "rental_start_date_utc": rentalStartDateUtc, + "rental_end_date_utc": rentalEndDateUtc, + "product": product!.toJson(), + "product_id": productId, + }; } class Product { @@ -783,85 +784,85 @@ class Product { this.seName, }); - String id; - bool visibleIndividually; - String name; - String namen; + String? id; + bool? visibleIndividually; + String? name; + String? namen; dynamic localizedNames; - String shortDescription; - String shortDescriptionn; - String fullDescription; - String fullDescriptionn; - bool markasNew; - bool showOnHomePage; - String metaKeywords; - String metaDescription; - String metaTitle; - bool allowCustomerReviews; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + bool? allowCustomerReviews; dynamic approvedRatingSum; dynamic notApprovedRatingSum; dynamic approvedTotalReviews; dynamic notApprovedTotalReviews; - String sku; - bool isRx; - bool prescriptionRequired; + String? sku; + bool? isRx; + bool? prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; dynamic manufacturerPartNumber; dynamic gtin; - bool isGiftCard; - bool requireOtherProducts; - bool automaticallyAddRequiredProducts; - bool isDownload; - bool unlimitedDownloads; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; dynamic maxNumberOfDownloads; dynamic downloadExpirationDays; - bool hasSampleDownload; - bool hasUserAgreement; - bool isRecurring; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; dynamic recurringCycleLength; dynamic recurringTotalCycles; - bool isRental; + bool? isRental; dynamic rentalPriceLength; - bool isShipEnabled; - bool isFreeShipping; - bool shipSeparately; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; dynamic additionalShippingCharge; - bool isTaxExempt; - bool isTelecommunicationsOrBroadcastingOrElectronicServices; - bool useMultipleWarehouses; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; dynamic manageInventoryMethodId; dynamic stockQuantity; dynamic stockAvailability; dynamic stockAvailabilityn; - bool displayStockAvailability; - bool displayStockQuantity; + bool? displayStockAvailability; + bool? displayStockQuantity; dynamic minStockQuantity; dynamic notifyAdminForQuantityBelow; - bool allowBackInStockSubscriptions; + bool? allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; dynamic allowedQuantities; - bool allowAddingOnlyExistingAttributeCombinations; - bool disableBuyButton; - bool disableWishlistButton; - bool availableForPreOrder; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; dynamic preOrderAvailabilityStartDateTimeUtc; - bool callForPrice; - double price; + bool? callForPrice; + double? price; dynamic oldPrice; - double productCost; + double? productCost; dynamic specialPrice; dynamic specialPriceStartDateTimeUtc; dynamic specialPriceEndDateTimeUtc; - bool customerEntersPrice; + bool? customerEntersPrice; dynamic minimumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice; - bool basepriceEnabled; + bool? basepriceEnabled; dynamic basepriceAmount; dynamic basepriceBaseAmount; - bool hasTierPrices; - bool hasDiscountsApplied; + bool? hasTierPrices; + bool? hasDiscountsApplied; dynamic discountName; dynamic discountNamen; dynamic discountDescription; @@ -869,15 +870,15 @@ class Product { dynamic discountPercentage; dynamic currency; dynamic currencyn; - double weight; + double? weight; dynamic length; dynamic width; dynamic height; dynamic availableStartDateTimeUtc; dynamic availableEndDateTimeUtc; dynamic displayOrder; - bool published; - bool deleted; + bool? published; + bool? deleted; dynamic createdOnUtc; dynamic updatedOnUtc; dynamic productType; @@ -886,249 +887,247 @@ class Product { dynamic discountIds; dynamic storeIds; dynamic manufacturerIds; - List reviews; - List images; + List? reviews; + List? images; dynamic attributes; dynamic specifications; dynamic associatedProductIds; - List tags; + List? tags; dynamic vendorId; - String seName; + String? seName; factory Product.fromJson(Map json) => Product( - id: json["id"], - visibleIndividually: json["visible_individually"], - name: json["name"], - namen: json["namen"], - localizedNames: json["localized_names"], - shortDescription: json["short_description"] == null ? null : json["short_description"], - shortDescriptionn: json["short_descriptionn"] == null ? null : json["short_descriptionn"], - fullDescription: json["full_description"], - fullDescriptionn: json["full_descriptionn"], - markasNew: json["markas_new"], - showOnHomePage: json["show_on_home_page"], - metaKeywords: json["meta_keywords"] == null ? null : json["meta_keywords"], - metaDescription: json["meta_description"] == null ? null : json["meta_description"], - metaTitle: json["meta_title"] == null ? null : json["meta_title"], - allowCustomerReviews: json["allow_customer_reviews"], - approvedRatingSum: json["approved_rating_sum"], - notApprovedRatingSum: json["not_approved_rating_sum"], - approvedTotalReviews: json["approved_total_reviews"], - notApprovedTotalReviews: json["not_approved_total_reviews"], - sku: json["sku"], - isRx: json["is_rx"], - prescriptionRequired: json["prescription_required"], - rxMessage: json["rx_message"], - rxMessagen: json["rx_messagen"], - manufacturerPartNumber: json["manufacturer_part_number"], - gtin: json["gtin"], - isGiftCard: json["is_gift_card"], - requireOtherProducts: json["require_other_products"], - automaticallyAddRequiredProducts: json["automatically_add_required_products"], - isDownload: json["is_download"], - unlimitedDownloads: json["unlimited_downloads"], - maxNumberOfDownloads: json["max_number_of_downloads"], - downloadExpirationDays: json["download_expiration_days"], - hasSampleDownload: json["has_sample_download"], - hasUserAgreement: json["has_user_agreement"], - isRecurring: json["is_recurring"], - recurringCycleLength: json["recurring_cycle_length"], - recurringTotalCycles: json["recurring_total_cycles"], - isRental: json["is_rental"], - rentalPriceLength: json["rental_price_length"], - isShipEnabled: json["is_ship_enabled"], - isFreeShipping: json["is_free_shipping"], - shipSeparately: json["ship_separately"], - additionalShippingCharge: json["additional_shipping_charge"], - isTaxExempt: json["is_tax_exempt"], - isTelecommunicationsOrBroadcastingOrElectronicServices: json["is_telecommunications_or_broadcasting_or_electronic_services"], - useMultipleWarehouses: json["use_multiple_warehouses"], - manageInventoryMethodId: json["manage_inventory_method_id"], - stockQuantity: json["stock_quantity"], - stockAvailability: json["stock_availability"], - stockAvailabilityn: json["stock_availabilityn"], - displayStockAvailability: json["display_stock_availability"], - displayStockQuantity: json["display_stock_quantity"], - minStockQuantity: json["min_stock_quantity"], - notifyAdminForQuantityBelow: json["notify_admin_for_quantity_below"], - allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"], - orderMinimumQuantity: json["order_minimum_quantity"], - orderMaximumQuantity: json["order_maximum_quantity"], - allowedQuantities: json["allowed_quantities"], - allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"], - disableBuyButton: json["disable_buy_button"], - disableWishlistButton: json["disable_wishlist_button"], - availableForPreOrder: json["available_for_pre_order"], - preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"], - callForPrice: json["call_for_price"], - price: json["price"].toDouble(), - oldPrice: json["old_price"], - productCost: json["product_cost"].toDouble(), - specialPrice: json["special_price"], - specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"], - specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"], - customerEntersPrice: json["customer_enters_price"], - minimumCustomerEnteredPrice: json["minimum_customer_entered_price"], - maximumCustomerEnteredPrice: json["maximum_customer_entered_price"], - basepriceEnabled: json["baseprice_enabled"], - basepriceAmount: json["baseprice_amount"], - basepriceBaseAmount: json["baseprice_base_amount"], - hasTierPrices: json["has_tier_prices"], - hasDiscountsApplied: json["has_discounts_applied"], - discountName: json["discount_name"], - discountNamen: json["discount_namen"], - discountDescription: json["discount_description"], - discountDescriptionn: json["discount_Descriptionn"], - discountPercentage: json["discount_percentage"], - currency: json["currency"], - currencyn: json["currencyn"], - weight: json["weight"].toDouble(), - length: json["length"], - width: json["width"], - height: json["height"], - availableStartDateTimeUtc: json["available_start_date_time_utc"], - availableEndDateTimeUtc: json["available_end_date_time_utc"], - displayOrder: json["display_order"], - published: json["published"], - deleted: json["deleted"], - createdOnUtc: DateTime.parse(json["created_on_utc"]), - updatedOnUtc: DateTime.parse(json["updated_on_utc"]), - productType: productTypeValues.map[json["product_type"]], - parentGroupedProductId: json["parent_grouped_product_id"], - roleIds: json["role_ids"], - discountIds: json["discount_ids"], - storeIds: json["store_ids"], - manufacturerIds: json["manufacturer_ids"], - reviews: List.from(json["reviews"].map((x) => Review.fromJson(x))), - images: List.from(json["images"].map((x) => PharmacyImageObject.fromJson(x))), - attributes: json["attributes"], - specifications: json["specifications"], - associatedProductIds: json["associated_product_ids"], - tags: List.from(json["tags"].map((x) => x)), - vendorId: json["vendor_id"], - seName: json["se_name"], - ); + id: json["id"], + visibleIndividually: json["visible_individually"], + name: json["name"], + namen: json["namen"], + localizedNames: json["localized_names"], + shortDescription: json["short_description"] == null ? null : json["short_description"], + shortDescriptionn: json["short_descriptionn"] == null ? null : json["short_descriptionn"], + fullDescription: json["full_description"], + fullDescriptionn: json["full_descriptionn"], + markasNew: json["markas_new"], + showOnHomePage: json["show_on_home_page"], + metaKeywords: json["meta_keywords"] == null ? null : json["meta_keywords"], + metaDescription: json["meta_description"] == null ? null : json["meta_description"], + metaTitle: json["meta_title"] == null ? null : json["meta_title"], + allowCustomerReviews: json["allow_customer_reviews"], + approvedRatingSum: json["approved_rating_sum"], + notApprovedRatingSum: json["not_approved_rating_sum"], + approvedTotalReviews: json["approved_total_reviews"], + notApprovedTotalReviews: json["not_approved_total_reviews"], + sku: json["sku"], + isRx: json["is_rx"], + prescriptionRequired: json["prescription_required"], + rxMessage: json["rx_message"], + rxMessagen: json["rx_messagen"], + manufacturerPartNumber: json["manufacturer_part_number"], + gtin: json["gtin"], + isGiftCard: json["is_gift_card"], + requireOtherProducts: json["require_other_products"], + automaticallyAddRequiredProducts: json["automatically_add_required_products"], + isDownload: json["is_download"], + unlimitedDownloads: json["unlimited_downloads"], + maxNumberOfDownloads: json["max_number_of_downloads"], + downloadExpirationDays: json["download_expiration_days"], + hasSampleDownload: json["has_sample_download"], + hasUserAgreement: json["has_user_agreement"], + isRecurring: json["is_recurring"], + recurringCycleLength: json["recurring_cycle_length"], + recurringTotalCycles: json["recurring_total_cycles"], + isRental: json["is_rental"], + rentalPriceLength: json["rental_price_length"], + isShipEnabled: json["is_ship_enabled"], + isFreeShipping: json["is_free_shipping"], + shipSeparately: json["ship_separately"], + additionalShippingCharge: json["additional_shipping_charge"], + isTaxExempt: json["is_tax_exempt"], + isTelecommunicationsOrBroadcastingOrElectronicServices: json["is_telecommunications_or_broadcasting_or_electronic_services"], + useMultipleWarehouses: json["use_multiple_warehouses"], + manageInventoryMethodId: json["manage_inventory_method_id"], + stockQuantity: json["stock_quantity"], + stockAvailability: json["stock_availability"], + stockAvailabilityn: json["stock_availabilityn"], + displayStockAvailability: json["display_stock_availability"], + displayStockQuantity: json["display_stock_quantity"], + minStockQuantity: json["min_stock_quantity"], + notifyAdminForQuantityBelow: json["notify_admin_for_quantity_below"], + allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"], + orderMinimumQuantity: json["order_minimum_quantity"], + orderMaximumQuantity: json["order_maximum_quantity"], + allowedQuantities: json["allowed_quantities"], + allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"], + disableBuyButton: json["disable_buy_button"], + disableWishlistButton: json["disable_wishlist_button"], + availableForPreOrder: json["available_for_pre_order"], + preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"], + callForPrice: json["call_for_price"], + price: json["price"].toDouble(), + oldPrice: json["old_price"], + productCost: json["product_cost"].toDouble(), + specialPrice: json["special_price"], + specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"], + specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"], + customerEntersPrice: json["customer_enters_price"], + minimumCustomerEnteredPrice: json["minimum_customer_entered_price"], + maximumCustomerEnteredPrice: json["maximum_customer_entered_price"], + basepriceEnabled: json["baseprice_enabled"], + basepriceAmount: json["baseprice_amount"], + basepriceBaseAmount: json["baseprice_base_amount"], + hasTierPrices: json["has_tier_prices"], + hasDiscountsApplied: json["has_discounts_applied"], + discountName: json["discount_name"], + discountNamen: json["discount_namen"], + discountDescription: json["discount_description"], + discountDescriptionn: json["discount_Descriptionn"], + discountPercentage: json["discount_percentage"], + currency: json["currency"], + currencyn: json["currencyn"], + weight: json["weight"].toDouble(), + length: json["length"], + width: json["width"], + height: json["height"], + availableStartDateTimeUtc: json["available_start_date_time_utc"], + availableEndDateTimeUtc: json["available_end_date_time_utc"], + displayOrder: json["display_order"], + published: json["published"], + deleted: json["deleted"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + productType: productTypeValues.map![json["product_type"]], + parentGroupedProductId: json["parent_grouped_product_id"], + roleIds: json["role_ids"], + discountIds: json["discount_ids"], + storeIds: json["store_ids"], + manufacturerIds: json["manufacturer_ids"], + reviews: List.from(json["reviews"].map((x) => Review.fromJson(x))), + images: List.from(json["images"].map((x) => PharmacyImageObject.fromJson(x))), + attributes: json["attributes"], + specifications: json["specifications"], + associatedProductIds: json["associated_product_ids"], + tags: List.from(json["tags"].map((x) => x)), + vendorId: json["vendor_id"], + seName: json["se_name"], + ); Map toJson() => { - "id": id, - "visible_individually": visibleIndividually, - "name": name, - "namen": namen, - "localized_names": localizedNames, - "short_description": shortDescription == null ? null : shortDescription, - "short_descriptionn": shortDescriptionn == null ? null : shortDescriptionn, - "full_description": fullDescription, - "full_descriptionn": fullDescriptionn, - "markas_new": markasNew, - "show_on_home_page": showOnHomePage, - "meta_keywords": metaKeywords == null ? null : metaKeywords, - "meta_description": metaDescription == null ? null : metaDescription, - "meta_title": metaTitle == null ? null : metaTitle, - "allow_customer_reviews": allowCustomerReviews, - "approved_rating_sum": approvedRatingSum, - "not_approved_rating_sum": notApprovedRatingSum, - "approved_total_reviews": approvedTotalReviews, - "not_approved_total_reviews": notApprovedTotalReviews, - "sku": sku, - "is_rx": isRx, - "prescription_required": prescriptionRequired, - "rx_message": rxMessage, - "rx_messagen": rxMessagen, - "manufacturer_part_number": manufacturerPartNumber, - "gtin": gtin, - "is_gift_card": isGiftCard, - "require_other_products": requireOtherProducts, - "automatically_add_required_products": automaticallyAddRequiredProducts, - "is_download": isDownload, - "unlimited_downloads": unlimitedDownloads, - "max_number_of_downloads": maxNumberOfDownloads, - "download_expiration_days": downloadExpirationDays, - "has_sample_download": hasSampleDownload, - "has_user_agreement": hasUserAgreement, - "is_recurring": isRecurring, - "recurring_cycle_length": recurringCycleLength, - "recurring_total_cycles": recurringTotalCycles, - "is_rental": isRental, - "rental_price_length": rentalPriceLength, - "is_ship_enabled": isShipEnabled, - "is_free_shipping": isFreeShipping, - "ship_separately": shipSeparately, - "additional_shipping_charge": additionalShippingCharge, - "is_tax_exempt": isTaxExempt, - "is_telecommunications_or_broadcasting_or_electronic_services": isTelecommunicationsOrBroadcastingOrElectronicServices, - "use_multiple_warehouses": useMultipleWarehouses, - "manage_inventory_method_id": manageInventoryMethodId, - "stock_quantity": stockQuantity, - "stock_availability": stockAvailability, - "stock_availabilityn": stockAvailabilityn, - "display_stock_availability": displayStockAvailability, - "display_stock_quantity": displayStockQuantity, - "min_stock_quantity": minStockQuantity, - "notify_admin_for_quantity_below": notifyAdminForQuantityBelow, - "allow_back_in_stock_subscriptions": allowBackInStockSubscriptions, - "order_minimum_quantity": orderMinimumQuantity, - "order_maximum_quantity": orderMaximumQuantity, - "allowed_quantities": allowedQuantities, - "allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations, - "disable_buy_button": disableBuyButton, - "disable_wishlist_button": disableWishlistButton, - "available_for_pre_order": availableForPreOrder, - "pre_order_availability_start_date_time_utc": preOrderAvailabilityStartDateTimeUtc, - "call_for_price": callForPrice, - "price": price, - "old_price": oldPrice, - "product_cost": productCost, - "special_price": specialPrice, - "special_price_start_date_time_utc": specialPriceStartDateTimeUtc, - "special_price_end_date_time_utc": specialPriceEndDateTimeUtc, - "customer_enters_price": customerEntersPrice, - "minimum_customer_entered_price": minimumCustomerEnteredPrice, - "maximum_customer_entered_price": maximumCustomerEnteredPrice, - "baseprice_enabled": basepriceEnabled, - "baseprice_amount": basepriceAmount, - "baseprice_base_amount": basepriceBaseAmount, - "has_tier_prices": hasTierPrices, - "has_discounts_applied": hasDiscountsApplied, - "discount_name": discountName, - "discount_namen": discountNamen, - "discount_description": discountDescription, - "discount_Descriptionn": discountDescriptionn, - "discount_percentage": discountPercentage, - "currency": currency, - "currencyn": currencyn, - "weight": weight, - "length": length, - "width": width, - "height": height, - "available_start_date_time_utc": availableStartDateTimeUtc, - "available_end_date_time_utc": availableEndDateTimeUtc, - "display_order": displayOrder, - "published": published, - "deleted": deleted, - "created_on_utc": createdOnUtc.toIso8601String(), - "updated_on_utc": updatedOnUtc.toIso8601String(), - "product_type": productTypeValues.reverse[productType], - "parent_grouped_product_id": parentGroupedProductId, - "role_ids": roleIds, - "discount_ids": discountIds, - "store_ids": storeIds, - "manufacturer_ids": manufacturerIds, - "reviews": List.from(reviews.map((x) => x.toJson())), - "images": List.from(images.map((x) => x.toJson())), - "attributes": attributes, - "specifications": specifications, - "associated_product_ids": associatedProductIds, - "tags": List.from(tags.map((x) => x)), - "vendor_id": vendorId, - "se_name": seName, - }; + "id": id, + "visible_individually": visibleIndividually, + "name": name, + "namen": namen, + "localized_names": localizedNames, + "short_description": shortDescription == null ? null : shortDescription, + "short_descriptionn": shortDescriptionn == null ? null : shortDescriptionn, + "full_description": fullDescription, + "full_descriptionn": fullDescriptionn, + "markas_new": markasNew, + "show_on_home_page": showOnHomePage, + "meta_keywords": metaKeywords == null ? null : metaKeywords, + "meta_description": metaDescription == null ? null : metaDescription, + "meta_title": metaTitle == null ? null : metaTitle, + "allow_customer_reviews": allowCustomerReviews, + "approved_rating_sum": approvedRatingSum, + "not_approved_rating_sum": notApprovedRatingSum, + "approved_total_reviews": approvedTotalReviews, + "not_approved_total_reviews": notApprovedTotalReviews, + "sku": sku, + "is_rx": isRx, + "prescription_required": prescriptionRequired, + "rx_message": rxMessage, + "rx_messagen": rxMessagen, + "manufacturer_part_number": manufacturerPartNumber, + "gtin": gtin, + "is_gift_card": isGiftCard, + "require_other_products": requireOtherProducts, + "automatically_add_required_products": automaticallyAddRequiredProducts, + "is_download": isDownload, + "unlimited_downloads": unlimitedDownloads, + "max_number_of_downloads": maxNumberOfDownloads, + "download_expiration_days": downloadExpirationDays, + "has_sample_download": hasSampleDownload, + "has_user_agreement": hasUserAgreement, + "is_recurring": isRecurring, + "recurring_cycle_length": recurringCycleLength, + "recurring_total_cycles": recurringTotalCycles, + "is_rental": isRental, + "rental_price_length": rentalPriceLength, + "is_ship_enabled": isShipEnabled, + "is_free_shipping": isFreeShipping, + "ship_separately": shipSeparately, + "additional_shipping_charge": additionalShippingCharge, + "is_tax_exempt": isTaxExempt, + "is_telecommunications_or_broadcasting_or_electronic_services": isTelecommunicationsOrBroadcastingOrElectronicServices, + "use_multiple_warehouses": useMultipleWarehouses, + "manage_inventory_method_id": manageInventoryMethodId, + "stock_quantity": stockQuantity, + "stock_availability": stockAvailability, + "stock_availabilityn": stockAvailabilityn, + "display_stock_availability": displayStockAvailability, + "display_stock_quantity": displayStockQuantity, + "min_stock_quantity": minStockQuantity, + "notify_admin_for_quantity_below": notifyAdminForQuantityBelow, + "allow_back_in_stock_subscriptions": allowBackInStockSubscriptions, + "order_minimum_quantity": orderMinimumQuantity, + "order_maximum_quantity": orderMaximumQuantity, + "allowed_quantities": allowedQuantities, + "allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations, + "disable_buy_button": disableBuyButton, + "disable_wishlist_button": disableWishlistButton, + "available_for_pre_order": availableForPreOrder, + "pre_order_availability_start_date_time_utc": preOrderAvailabilityStartDateTimeUtc, + "call_for_price": callForPrice, + "price": price, + "old_price": oldPrice, + "product_cost": productCost, + "special_price": specialPrice, + "special_price_start_date_time_utc": specialPriceStartDateTimeUtc, + "special_price_end_date_time_utc": specialPriceEndDateTimeUtc, + "customer_enters_price": customerEntersPrice, + "minimum_customer_entered_price": minimumCustomerEnteredPrice, + "maximum_customer_entered_price": maximumCustomerEnteredPrice, + "baseprice_enabled": basepriceEnabled, + "baseprice_amount": basepriceAmount, + "baseprice_base_amount": basepriceBaseAmount, + "has_tier_prices": hasTierPrices, + "has_discounts_applied": hasDiscountsApplied, + "discount_name": discountName, + "discount_namen": discountNamen, + "discount_description": discountDescription, + "discount_Descriptionn": discountDescriptionn, + "discount_percentage": discountPercentage, + "currency": currency, + "currencyn": currencyn, + "weight": weight, + "length": length, + "width": width, + "height": height, + "available_start_date_time_utc": availableStartDateTimeUtc, + "available_end_date_time_utc": availableEndDateTimeUtc, + "display_order": displayOrder, + "published": published, + "deleted": deleted, + "created_on_utc": createdOnUtc.toIso8601String(), + "updated_on_utc": updatedOnUtc.toIso8601String(), + "product_type": productTypeValues.reverse[productType], + "parent_grouped_product_id": parentGroupedProductId, + "role_ids": roleIds, + "discount_ids": discountIds, + "store_ids": storeIds, + "manufacturer_ids": manufacturerIds, + "reviews": List.from(reviews!.map((x) => x.toJson())), + "images": List.from(images!.map((x) => x.toJson())), + "attributes": attributes, + "specifications": specifications, + "associated_product_ids": associatedProductIds, + "tags": List.from(tags!.map((x) => x)), + "vendor_id": vendorId, + "se_name": seName, + }; } enum ProductType { SIMPLE_PRODUCT } -final productTypeValues = EnumValues({ - "SimpleProduct": ProductType.SIMPLE_PRODUCT -}); +final productTypeValues = EnumValues({"SimpleProduct": ProductType.SIMPLE_PRODUCT}); class Review { Review({ @@ -1156,7 +1155,7 @@ class Review { dynamic customerId; dynamic productId; dynamic storeId; - bool isApproved; + bool? isApproved; dynamic title; dynamic reviewText; dynamic replyText; @@ -1168,42 +1167,42 @@ class Review { dynamic product; factory Review.fromJson(Map json) => Review( - id: json["id"], - position: json["position"], - reviewId: json["review_id"], - customerId: json["customer_id"], - productId: json["product_id"], - storeId: json["store_id"], - isApproved: json["is_approved"], - title: titleValues.map[json["title"]], - reviewText: reviewTextValues.map[json["review_text"]], - replyText: json["reply_text"], - rating: json["rating"], - helpfulYesTotal: json["helpful_yes_total"], - helpfulNoTotal: json["helpful_no_total"], - createdOnUtc: DateTime.parse(json["created_on_utc"]), - customer: ReviewCustomer.fromJson(json["customer"]), - product: json["product"], - ); + id: json["id"], + position: json["position"], + reviewId: json["review_id"], + customerId: json["customer_id"], + productId: json["product_id"], + storeId: json["store_id"], + isApproved: json["is_approved"], + title: titleValues.map![json["title"]], + reviewText: reviewTextValues.map![json["review_text"]], + replyText: json["reply_text"], + rating: json["rating"], + helpfulYesTotal: json["helpful_yes_total"], + helpfulNoTotal: json["helpful_no_total"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + customer: ReviewCustomer.fromJson(json["customer"]), + product: json["product"], + ); Map toJson() => { - "id": id, - "position": position, - "review_id": reviewId, - "customer_id": customerId, - "product_id": productId, - "store_id": storeId, - "is_approved": isApproved, - "title": titleValues.reverse[title], - "review_text": reviewTextValues.reverse[reviewText], - "reply_text": replyText, - "rating": rating, - "helpful_yes_total": helpfulYesTotal, - "helpful_no_total": helpfulNoTotal, - "created_on_utc": createdOnUtc.toIso8601String(), - "customer": customer.toJson(), - "product": product, - }; + "id": id, + "position": position, + "review_id": reviewId, + "customer_id": customerId, + "product_id": productId, + "store_id": storeId, + "is_approved": isApproved, + "title": titleValues.reverse[title], + "review_text": reviewTextValues.reverse[reviewText], + "reply_text": replyText, + "rating": rating, + "helpful_yes_total": helpfulYesTotal, + "helpful_no_total": helpfulNoTotal, + "created_on_utc": createdOnUtc.toIso8601String(), + "customer": customer.toJson(), + "product": product, + }; } class ReviewCustomer { @@ -1252,9 +1251,9 @@ class ReviewCustomer { dynamic yahalaAccountno; dynamic billingAddress; dynamic shippingAddress; - List addresses; - String id; - String username; + List? addresses; + String? id; + String? username; dynamic email; dynamic firstName; dynamic lastName; @@ -1271,75 +1270,75 @@ class ReviewCustomer { dynamic lastLoginDateUtc; dynamic lastActivityDateUtc; dynamic registeredInStoreId; - List roleIds; + List? roleIds; factory ReviewCustomer.fromJson(Map json) => ReviewCustomer( - fileNumber: json["file_number"], - iqamaNumber: json["iqama_number"], - isOutSa: json["is_out_sa"], - patientType: json["patient_type"], - gender: json["gender"], - birthDate: DateTime.parse(json["birth_date"]), - phone: json["phone"], - countryCode: json["country_code"], - yahalaAccountno: json["yahala_accountno"], - billingAddress: json["billing_address"], - shippingAddress: json["shipping_address"], - addresses: List.from(json["addresses"].map((x) => x)), - id: json["id"], - username: json["username"], - email: purpleEmailValues.map[json["email"]], - firstName: json["first_name"], - lastName: json["last_name"], - languageId: json["language_id"], - adminComment: json["admin_comment"], - isTaxExempt: json["is_tax_exempt"], - hasShoppingCartItems: json["has_shopping_cart_items"], - active: json["active"], - deleted: json["deleted"], - isSystemAccount: json["is_system_account"], - systemName: json["system_name"], - lastIpAddress: json["last_ip_address"], - createdOnUtc: json["created_on_utc"], - lastLoginDateUtc: json["last_login_date_utc"], - lastActivityDateUtc: json["last_activity_date_utc"], - registeredInStoreId: json["registered_in_store_id"], - roleIds: List.from(json["role_ids"].map((x) => x)), - ); + fileNumber: json["file_number"], + iqamaNumber: json["iqama_number"], + isOutSa: json["is_out_sa"], + patientType: json["patient_type"], + gender: json["gender"], + birthDate: DateTime.parse(json["birth_date"]), + phone: json["phone"], + countryCode: json["country_code"], + yahalaAccountno: json["yahala_accountno"], + billingAddress: json["billing_address"], + shippingAddress: json["shipping_address"], + addresses: List.from(json["addresses"].map((x) => x)), + id: json["id"], + username: json["username"], + email: purpleEmailValues.map![json["email"]], + firstName: json["first_name"], + lastName: json["last_name"], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: json["last_ip_address"], + createdOnUtc: json["created_on_utc"], + lastLoginDateUtc: json["last_login_date_utc"], + lastActivityDateUtc: json["last_activity_date_utc"], + registeredInStoreId: json["registered_in_store_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + ); Map toJson() => { - "file_number": fileNumber, - "iqama_number": iqamaNumber, - "is_out_sa": isOutSa, - "patient_type": patientType, - "gender": gender, - "birth_date": birthDate.toIso8601String(), - "phone": phone, - "country_code": countryCode, - "yahala_accountno": yahalaAccountno, - "billing_address": billingAddress, - "shipping_address": shippingAddress, - "addresses": List.from(addresses.map((x) => x)), - "id": id, - "username": username, - "email": purpleEmailValues.reverse[email], - "first_name": firstName, - "last_name": lastName, - "language_id": languageId, - "admin_comment": adminComment, - "is_tax_exempt": isTaxExempt, - "has_shopping_cart_items": hasShoppingCartItems, - "active": active, - "deleted": deleted, - "is_system_account": isSystemAccount, - "system_name": systemName, - "last_ip_address": lastIpAddress, - "created_on_utc": createdOnUtc, - "last_login_date_utc": lastLoginDateUtc, - "last_activity_date_utc": lastActivityDateUtc, - "registered_in_store_id": registeredInStoreId, - "role_ids": List.from(roleIds.map((x) => x)), - }; + "file_number": fileNumber, + "iqama_number": iqamaNumber, + "is_out_sa": isOutSa, + "patient_type": patientType, + "gender": gender, + "birth_date": birthDate.toIso8601String(), + "phone": phone, + "country_code": countryCode, + "yahala_accountno": yahalaAccountno, + "billing_address": billingAddress, + "shipping_address": shippingAddress, + "addresses": List.from(addresses!.map((x) => x)), + "id": id, + "username": username, + "email": purpleEmailValues.reverse[email], + "first_name": firstName, + "last_name": lastName, + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddress, + "created_on_utc": createdOnUtc, + "last_login_date_utc": lastLoginDateUtc, + "last_activity_date_utc": lastActivityDateUtc, + "registered_in_store_id": registeredInStoreId, + "role_ids": List.from(roleIds!.map((x) => x)), + }; } enum PurpleEmail { STEVE_GATES_NOP_COMMERCE_COM, TAMER_FANASHEH_DRSULAIMANALHABIB_COM, ASIF_RAZA_DRSULAIMANALHABIB_COM, ABOSAMI_YMAIL_COM } @@ -1369,13 +1368,9 @@ final reviewTextValues = EnumValues({ enum Title { EMPTY, GOOD, TITLE } -final titleValues = EnumValues({ - "": Title.EMPTY, - "Good": Title.GOOD, - "ممتاز": Title.TITLE -}); +final titleValues = EnumValues({"": Title.EMPTY, "Good": Title.GOOD, "ممتاز": Title.TITLE}); -enum OrderStatus { ORDER_SUBMITTED, PENDING, ORDER_IN_PROGRESS,ORDER_SENT_FOR_DELIVERY, ORDER_COMPLETED, CANCELLED, PROCESSING, ORDER_REFUNDED, COMPLETE } +enum OrderStatus { ORDER_SUBMITTED, PENDING, ORDER_IN_PROGRESS, ORDER_SENT_FOR_DELIVERY, ORDER_COMPLETED, CANCELLED, PROCESSING, ORDER_REFUNDED, COMPLETE } final orderStatusValues = EnumValues({ "Cancelled": OrderStatus.CANCELLED, @@ -1405,81 +1400,54 @@ final orderStatusnValues = EnumValues({ enum PaymentMethodSystemName { PAYMENTS_PAY_FORT, PAYMENTS_CASH_ON_DELIVERY } -final paymentMethodSystemNameValues = EnumValues({ - "Payments.CashOnDelivery": PaymentMethodSystemName.PAYMENTS_CASH_ON_DELIVERY, - "Payments.PayFort": PaymentMethodSystemName.PAYMENTS_PAY_FORT -}); +final paymentMethodSystemNameValues = EnumValues({"Payments.CashOnDelivery": PaymentMethodSystemName.PAYMENTS_CASH_ON_DELIVERY, "Payments.PayFort": PaymentMethodSystemName.PAYMENTS_PAY_FORT}); enum PaymentName { CREDIT_DEBIT_CARD_PAYFORT, CASH_ON_DELIVERY_COD } -final paymentNameValues = EnumValues({ - "Cash On Delivery (COD)": PaymentName.CASH_ON_DELIVERY_COD, - "Credit / Debit Card Payfort": PaymentName.CREDIT_DEBIT_CARD_PAYFORT -}); +final paymentNameValues = EnumValues({"Cash On Delivery (COD)": PaymentName.CASH_ON_DELIVERY_COD, "Credit / Debit Card Payfort": PaymentName.CREDIT_DEBIT_CARD_PAYFORT}); enum PaymentStatus { PAID, PENDING } -final paymentStatusValues = EnumValues({ - "Paid": PaymentStatus.PAID, - "Pending": PaymentStatus.PENDING -}); +final paymentStatusValues = EnumValues({"Paid": PaymentStatus.PAID, "Pending": PaymentStatus.PENDING}); enum PaymentStatusn { EMPTY, PAYMENT_STATUSN } -final paymentStatusnValues = EnumValues({ - "تم الدفع": PaymentStatusn.EMPTY, - "قيد الإنتظار": PaymentStatusn.PAYMENT_STATUSN -}); +final paymentStatusnValues = EnumValues({"تم الدفع": PaymentStatusn.EMPTY, "قيد الإنتظار": PaymentStatusn.PAYMENT_STATUSN}); enum PreferDeliveryTime { THE_1000_AM_330_PM, THE_530_PM_730_PM } -final preferDeliveryTimeValues = EnumValues({ - "10:00 AM - 3:30 PM": PreferDeliveryTime.THE_1000_AM_330_PM, - "5:30 PM - 7:30 PM": PreferDeliveryTime.THE_530_PM_730_PM -}); +final preferDeliveryTimeValues = EnumValues({"10:00 AM - 3:30 PM": PreferDeliveryTime.THE_1000_AM_330_PM, "5:30 PM - 7:30 PM": PreferDeliveryTime.THE_530_PM_730_PM}); enum PreferDeliveryTimen { THE_1000330, THE_530730 } -final preferDeliveryTimenValues = EnumValues({ - "10:00 ص - 3:30 م": PreferDeliveryTimen.THE_1000330, - "5:30 م - 7:30 م": PreferDeliveryTimen.THE_530730 -}); +final preferDeliveryTimenValues = EnumValues({"10:00 ص - 3:30 م": PreferDeliveryTimen.THE_1000330, "5:30 م - 7:30 م": PreferDeliveryTimen.THE_530730}); enum ShippingMethod { EMPTY, FIXED_PRICE } -final shippingMethodValues = EnumValues({ - "سعر ثابت ": ShippingMethod.EMPTY, - "Fixed Price": ShippingMethod.FIXED_PRICE -}); +final shippingMethodValues = EnumValues({"سعر ثابت ": ShippingMethod.EMPTY, "Fixed Price": ShippingMethod.FIXED_PRICE}); enum ShippingRateComputationMethodSystemName { SHIPPING_FIXED_OR_BY_WEIGHT } -final shippingRateComputationMethodSystemNameValues = EnumValues({ - "Shipping.FixedOrByWeight": ShippingRateComputationMethodSystemName.SHIPPING_FIXED_OR_BY_WEIGHT -}); +final shippingRateComputationMethodSystemNameValues = EnumValues({"Shipping.FixedOrByWeight": ShippingRateComputationMethodSystemName.SHIPPING_FIXED_OR_BY_WEIGHT}); enum ShippingStatus { NOT_YET_SHIPPED } -final shippingStatusValues = EnumValues({ - "NotYetShipped": ShippingStatus.NOT_YET_SHIPPED -}); +final shippingStatusValues = EnumValues({"NotYetShipped": ShippingStatus.NOT_YET_SHIPPED}); enum ShippingStatusn { EMPTY } -final shippingStatusnValues = EnumValues({ - "لم يتم شحنها بعد": ShippingStatusn.EMPTY -}); +final shippingStatusnValues = EnumValues({"لم يتم شحنها بعد": ShippingStatusn.EMPTY}); class EnumValues { - Map map; - Map reverseMap; + Map? map; + Map? reverseMap; EnumValues(this.map); Map get reverse { if (reverseMap == null) { - reverseMap = map.map((k, v) => new MapEntry(v, k)); + reverseMap = map!.map((k, v) => new MapEntry(v, k)); } - return reverseMap; + return reverseMap!; } -} \ No newline at end of file +} diff --git a/lib/core/model/pharmacies/orders_model.dart b/lib/core/model/pharmacies/orders_model.dart index ad2c533a..74caaf13 100644 --- a/lib/core/model/pharmacies/orders_model.dart +++ b/lib/core/model/pharmacies/orders_model.dart @@ -1,13 +1,13 @@ class OrdersModel { - List orders; + List? orders; OrdersModel({this.orders}); OrdersModel.fromJson(Map json) { if (json['orders'] != null) { - orders = new List(); + orders = []; json['orders'].forEach((v) { - orders.add(new Orders.fromJson(v)); + orders!.add(new Orders.fromJson(v)); }); } } @@ -15,23 +15,23 @@ class OrdersModel { Map toJson() { final Map data = new Map(); if (this.orders != null) { - data['orders'] = this.orders.map((v) => v.toJson()).toList(); + data['orders'] = this.orders!.map((v) => v.toJson()).toList(); } return data; } } class Orders { - String id; - int productCount; + String? id; + int? productCount; dynamic orderTotal; - String createdOnUtc; - int orderStatusId; - String orderStatus; - String orderStatusn; - bool canCancel; - bool canRefund; - String orderGuid; + String? createdOnUtc; + int? orderStatusId; + String? orderStatus; + String? orderStatusn; + bool? canCancel; + bool? canRefund; + String? orderGuid; dynamic customerId; dynamic orderSubtotalExclTax; dynamic orderShippingExclTax; diff --git a/lib/core/model/pharmacies/payment-checkout-data.dart b/lib/core/model/pharmacies/payment-checkout-data.dart index f6f93fa2..60cd7b23 100644 --- a/lib/core/model/pharmacies/payment-checkout-data.dart +++ b/lib/core/model/pharmacies/payment-checkout-data.dart @@ -6,12 +6,12 @@ import 'package:flutter/material.dart'; import 'ShippingOption.dart'; class PaymentCheckoutData { - Addresses address; - PaymentOption paymentOption; - LacumAccountInformation lacumInformation; - bool cartDataVisible; - ShippingOption shippingOption; - num usedLakumPoints; + Addresses? address; + PaymentOption? paymentOption; + LacumAccountInformation? lacumInformation; + bool? cartDataVisible; + ShippingOption? shippingOption; + num? usedLakumPoints; PaymentCheckoutData({this.address, this.paymentOption, this.lacumInformation, this.cartDataVisible = false, this.shippingOption, this.usedLakumPoints = 0}); diff --git a/lib/core/model/pharmacies/pharmacies_list_model.dart b/lib/core/model/pharmacies/pharmacies_list_model.dart index 01a43a0a..1935be55 100644 --- a/lib/core/model/pharmacies/pharmacies_list_model.dart +++ b/lib/core/model/pharmacies/pharmacies_list_model.dart @@ -1,26 +1,26 @@ class PharmaciesListModel { - int itemID; - int patientTypeID; - int languageID; - String stamp; - String iPAdress; - double versionID; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - int patientOutSA; - int channel; - int doctorID; - int editedBy; - int projectID; - int clinicID; - double price; - String imageLocation; - String desLocation; - String itemDes; - String phoneNumber; - String longitude; - String latitude; + int? itemID; + int? patientTypeID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + int? patientOutSA; + int? channel; + int? doctorID; + int? editedBy; + int? projectID; + int? clinicID; + double? price; + String? imageLocation; + String? desLocation; + String? itemDes; + String? phoneNumber; + String? longitude; + String? latitude; PharmaciesListModel( {this.itemID, diff --git a/lib/core/model/pharmacies/pharmacies_model.dart b/lib/core/model/pharmacies/pharmacies_model.dart index d1b9b967..e6b41f14 100644 --- a/lib/core/model/pharmacies/pharmacies_model.dart +++ b/lib/core/model/pharmacies/pharmacies_model.dart @@ -1,26 +1,26 @@ class PharmaciesModel { - String pHRItemName; - int pageIndex; - int pageSize; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int doctorID; - int editedBy; - int projectID; - int clinicID; - String tokenID; - String stamp; - bool isLoginForDoctorApp; - String itemDes; - String productImage; - int itemID; + String? pHRItemName; + int? pageIndex; + int? pageSize; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? doctorID; + int? editedBy; + int? projectID; + int? clinicID; + String? tokenID; + String? stamp; + bool? isLoginForDoctorApp; + String? itemDes; + String? productImage; + int? itemID; PharmaciesModel( {this.pHRItemName, diff --git a/lib/core/model/pharmacies/recommendedProduct_model.dart b/lib/core/model/pharmacies/recommendedProduct_model.dart index 0d40fce7..a908ee79 100644 --- a/lib/core/model/pharmacies/recommendedProduct_model.dart +++ b/lib/core/model/pharmacies/recommendedProduct_model.dart @@ -1,83 +1,83 @@ class RecommendedProductModel { dynamic id; - bool visibleIndividually; + bool? visibleIndividually; dynamic name; dynamic namen; - List localizedNames; + List? localizedNames; dynamic shortDescription; dynamic shortDescriptionn; dynamic fullDescription; dynamic fullDescriptionn; - bool markasNew; - bool showOnHomePage; + bool? markasNew; + bool? showOnHomePage; // dynamic metaKeywords; // dynamic metaDescription; // dynamic metaTitle; - bool allowCustomerReviews; + bool? allowCustomerReviews; dynamic approvedRatingSum; dynamic notApprovedRatingSum; dynamic approvedTotalReviews; dynamic notApprovedTotalReviews; dynamic sku; - bool isRx; - bool prescriptionRequired; + bool? isRx; + bool? prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; // dynamic manufacturerPartNumber; // dynamic gtin; - bool isGiftCard; - bool requireOtherProducts; - bool automaticallyAddRequiredProducts; - bool isDownload; - bool unlimitedDownloads; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; dynamic maxNumberOfDownloads; // dynamic downloadExpirationDays; - bool hasSampleDownload; - bool hasUserAgreement; - bool isRecurring; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; dynamic recurringCycleLength; dynamic recurringTotalCycles; - bool isRental; + bool? isRental; dynamic rentalPriceLength; - bool isShipEnabled; - bool isFreeShipping; - bool shipSeparately; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; dynamic additionalShippingCharge; - bool isTaxExempt; - bool isTelecommunicationsOrBroadcastingOrElectronicServices; - bool useMultipleWarehouses; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; dynamic manageInventoryMethodId; dynamic stockQuantity; dynamic stockAvailability; dynamic stockAvailabilityn; - bool displayStockAvailability; - bool displayStockQuantity; + bool? displayStockAvailability; + bool? displayStockQuantity; dynamic minStockQuantity; dynamic notifyAdminForQuantityBelow; - bool allowBackInStockSubscriptions; + bool? allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; // Null allowedQuantities; - bool allowAddingOnlyExistingAttributeCombinations; - bool disableBuyButton; - bool disableWishlistButton; - bool availableForPreOrder; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; // dynamic preOrderAvailabilityStartDateTimeUtc; - bool callForPrice; + bool? callForPrice; dynamic price; dynamic oldPrice; dynamic productCost; // dynamic specialPrice; // dynamic specialPriceStartDateTimeUtc; // dynamic specialPriceEndDateTimeUtc; - bool customerEntersPrice; + bool? customerEntersPrice; dynamic minimumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice; - bool basepriceEnabled; + bool? basepriceEnabled; dynamic basepriceAmount; dynamic basepriceBaseAmount; - bool hasTierPrices; - bool hasDiscountsApplied; + bool? hasTierPrices; + bool? hasDiscountsApplied; // dynamic discountName; // dynamic discountNamen; // dynamic discountDescription; @@ -92,8 +92,8 @@ class RecommendedProductModel { // dynamic availableStartDateTimeUtc; // dynamic availableEndDateTimeUtc; dynamic displayOrder; - bool published; - bool deleted; + bool? published; + bool? deleted; dynamic createdOnUtc; dynamic updatedOnUtc; dynamic productType; @@ -101,16 +101,16 @@ class RecommendedProductModel { // List roleIds; // List discountIds; // List storeIds; - List manufacturerIds; + List? manufacturerIds; // List reviews; - List images; + List? images; // List attributes; - List specifications; + List? specifications; // List associatedProductIds; // List tags; dynamic vendorId; dynamic seName; - bool isinwishlist; + bool? isinwishlist; RecommendedProductModel( {this.id, @@ -232,9 +232,9 @@ class RecommendedProductModel { name = json['name']; namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } shortDescription = json['short_description']; @@ -361,9 +361,9 @@ class RecommendedProductModel { // }); // } if (json['images'] != null) { - images = new List(); + images = []; json['images'].forEach((v) { - images.add(new Images.fromJson(v)); + images!.add(new Images.fromJson(v)); }); } // if (json['attributes'] != null) { @@ -373,9 +373,9 @@ class RecommendedProductModel { // }); // } if (json['specifications'] != null) { - specifications = new List(); + specifications = []; json['specifications'].forEach((v) { - specifications.add(new Specifications.fromJson(v)); + specifications!.add(new Specifications.fromJson(v)); }); } // if (json['associated_product_ids'] != null) { @@ -403,7 +403,7 @@ class RecommendedProductModel { data['namen'] = this.namen; if (this.localizedNames != null) { data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + this.localizedNames!.map((v) => v.toJson()).toList(); } data['short_description'] = this.shortDescription; data['short_descriptionn'] = this.shortDescriptionn; @@ -519,14 +519,14 @@ class RecommendedProductModel { // data['reviews'] = this.reviews.map((v) => v.toJson()).toList(); // } if (this.images != null) { - data['images'] = this.images.map((v) => v.toJson()).toList(); + data['images'] = this.images!.map((v) => v.toJson()).toList(); } // if (this.attributes != null) { // data['attributes'] = this.attributes.map((v) => v.toJson()).toList(); // } if (this.specifications != null) { data['specifications'] = - this.specifications.map((v) => v.toJson()).toList(); + this.specifications!.map((v) => v.toJson()).toList(); } // if (this.associatedProductIds != null) { // data['associated_product_ids'] = @@ -544,7 +544,7 @@ class RecommendedProductModel { class LocalizedNames { dynamic languageId; - String localizedName; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -564,9 +564,9 @@ class LocalizedNames { class Images { dynamic id; dynamic position; - String src; - String thumb; - String attachment; + String? src; + String? thumb; + String? attachment; Images({this.id, this.position, this.src, this.thumb, this.attachment}); @@ -592,10 +592,10 @@ class Images { class Specifications { dynamic id; dynamic displayOrder; - String defaultValue; - String defaultValuen; - String name; - String nameN; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; Specifications( {this.id,