Merge branch 'pharmacy' into pharmacy-Fatima
# Conflicts: # lib/config/config.dart # lib/pages/landing/home_page.dartmerge-requests/206/head
@ -0,0 +1,9 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\fs24 \cf0 keyPassword=HmGsa123\
|
||||
storePassword=HmGsa123}
|
||||
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 475 B |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 475 B |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 447 B |
|
After Width: | Height: | Size: 383 B |
|
After Width: | Height: | Size: 782 B |
|
After Width: | Height: | Size: 503 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 737 B |
|
After Width: | Height: | Size: 387 B |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 373 B |
|
After Width: | Height: | Size: 648 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 606 B |
|
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1 @@
|
||||
da98d9f0c1f407e541c636e84847ac81
|
||||
@ -0,0 +1,4 @@
|
||||
storePassword=HmGsa123
|
||||
keyPassword=HmGsa123
|
||||
keyAlias=DQKey
|
||||
storeFile=DQKey.jks
|
||||
@ -0,0 +1,76 @@
|
||||
class GetAllProjectsResponseModel {
|
||||
String desciption;
|
||||
Null desciptionN;
|
||||
int iD;
|
||||
String legalName;
|
||||
String legalNameN;
|
||||
String name;
|
||||
Null nameN;
|
||||
String phoneNumber;
|
||||
String setupID;
|
||||
int distanceInKilometers;
|
||||
bool isActive;
|
||||
String latitude;
|
||||
String longitude;
|
||||
int mainProjectID;
|
||||
Null projectOutSA;
|
||||
bool usingInDoctorApp;
|
||||
|
||||
GetAllProjectsResponseModel(
|
||||
{this.desciption,
|
||||
this.desciptionN,
|
||||
this.iD,
|
||||
this.legalName,
|
||||
this.legalNameN,
|
||||
this.name,
|
||||
this.nameN,
|
||||
this.phoneNumber,
|
||||
this.setupID,
|
||||
this.distanceInKilometers,
|
||||
this.isActive,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.mainProjectID,
|
||||
this.projectOutSA,
|
||||
this.usingInDoctorApp});
|
||||
|
||||
GetAllProjectsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
desciption = json['Desciption'];
|
||||
desciptionN = json['DesciptionN'];
|
||||
iD = json['ID'];
|
||||
legalName = json['LegalName'];
|
||||
legalNameN = json['LegalNameN'];
|
||||
name = json['Name'];
|
||||
nameN = json['NameN'];
|
||||
phoneNumber = json['PhoneNumber'];
|
||||
setupID = json['SetupID'];
|
||||
distanceInKilometers = json['DistanceInKilometers'];
|
||||
isActive = json['IsActive'];
|
||||
latitude = json['Latitude'];
|
||||
longitude = json['Longitude'];
|
||||
mainProjectID = json['MainProjectID'];
|
||||
projectOutSA = json['ProjectOutSA'];
|
||||
usingInDoctorApp = json['UsingInDoctorApp'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Desciption'] = this.desciption;
|
||||
data['DesciptionN'] = this.desciptionN;
|
||||
data['ID'] = this.iD;
|
||||
data['LegalName'] = this.legalName;
|
||||
data['LegalNameN'] = this.legalNameN;
|
||||
data['Name'] = this.name;
|
||||
data['NameN'] = this.nameN;
|
||||
data['PhoneNumber'] = this.phoneNumber;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['DistanceInKilometers'] = this.distanceInKilometers;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['MainProjectID'] = this.mainProjectID;
|
||||
data['ProjectOutSA'] = this.projectOutSA;
|
||||
data['UsingInDoctorApp'] = this.usingInDoctorApp;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,128 @@
|
||||
class GetEReferralResponseModel {
|
||||
dynamic acceptedBrachCode;
|
||||
dynamic acceptedBranchName;
|
||||
dynamic acceptedBranchNameAr;
|
||||
Channel channel;
|
||||
dynamic identityCardAttachment;
|
||||
String identityNumber;
|
||||
dynamic insuranceCardAttachment;
|
||||
bool isInsuredPatient;
|
||||
String otherRelationship;
|
||||
String patientContactNo;
|
||||
int patientId;
|
||||
String patientName;
|
||||
int preferredBranchCode;
|
||||
String preferredBranchName;
|
||||
String referralDate;
|
||||
int referralNumber;
|
||||
Channel relationshipType;
|
||||
String requesterContactNo;
|
||||
String requesterName;
|
||||
String status;
|
||||
String statusAr;
|
||||
|
||||
GetEReferralResponseModel(
|
||||
{this.acceptedBrachCode,
|
||||
this.acceptedBranchName,
|
||||
this.acceptedBranchNameAr,
|
||||
this.channel,
|
||||
this.identityCardAttachment,
|
||||
this.identityNumber,
|
||||
this.insuranceCardAttachment,
|
||||
this.isInsuredPatient,
|
||||
this.otherRelationship,
|
||||
this.patientContactNo,
|
||||
this.patientId,
|
||||
this.patientName,
|
||||
this.preferredBranchCode,
|
||||
this.preferredBranchName,
|
||||
this.referralDate,
|
||||
this.referralNumber,
|
||||
this.relationshipType,
|
||||
this.requesterContactNo,
|
||||
this.requesterName,
|
||||
this.status,
|
||||
this.statusAr});
|
||||
|
||||
GetEReferralResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
acceptedBrachCode = json['AcceptedBrachCode'];
|
||||
acceptedBranchName = json['AcceptedBranchName'];
|
||||
acceptedBranchNameAr = json['AcceptedBranchNameAr'];
|
||||
channel =
|
||||
json['Channel'] != null ? new Channel.fromJson(json['Channel']) : null;
|
||||
identityCardAttachment = json['IdentityCardAttachment'];
|
||||
identityNumber = json['IdentityNumber'];
|
||||
insuranceCardAttachment = json['InsuranceCardAttachment'];
|
||||
isInsuredPatient = json['IsInsuredPatient'];
|
||||
otherRelationship = json['OtherRelationship'];
|
||||
patientContactNo = json['PatientContactNo'];
|
||||
patientId = json['PatientId'];
|
||||
patientName = json['PatientName'];
|
||||
preferredBranchCode = json['PreferredBranchCode'];
|
||||
preferredBranchName = json['PreferredBranchName'];
|
||||
referralDate = json['ReferralDate'];
|
||||
referralNumber = json['ReferralNumber'];
|
||||
relationshipType = json['RelationshipType'] != null
|
||||
? new Channel.fromJson(json['RelationshipType'])
|
||||
: null;
|
||||
requesterContactNo = json['RequesterContactNo'];
|
||||
requesterName = json['RequesterName'];
|
||||
status = json['Status'];
|
||||
statusAr = json['StatusAr'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AcceptedBrachCode'] = this.acceptedBrachCode;
|
||||
data['AcceptedBranchName'] = this.acceptedBranchName;
|
||||
data['AcceptedBranchNameAr'] = this.acceptedBranchNameAr;
|
||||
if (this.channel != null) {
|
||||
data['Channel'] = this.channel.toJson();
|
||||
}
|
||||
data['IdentityCardAttachment'] = this.identityCardAttachment;
|
||||
data['IdentityNumber'] = this.identityNumber;
|
||||
data['InsuranceCardAttachment'] = this.insuranceCardAttachment;
|
||||
data['IsInsuredPatient'] = this.isInsuredPatient;
|
||||
data['OtherRelationship'] = this.otherRelationship;
|
||||
data['PatientContactNo'] = this.patientContactNo;
|
||||
data['PatientId'] = this.patientId;
|
||||
data['PatientName'] = this.patientName;
|
||||
data['PreferredBranchCode'] = this.preferredBranchCode;
|
||||
data['PreferredBranchName'] = this.preferredBranchName;
|
||||
data['ReferralDate'] = this.referralDate;
|
||||
data['ReferralNumber'] = this.referralNumber;
|
||||
if (this.relationshipType != null) {
|
||||
data['RelationshipType'] = this.relationshipType.toJson();
|
||||
}
|
||||
data['RequesterContactNo'] = this.requesterContactNo;
|
||||
data['RequesterName'] = this.requesterName;
|
||||
data['Status'] = this.status;
|
||||
data['StatusAr'] = this.statusAr;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Channel {
|
||||
int iD;
|
||||
String text;
|
||||
String textAr;
|
||||
String textEn;
|
||||
|
||||
Channel({this.iD, this.text, this.textAr, this.textEn});
|
||||
|
||||
Channel.fromJson(Map<String, dynamic> json) {
|
||||
iD = json['ID'];
|
||||
text = json['Text'];
|
||||
textAr = json['Text_Ar'];
|
||||
textEn = json['Text_En'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ID'] = this.iD;
|
||||
data['Text'] = this.text;
|
||||
data['Text_Ar'] = this.textAr;
|
||||
data['Text_En'] = this.textEn;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
class GetNotificationsRequestModel {
|
||||
int notificationStatusID;
|
||||
int pagingSize;
|
||||
int currentPage;
|
||||
|
||||
GetNotificationsRequestModel(
|
||||
{this.notificationStatusID, this.pagingSize, this.currentPage});
|
||||
|
||||
GetNotificationsRequestModel.fromJson(Map<String, dynamic> json) {
|
||||
notificationStatusID = json['NotificationStatusID'];
|
||||
pagingSize = json['pagingSize'];
|
||||
currentPage = json['currentPage'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['NotificationStatusID'] = this.notificationStatusID;
|
||||
data['pagingSize'] = this.pagingSize;
|
||||
data['currentPage'] = this.currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
class GetNotificationsResponseModel {
|
||||
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;
|
||||
|
||||
GetNotificationsResponseModel(
|
||||
{this.id,
|
||||
this.recordId,
|
||||
this.patientID,
|
||||
this.projectOutSA,
|
||||
this.deviceType,
|
||||
this.deviceToken,
|
||||
this.message,
|
||||
this.messageType,
|
||||
this.messageTypeData,
|
||||
this.videoURL,
|
||||
this.isQueue,
|
||||
this.isQueueOn,
|
||||
this.createdOn,
|
||||
this.createdBy,
|
||||
this.notificationType,
|
||||
this.isSent,
|
||||
this.isSentOn,
|
||||
this.isRead,
|
||||
this.isReadOn,
|
||||
this.channelID,
|
||||
this.projectID});
|
||||
|
||||
GetNotificationsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['Id'];
|
||||
recordId = json['RecordId'];
|
||||
patientID = json['PatientID'];
|
||||
projectOutSA = json['ProjectOutSA'];
|
||||
deviceType = json['DeviceType'];
|
||||
deviceToken = json['DeviceToken'];
|
||||
message = json['Message'];
|
||||
messageType = json['MessageType'];
|
||||
messageTypeData = json['MessageTypeData'];
|
||||
videoURL = json['VideoURL'];
|
||||
isQueue = json['IsQueue'];
|
||||
isQueueOn = json['IsQueueOn'];
|
||||
createdOn = json['CreatedOn'];
|
||||
createdBy = json['CreatedBy'];
|
||||
notificationType = json['NotificationType'];
|
||||
isSent = json['IsSent'];
|
||||
isSentOn = json['IsSentOn'];
|
||||
isRead = json['IsRead'];
|
||||
isReadOn = json['IsReadOn'];
|
||||
channelID = json['ChannelID'];
|
||||
projectID = json['ProjectID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Id'] = this.id;
|
||||
data['RecordId'] = this.recordId;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['ProjectOutSA'] = this.projectOutSA;
|
||||
data['DeviceType'] = this.deviceType;
|
||||
data['DeviceToken'] = this.deviceToken;
|
||||
data['Message'] = this.message;
|
||||
data['MessageType'] = this.messageType;
|
||||
data['MessageTypeData'] = this.messageTypeData;
|
||||
data['VideoURL'] = this.videoURL;
|
||||
data['IsQueue'] = this.isQueue;
|
||||
data['IsQueueOn'] = this.isQueueOn;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['NotificationType'] = this.notificationType;
|
||||
data['IsSent'] = this.isSent;
|
||||
data['IsSentOn'] = this.isSentOn;
|
||||
data['IsRead'] = this.isRead;
|
||||
data['IsReadOn'] = this.isReadOn;
|
||||
data['ChannelID'] = this.channelID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
class MarkMessageAsReadRequestModel {
|
||||
int notificationPoolID;
|
||||
|
||||
MarkMessageAsReadRequestModel({this.notificationPoolID});
|
||||
|
||||
MarkMessageAsReadRequestModel.fromJson(Map<String, dynamic> json) {
|
||||
notificationPoolID = json['NotificationPoolID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['NotificationPoolID'] = this.notificationPoolID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
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;
|
||||
|
||||
BillingAddress(
|
||||
{this.id,
|
||||
this.firstName,
|
||||
this.lastName,
|
||||
this.email,
|
||||
this.company,
|
||||
this.countryId,
|
||||
this.country,
|
||||
this.stateProvinceId,
|
||||
this.city,
|
||||
this.address1,
|
||||
this.address2,
|
||||
this.zipPostalCode,
|
||||
this.phoneNumber,
|
||||
this.faxNumber,
|
||||
this.customerAttributes,
|
||||
this.createdOnUtc,
|
||||
this.province,
|
||||
this.latLong});
|
||||
|
||||
BillingAddress.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
firstName = json['first_name'];
|
||||
lastName = json['last_name'];
|
||||
email = json['email'];
|
||||
company = json['company'];
|
||||
countryId = json['country_id'];
|
||||
country = json['country'];
|
||||
stateProvinceId = json['state_province_id'];
|
||||
city = json['city'];
|
||||
address1 = json['address1'];
|
||||
address2 = json['address2'];
|
||||
zipPostalCode = json['zip_postal_code'];
|
||||
phoneNumber = json['phone_number'];
|
||||
faxNumber = json['fax_number'];
|
||||
customerAttributes = json['customer_attributes'];
|
||||
createdOnUtc = json['created_on_utc'];
|
||||
province = json['province'];
|
||||
latLong = json['lat_long'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['first_name'] = this.firstName;
|
||||
data['last_name'] = this.lastName;
|
||||
data['email'] = this.email;
|
||||
data['company'] = this.company;
|
||||
data['country_id'] = this.countryId;
|
||||
data['country'] = this.country;
|
||||
data['state_province_id'] = this.stateProvinceId;
|
||||
data['city'] = this.city;
|
||||
data['address1'] = this.address1;
|
||||
data['address2'] = this.address2;
|
||||
data['zip_postal_code'] = this.zipPostalCode;
|
||||
data['phone_number'] = this.phoneNumber;
|
||||
data['fax_number'] = this.faxNumber;
|
||||
data['customer_attributes'] = this.customerAttributes;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['province'] = this.province;
|
||||
data['lat_long'] = this.latLong;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,179 @@
|
||||
import 'PointsAmountPerYear.dart';
|
||||
import 'PointsDetails.dart';
|
||||
|
||||
class LakumInquiryInformationObjVersion {
|
||||
int accountNumber;
|
||||
String accountStatus;
|
||||
String barCode;
|
||||
int consumedPoints;
|
||||
String consumedPointsAmount;
|
||||
List<PointsAmountPerYear> consumedPointsAmountPerYear;
|
||||
List<PointsDetails> consumedPointsDetails;
|
||||
String createdDate;
|
||||
int expiredPoints;
|
||||
String expiryDate;
|
||||
int gainedPoints;
|
||||
List<PointsAmountPerYear> gainedPointsAmountPerYear;
|
||||
List<PointsDetails> gainedPointsDetails;
|
||||
String lakumMessageStatus;
|
||||
String memberName;
|
||||
String memberUniversalId;
|
||||
String mobileNumber;
|
||||
int pointsBalance;
|
||||
int pointsBalanceAmount;
|
||||
int pointsWillBeExpired;
|
||||
String prefLang;
|
||||
int statusCode;
|
||||
int transferPoints;
|
||||
List<PointsAmountPerYear> transferPointsAmountPerYear;
|
||||
List<PointsDetails> transferPointsDetails;
|
||||
int waitingPoints;
|
||||
int loyalityAmount;
|
||||
int loyalityPoints;
|
||||
int purchaseRate;
|
||||
|
||||
LakumInquiryInformationObjVersion(
|
||||
{this.accountNumber,
|
||||
this.accountStatus,
|
||||
this.barCode,
|
||||
this.consumedPoints,
|
||||
this.consumedPointsAmount,
|
||||
this.consumedPointsAmountPerYear,
|
||||
this.consumedPointsDetails,
|
||||
this.createdDate,
|
||||
this.expiredPoints,
|
||||
this.expiryDate,
|
||||
this.gainedPoints,
|
||||
this.gainedPointsAmountPerYear,
|
||||
this.gainedPointsDetails,
|
||||
this.lakumMessageStatus,
|
||||
this.memberName,
|
||||
this.memberUniversalId,
|
||||
this.mobileNumber,
|
||||
this.pointsBalance,
|
||||
this.pointsBalanceAmount,
|
||||
this.pointsWillBeExpired,
|
||||
this.prefLang,
|
||||
this.statusCode,
|
||||
this.transferPoints,
|
||||
this.transferPointsAmountPerYear,
|
||||
this.transferPointsDetails,
|
||||
this.waitingPoints,
|
||||
this.loyalityAmount,
|
||||
this.loyalityPoints,
|
||||
this.purchaseRate});
|
||||
|
||||
LakumInquiryInformationObjVersion.fromJson(Map<String, dynamic> json) {
|
||||
accountNumber = json['AccountNumber'];
|
||||
accountStatus = json['AccountStatus'];
|
||||
barCode = json['BarCode'];
|
||||
consumedPoints = json['ConsumedPoints'];
|
||||
consumedPointsAmount = json['ConsumedPointsAmount'];
|
||||
if (json['ConsumedPointsAmountPerYear'] != null) {
|
||||
consumedPointsAmountPerYear = new List<PointsAmountPerYear>();
|
||||
json['ConsumedPointsAmountPerYear'].forEach((v) {
|
||||
consumedPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['ConsumedPointsDetails'] != null) {
|
||||
consumedPointsDetails = new List<PointsDetails>();
|
||||
json['ConsumedPointsDetails'].forEach((v) {
|
||||
consumedPointsDetails.add(PointsDetails.fromJson(v));
|
||||
});
|
||||
}
|
||||
createdDate = json['CreatedDate'];
|
||||
expiredPoints = json['ExpiredPoints'];
|
||||
expiryDate = json['ExpiryDate'];
|
||||
gainedPoints = json['GainedPoints'];
|
||||
if (json['GainedPointsAmountPerYear'] != null) {
|
||||
gainedPointsAmountPerYear = new List<PointsAmountPerYear>();
|
||||
json['GainedPointsAmountPerYear'].forEach((v) {
|
||||
gainedPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['GainedPointsDetails'] != null) {
|
||||
gainedPointsDetails = new List<PointsDetails>();
|
||||
json['GainedPointsDetails'].forEach((v) {
|
||||
gainedPointsDetails.add(PointsDetails.fromJson(v));
|
||||
});
|
||||
}
|
||||
lakumMessageStatus = json['LakumMessageStatus'];
|
||||
memberName = json['MemberName'];
|
||||
memberUniversalId = json['MemberUniversalId'];
|
||||
mobileNumber = json['MobileNumber'];
|
||||
pointsBalance = json['PointsBalance'];
|
||||
pointsBalanceAmount = json['PointsBalanceAmount'];
|
||||
pointsWillBeExpired = json['PointsWillBeExpired'];
|
||||
prefLang = json['PrefLang'];
|
||||
statusCode = json['StatusCode'];
|
||||
transferPoints = json['TransferPoints'];
|
||||
if (json['TransferPointsAmountPerYear'] != null) {
|
||||
transferPointsAmountPerYear = new List<PointsAmountPerYear>();
|
||||
json['TransferPointsAmountPerYear'].forEach((v) {
|
||||
transferPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['TransferPointsDetails'] != null) {
|
||||
transferPointsDetails = new List<PointsDetails>();
|
||||
json['TransferPointsDetails'].forEach((v) {
|
||||
transferPointsDetails.add(PointsDetails.fromJson(v));
|
||||
});
|
||||
}
|
||||
waitingPoints = json['WaitingPoints'];
|
||||
loyalityAmount = json['loyalityAmount'];
|
||||
loyalityPoints = json['loyalityPoints'];
|
||||
purchaseRate = json['purchaseRate'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AccountNumber'] = this.accountNumber;
|
||||
data['AccountStatus'] = this.accountStatus;
|
||||
data['BarCode'] = this.barCode;
|
||||
data['ConsumedPoints'] = this.consumedPoints;
|
||||
data['ConsumedPointsAmount'] = this.consumedPointsAmount;
|
||||
if (this.consumedPointsAmountPerYear != null) {
|
||||
data['ConsumedPointsAmountPerYear'] =
|
||||
this.consumedPointsAmountPerYear.map((v) => v).toList();
|
||||
}
|
||||
if (this.consumedPointsDetails != null) {
|
||||
data['ConsumedPointsDetails'] =
|
||||
this.consumedPointsDetails.map((v) => v).toList();
|
||||
}
|
||||
data['CreatedDate'] = this.createdDate;
|
||||
data['ExpiredPoints'] = this.expiredPoints;
|
||||
data['ExpiryDate'] = this.expiryDate;
|
||||
data['GainedPoints'] = this.gainedPoints;
|
||||
if (this.gainedPointsAmountPerYear != null) {
|
||||
data['GainedPointsAmountPerYear'] =
|
||||
this.gainedPointsAmountPerYear.map((v) => v).toList();
|
||||
}
|
||||
if (this.gainedPointsDetails != null) {
|
||||
data['GainedPointsDetails'] =
|
||||
this.gainedPointsDetails.map((v) => v).toList();
|
||||
}
|
||||
data['LakumMessageStatus'] = this.lakumMessageStatus;
|
||||
data['MemberName'] = this.memberName;
|
||||
data['MemberUniversalId'] = this.memberUniversalId;
|
||||
data['MobileNumber'] = this.mobileNumber;
|
||||
data['PointsBalance'] = this.pointsBalance;
|
||||
data['PointsBalanceAmount'] = this.pointsBalanceAmount;
|
||||
data['PointsWillBeExpired'] = this.pointsWillBeExpired;
|
||||
data['PrefLang'] = this.prefLang;
|
||||
data['StatusCode'] = this.statusCode;
|
||||
data['TransferPoints'] = this.transferPoints;
|
||||
if (this.transferPointsAmountPerYear != null) {
|
||||
data['TransferPointsAmountPerYear'] =
|
||||
this.transferPointsAmountPerYear.map((v) => v).toList();
|
||||
}
|
||||
if (this.transferPointsDetails != null) {
|
||||
data['TransferPointsDetails'] =
|
||||
this.transferPointsDetails.map((v) => v).toList();
|
||||
}
|
||||
data['WaitingPoints'] = this.waitingPoints;
|
||||
data['loyalityAmount'] = this.loyalityAmount;
|
||||
data['loyalityPoints'] = this.loyalityPoints;
|
||||
data['purchaseRate'] = this.purchaseRate;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
class ListUserAgreement {
|
||||
String userAgreementLAKUM;
|
||||
String userAgreementLAKUMn;
|
||||
String userAgreementTxt;
|
||||
String userAgreementTxtn;
|
||||
|
||||
ListUserAgreement(
|
||||
{this.userAgreementLAKUM,
|
||||
this.userAgreementLAKUMn,
|
||||
this.userAgreementTxt,
|
||||
this.userAgreementTxtn});
|
||||
|
||||
ListUserAgreement.fromJson(Map<String, dynamic> json) {
|
||||
userAgreementLAKUM = json['UserAgreementLAKUM'];
|
||||
userAgreementLAKUMn = json['UserAgreementLAKUMn'];
|
||||
userAgreementTxt = json['UserAgreementTxt'];
|
||||
userAgreementTxtn = json['UserAgreementTxtn'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['UserAgreementLAKUM'] = this.userAgreementLAKUM;
|
||||
data['UserAgreementLAKUMn'] = this.userAgreementLAKUMn;
|
||||
data['UserAgreementTxt'] = this.userAgreementTxt;
|
||||
data['UserAgreementTxtn'] = this.userAgreementTxtn;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -1,149 +1,538 @@
|
||||
import 'package:diplomaticquarterapp/core/model/pharmacies/Specifications.dart';
|
||||
|
||||
import 'PharmacyImageObject.dart';
|
||||
import 'Reviews.dart';
|
||||
|
||||
class PharmacyProduct {
|
||||
String id;
|
||||
bool visibleIndividually;
|
||||
String name;
|
||||
String namen;
|
||||
String shortDescription;
|
||||
String shortDescriptionn;
|
||||
String fullDescription;
|
||||
String fullDescriptionn;
|
||||
bool markasNew;
|
||||
bool showOnHomePage;
|
||||
String metaKeywords;
|
||||
String metaDescription;
|
||||
String metaTitle;
|
||||
bool allowCustomerReviews;
|
||||
int approvedRatingSum;
|
||||
int notApprovedRatingSum;
|
||||
int approvedTotalReviews;
|
||||
int notApprovedTotalReviews;
|
||||
String sku;
|
||||
bool isRx;
|
||||
bool prescriptionRequired;
|
||||
String rxMessage;
|
||||
String 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<int> roleIds;
|
||||
List<int> discountIds;
|
||||
List<int> storeIds;
|
||||
List<int> manufacturerIds;
|
||||
List<Reviews> reviews;
|
||||
List<PharmacyImageObject> images;
|
||||
List<String> attributes;
|
||||
List<Specifications> specifications;
|
||||
List<String> associatedProductIds;
|
||||
List<String> tags;
|
||||
int vendorId;
|
||||
String seName;
|
||||
|
||||
|
||||
PharmacyProduct(
|
||||
{this.id,
|
||||
this.visibleIndividually,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.shortDescription,
|
||||
this.shortDescriptionn,
|
||||
this.fullDescription,
|
||||
this.fullDescriptionn,
|
||||
this.markasNew,
|
||||
this.showOnHomePage,
|
||||
this.metaKeywords,
|
||||
this.metaDescription,
|
||||
this.metaTitle,
|
||||
this.allowCustomerReviews,
|
||||
this.approvedRatingSum,
|
||||
this.notApprovedRatingSum,
|
||||
this.approvedTotalReviews,
|
||||
this.notApprovedTotalReviews,
|
||||
this.sku,
|
||||
this.isRx,
|
||||
this.prescriptionRequired,
|
||||
this.rxMessage,
|
||||
this.rxMessagen,
|
||||
this.manufacturerPartNumber,
|
||||
this.gtin,
|
||||
this.isGiftCard,
|
||||
this.requireOtherProducts,
|
||||
this.automaticallyAddRequiredProducts,
|
||||
this.isDownload,
|
||||
this.unlimitedDownloads,
|
||||
this.maxNumberOfDownloads,
|
||||
this.downloadExpirationDays,
|
||||
this.hasSampleDownload,
|
||||
this.hasUserAgreement,
|
||||
this.isRecurring,
|
||||
this.recurringCycleLength,
|
||||
this.recurringTotalCycles,
|
||||
this.isRental,
|
||||
this.rentalPriceLength,
|
||||
this.isShipEnabled,
|
||||
this.isFreeShipping,
|
||||
this.shipSeparately,
|
||||
this.additionalShippingCharge,
|
||||
this.isTaxExempt,
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
|
||||
this.useMultipleWarehouses,
|
||||
this.manageInventoryMethodId,
|
||||
this.stockQuantity,
|
||||
this.stockAvailability,
|
||||
this.stockAvailabilityn,
|
||||
this.displayStockAvailability,
|
||||
this.displayStockQuantity,
|
||||
this.minStockQuantity,
|
||||
this.notifyAdminForQuantityBelow,
|
||||
this.allowBackInStockSubscriptions,
|
||||
this.orderMinimumQuantity,
|
||||
this.orderMaximumQuantity,
|
||||
this.allowedQuantities,
|
||||
this.allowAddingOnlyExistingAttributeCombinations,
|
||||
this.disableBuyButton,
|
||||
this.disableWishlistButton,
|
||||
this.availableForPreOrder,
|
||||
this.preOrderAvailabilityStartDateTimeUtc,
|
||||
this.callForPrice,
|
||||
this.price,
|
||||
this.oldPrice,
|
||||
this.productCost,
|
||||
this.specialPrice,
|
||||
this.specialPriceStartDateTimeUtc,
|
||||
this.specialPriceEndDateTimeUtc,
|
||||
this.customerEntersPrice,
|
||||
this.minimumCustomerEnteredPrice,
|
||||
this.maximumCustomerEnteredPrice,
|
||||
this.basepriceEnabled,
|
||||
this.basepriceAmount,
|
||||
this.basepriceBaseAmount,
|
||||
this.hasTierPrices,
|
||||
this.hasDiscountsApplied,
|
||||
this.discountName,
|
||||
this.discountNamen,
|
||||
this.discountDescription,
|
||||
this.discountDescriptionn,
|
||||
this.discountPercentage,
|
||||
this.currency,
|
||||
this.currencyn,
|
||||
this.weight,
|
||||
this.length,
|
||||
this.width,
|
||||
this.height,
|
||||
this.availableStartDateTimeUtc,
|
||||
this.availableEndDateTimeUtc,
|
||||
this.displayOrder,
|
||||
this.published,
|
||||
this.deleted,
|
||||
this.createdOnUtc,
|
||||
this.updatedOnUtc,
|
||||
this.productType,
|
||||
this.parentGroupedProductId,
|
||||
this.roleIds,
|
||||
this.discountIds,
|
||||
this.storeIds,
|
||||
this.manufacturerIds,
|
||||
this.reviews,
|
||||
this.images});
|
||||
this.images,
|
||||
this.attributes,
|
||||
this.specifications,
|
||||
this.associatedProductIds,
|
||||
this.tags,
|
||||
this.vendorId,
|
||||
this.seName});
|
||||
|
||||
PharmacyProduct.fromJson(Map<String, dynamic> json) {
|
||||
try {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
namen = json['namen'];
|
||||
shortDescription = json['short_description'];
|
||||
fullDescription = json['full_description'];
|
||||
fullDescriptionn = json['full_descriptionn'];
|
||||
approvedRatingSum = json['approved_rating_sum'];
|
||||
approvedTotalReviews = json['approved_total_reviews'];
|
||||
sku = json['sku'];
|
||||
isRx = json['is_rx'];
|
||||
rxMessage = json['rx_message'];
|
||||
rxMessagen = json['rx_messagen'];
|
||||
stockQuantity = json['stock_quantity'];
|
||||
stockAvailability = json['stock_availability'];
|
||||
stockAvailabilityn = json['stock_availabilityn'];
|
||||
allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions'];
|
||||
orderMinimumQuantity = json['order_minimum_quantity'];
|
||||
orderMaximumQuantity = json['order_maximum_quantity'];
|
||||
price = json['price'];
|
||||
oldPrice = json['old_price'];
|
||||
discountName = json['discount_name'];
|
||||
discountNamen = json['discount_namen'];
|
||||
discountPercentage = json['discount_percentage'];
|
||||
displayOrder = json['display_order'];
|
||||
if (json['discount_ids'] != null) {
|
||||
discountIds = new List<int>();
|
||||
json['discount_ids'].forEach((v) {
|
||||
discountIds.add(v);
|
||||
});
|
||||
}
|
||||
if (json['reviews'] != null) {
|
||||
reviews = new List<Reviews>();
|
||||
json['reviews'].forEach((v) {
|
||||
reviews.add(new Reviews.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['images'] != null) {
|
||||
images = new List<PharmacyImageObject>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new PharmacyImageObject.fromJson(v));
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
id = json['id'];
|
||||
visibleIndividually = json['visible_individually'];
|
||||
name = json['name'];
|
||||
namen = json['namen'];
|
||||
shortDescription = json['short_description'];
|
||||
shortDescriptionn = 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'];
|
||||
metaDescription = json['meta_description'];
|
||||
metaTitle = 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'];
|
||||
oldPrice = json['old_price'];
|
||||
productCost = json['product_cost'];
|
||||
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'];
|
||||
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 = json['created_on_utc'];
|
||||
updatedOnUtc = json['updated_on_utc'];
|
||||
productType = json['product_type'];
|
||||
parentGroupedProductId = json['parent_grouped_product_id'];
|
||||
if (json['role_ids'] != null) {
|
||||
roleIds = new List<int>();
|
||||
json['role_ids'].forEach((v) {
|
||||
roleIds.add(v);
|
||||
});
|
||||
}
|
||||
if (json['discount_ids'] != null) {
|
||||
discountIds = new List<int>();
|
||||
json['discount_ids'].forEach((v) {
|
||||
discountIds.add(v);
|
||||
});
|
||||
}
|
||||
if (json['store_ids'] != null) {
|
||||
storeIds = new List<int>();
|
||||
json['store_ids'].forEach((v) {
|
||||
storeIds.add(v);
|
||||
});
|
||||
}
|
||||
if (json['manufacturer_ids'] != null) {
|
||||
manufacturerIds = new List<int>();
|
||||
json['manufacturer_ids'].forEach((v) {
|
||||
manufacturerIds.add(v);
|
||||
});
|
||||
}
|
||||
if (json['reviews'] != null) {
|
||||
reviews = new List<Reviews>();
|
||||
json['reviews'].forEach((v) {
|
||||
reviews.add(new Reviews.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['images'] != null) {
|
||||
images = new List<PharmacyImageObject>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new PharmacyImageObject.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['attributes'] != null) {
|
||||
attributes = new List<String>();
|
||||
json['attributes'].forEach((v) {
|
||||
attributes.add(v);
|
||||
});
|
||||
}
|
||||
if (json['specifications'] != null) {
|
||||
specifications = new List<Specifications>();
|
||||
json['specifications'].forEach((v) {
|
||||
specifications.add(new Specifications.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['associated_product_ids'] != null) {
|
||||
associatedProductIds = new List<String>();
|
||||
json['associated_product_ids'].forEach((v) {
|
||||
associatedProductIds.add(v);
|
||||
});
|
||||
}
|
||||
if (json['tags'] != null) {
|
||||
tags = new List<String>();
|
||||
json['tags'].forEach((v) {
|
||||
tags.add(v);
|
||||
});
|
||||
}
|
||||
vendorId = json['vendor_id'];
|
||||
seName = json['se_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['visible_individually'] = this.visibleIndividually;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
data['short_description'] = this.shortDescription;
|
||||
data['short_descriptionn'] = this.shortDescriptionn;
|
||||
data['full_description'] = this.fullDescription;
|
||||
data['full_descriptionn'] = this.fullDescriptionn;
|
||||
data['markas_new'] = this.markasNew;
|
||||
data['show_on_home_page'] = this.showOnHomePage;
|
||||
data['meta_keywords'] = this.metaKeywords;
|
||||
data['meta_description'] = this.metaDescription;
|
||||
data['meta_title'] = this.metaTitle;
|
||||
data['allow_customer_reviews'] = this.allowCustomerReviews;
|
||||
data['approved_rating_sum'] = this.approvedRatingSum;
|
||||
data['not_approved_rating_sum'] = this.notApprovedRatingSum;
|
||||
data['approved_total_reviews'] = this.approvedTotalReviews;
|
||||
data['not_approved_total_reviews'] = this.notApprovedTotalReviews;
|
||||
data['sku'] = this.sku;
|
||||
data['is_rx'] = this.isRx;
|
||||
data['prescription_required'] = this.prescriptionRequired;
|
||||
data['rx_message'] = this.rxMessage;
|
||||
data['rx_messagen'] = this.rxMessagen;
|
||||
data['manufacturer_part_number'] = this.manufacturerPartNumber;
|
||||
data['gtin'] = this.gtin;
|
||||
data['is_gift_card'] = this.isGiftCard;
|
||||
data['require_other_products'] = this.requireOtherProducts;
|
||||
data['automatically_add_required_products'] =
|
||||
this.automaticallyAddRequiredProducts;
|
||||
data['is_download'] = this.isDownload;
|
||||
data['unlimited_downloads'] = this.unlimitedDownloads;
|
||||
data['max_number_of_downloads'] = this.maxNumberOfDownloads;
|
||||
data['download_expiration_days'] = this.downloadExpirationDays;
|
||||
data['has_sample_download'] = this.hasSampleDownload;
|
||||
data['has_user_agreement'] = this.hasUserAgreement;
|
||||
data['is_recurring'] = this.isRecurring;
|
||||
data['recurring_cycle_length'] = this.recurringCycleLength;
|
||||
data['recurring_total_cycles'] = this.recurringTotalCycles;
|
||||
data['is_rental'] = this.isRental;
|
||||
data['rental_price_length'] = this.rentalPriceLength;
|
||||
data['is_ship_enabled'] = this.isShipEnabled;
|
||||
data['is_free_shipping'] = this.isFreeShipping;
|
||||
data['ship_separately'] = this.shipSeparately;
|
||||
data['additional_shipping_charge'] = this.additionalShippingCharge;
|
||||
data['is_tax_exempt'] = this.isTaxExempt;
|
||||
data['is_telecommunications_or_broadcasting_or_electronic_services'] =
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
data['use_multiple_warehouses'] = this.useMultipleWarehouses;
|
||||
data['manage_inventory_method_id'] = this.manageInventoryMethodId;
|
||||
data['stock_quantity'] = this.stockQuantity;
|
||||
data['stock_availability'] = this.stockAvailability;
|
||||
data['stock_availabilityn'] = this.stockAvailabilityn;
|
||||
data['display_stock_availability'] = this.displayStockAvailability;
|
||||
data['display_stock_quantity'] = this.displayStockQuantity;
|
||||
data['min_stock_quantity'] = this.minStockQuantity;
|
||||
data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow;
|
||||
data['allow_back_in_stock_subscriptions'] =
|
||||
this.allowBackInStockSubscriptions;
|
||||
data['order_minimum_quantity'] = this.orderMinimumQuantity;
|
||||
data['order_maximum_quantity'] = this.orderMaximumQuantity;
|
||||
data['allowed_quantities'] = this.allowedQuantities;
|
||||
data['allow_adding_only_existing_attribute_combinations'] =
|
||||
this.allowAddingOnlyExistingAttributeCombinations;
|
||||
data['disable_buy_button'] = this.disableBuyButton;
|
||||
data['disable_wishlist_button'] = this.disableWishlistButton;
|
||||
data['available_for_pre_order'] = this.availableForPreOrder;
|
||||
data['pre_order_availability_start_date_time_utc'] =
|
||||
this.preOrderAvailabilityStartDateTimeUtc;
|
||||
data['call_for_price'] = this.callForPrice;
|
||||
data['price'] = this.price;
|
||||
data['old_price'] = this.oldPrice;
|
||||
data['product_cost'] = this.productCost;
|
||||
data['special_price'] = this.specialPrice;
|
||||
data['special_price_start_date_time_utc'] =
|
||||
this.specialPriceStartDateTimeUtc;
|
||||
data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
|
||||
data['customer_enters_price'] = this.customerEntersPrice;
|
||||
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
|
||||
data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice;
|
||||
data['baseprice_enabled'] = this.basepriceEnabled;
|
||||
data['baseprice_amount'] = this.basepriceAmount;
|
||||
data['baseprice_base_amount'] = this.basepriceBaseAmount;
|
||||
data['has_tier_prices'] = this.hasTierPrices;
|
||||
data['has_discounts_applied'] = this.hasDiscountsApplied;
|
||||
data['discount_name'] = this.discountName;
|
||||
data['discount_namen'] = this.discountNamen;
|
||||
data['discount_description'] = this.discountDescription;
|
||||
data['discount_Descriptionn'] = this.discountDescriptionn;
|
||||
data['discount_percentage'] = this.discountPercentage;
|
||||
data['currency'] = this.currency;
|
||||
data['currencyn'] = this.currencyn;
|
||||
data['weight'] = this.weight;
|
||||
data['length'] = this.length;
|
||||
data['width'] = this.width;
|
||||
data['height'] = this.height;
|
||||
data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
|
||||
data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
|
||||
data['display_order'] = this.displayOrder;
|
||||
if (this.discountIds != String) {
|
||||
data['published'] = this.published;
|
||||
data['deleted'] = this.deleted;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['updated_on_utc'] = this.updatedOnUtc;
|
||||
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();
|
||||
}
|
||||
if (this.discountIds != null) {
|
||||
data['discount_ids'] = this.discountIds.map((v) => v).toList();
|
||||
}
|
||||
if (this.reviews != String) {
|
||||
if (this.storeIds != null) {
|
||||
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();
|
||||
}
|
||||
if (this.images != String) {
|
||||
if (this.images != null) {
|
||||
data['images'] = this.images.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.attributes != null) {
|
||||
data['attributes'] = this.attributes.map((v) => v).toList();
|
||||
}
|
||||
if (this.specifications != null) {
|
||||
data['specifications'] =
|
||||
this.specifications.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.associatedProductIds != null) {
|
||||
data['associated_product_ids'] =
|
||||
this.associatedProductIds.map((v) => v).toList();
|
||||
}
|
||||
if (this.tags != null) {
|
||||
data['tags'] = this.tags.map((v) => v).toList();
|
||||
}
|
||||
data['vendor_id'] = this.vendorId;
|
||||
data['se_name'] = this.seName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
import 'PointsAmountPerday.dart';
|
||||
|
||||
class PointsAmountPerMonth {
|
||||
double amountPerMonth;
|
||||
String month;
|
||||
int monthNumber;
|
||||
List<PointsAmountPerday> pointsAmountPerday;
|
||||
double pointsPerMonth;
|
||||
|
||||
PointsAmountPerMonth(
|
||||
{this.amountPerMonth,
|
||||
this.month,
|
||||
this.monthNumber,
|
||||
this.pointsAmountPerday,
|
||||
this.pointsPerMonth});
|
||||
|
||||
PointsAmountPerMonth.fromJson(Map<String, dynamic> json) {
|
||||
amountPerMonth = json['AmountPerMonth'];
|
||||
month = json['Month'];
|
||||
monthNumber = json['MonthNumber'];
|
||||
if (json['PointsAmountPerday'] != null) {
|
||||
pointsAmountPerday = new List<PointsAmountPerday>();
|
||||
json['PointsAmountPerday'].forEach((v) {
|
||||
pointsAmountPerday.add(new PointsAmountPerday.fromJson(v));
|
||||
});
|
||||
}
|
||||
pointsPerMonth = json['PointsPerMonth'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AmountPerMonth'] = this.amountPerMonth;
|
||||
data['Month'] = this.month;
|
||||
data['MonthNumber'] = this.monthNumber;
|
||||
if (this.pointsAmountPerday != null) {
|
||||
data['PointsAmountPerday'] =
|
||||
this.pointsAmountPerday.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['PointsPerMonth'] = this.pointsPerMonth;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
import 'PointsAmountPerMonth.dart';
|
||||
|
||||
class PointsAmountPerYear {
|
||||
int amountPerYear;
|
||||
List<PointsAmountPerMonth> pointsAmountPerMonth;
|
||||
int pointsPerYear;
|
||||
int year;
|
||||
|
||||
PointsAmountPerYear(
|
||||
{this.amountPerYear,
|
||||
this.pointsAmountPerMonth,
|
||||
this.pointsPerYear,
|
||||
this.year});
|
||||
|
||||
PointsAmountPerYear.fromJson(Map<String, dynamic> json) {
|
||||
amountPerYear = json['AmountPerYear'];
|
||||
if (json['PointsAmountPerMonth'] != null) {
|
||||
pointsAmountPerMonth = new List<PointsAmountPerMonth>();
|
||||
json['PointsAmountPerMonth'].forEach((v) {
|
||||
pointsAmountPerMonth.add(new PointsAmountPerMonth.fromJson(v));
|
||||
});
|
||||
}
|
||||
pointsPerYear = json['PointsPerYear'];
|
||||
year = json['Year'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AmountPerYear'] = this.amountPerYear;
|
||||
if (this.pointsAmountPerMonth != null) {
|
||||
data['PointsAmountPerMonth'] =
|
||||
this.pointsAmountPerMonth.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['PointsPerYear'] = this.pointsPerYear;
|
||||
data['Year'] = this.year;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
import 'PointsDetails.dart';
|
||||
|
||||
class PointsAmountPerday {
|
||||
double amountPerDay;
|
||||
String day;
|
||||
List<PointsDetails> pointsDetails;
|
||||
double pointsPerDay;
|
||||
String transationDate;
|
||||
|
||||
PointsAmountPerday(
|
||||
{this.amountPerDay,
|
||||
this.day,
|
||||
this.pointsDetails,
|
||||
this.pointsPerDay,
|
||||
this.transationDate});
|
||||
|
||||
PointsAmountPerday.fromJson(Map<String, dynamic> json) {
|
||||
amountPerDay = json['AmountPerDay'];
|
||||
day = json['Day'];
|
||||
if (json['PointsDetails'] != null) {
|
||||
pointsDetails = new List<PointsDetails>();
|
||||
json['PointsDetails'].forEach((v) {
|
||||
pointsDetails.add(new PointsDetails.fromJson(v));
|
||||
});
|
||||
}
|
||||
pointsPerDay = json['PointsPerDay'];
|
||||
transationDate = json['TransationDate'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AmountPerDay'] = this.amountPerDay;
|
||||
data['Day'] = this.day;
|
||||
if (this.pointsDetails != null) {
|
||||
data['PointsDetails'] =
|
||||
this.pointsDetails.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['PointsPerDay'] = this.pointsPerDay;
|
||||
data['TransationDate'] = this.transationDate;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
class PointsDetails {
|
||||
int accNumber;
|
||||
String accountStatus;
|
||||
double amount;
|
||||
int lineItemNo;
|
||||
String operationType;
|
||||
double points;
|
||||
double purchasePoints;
|
||||
int subTransactionType;
|
||||
String subTransactionTypeDescription;
|
||||
String transactionDate;
|
||||
|
||||
PointsDetails(
|
||||
{this.accNumber,
|
||||
this.accountStatus,
|
||||
this.amount,
|
||||
this.lineItemNo,
|
||||
this.operationType,
|
||||
this.points,
|
||||
this.purchasePoints,
|
||||
this.subTransactionType,
|
||||
this.subTransactionTypeDescription,
|
||||
this.transactionDate});
|
||||
|
||||
PointsDetails.fromJson(Map<String, dynamic> json) {
|
||||
accNumber = json['AccNumber'];
|
||||
accountStatus = json['AccountStatus'];
|
||||
amount = json['Amount'];
|
||||
lineItemNo = json['LineItemNo'];
|
||||
operationType = json['OperationType'];
|
||||
points = json['Points'];
|
||||
var purchasePoints = json['PurchasePoints'];
|
||||
if(purchasePoints is int){
|
||||
this.purchasePoints = (purchasePoints).roundToDouble();
|
||||
}else {
|
||||
this.purchasePoints = purchasePoints;
|
||||
}
|
||||
subTransactionType = json['SubTransactionType'];
|
||||
subTransactionTypeDescription = json['SubTransactionTypeDescription'];
|
||||
transactionDate = json['TransactionDate'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AccNumber'] = this.accNumber;
|
||||
data['AccountStatus'] = this.accountStatus;
|
||||
data['Amount'] = this.amount;
|
||||
data['LineItemNo'] = this.lineItemNo;
|
||||
data['OperationType'] = this.operationType;
|
||||
data['Points'] = this.points;
|
||||
data['PurchasePoints'] = this.purchasePoints;
|
||||
data['SubTransactionType'] = this.subTransactionType;
|
||||
data['SubTransactionTypeDescription'] = this.subTransactionTypeDescription;
|
||||
data['TransactionDate'] = this.transactionDate;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
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;
|
||||
|
||||
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});
|
||||
|
||||
ShippingOption.fromJson(Map<String, dynamic> json) {
|
||||
shippingRateComputationMethodSystemName =
|
||||
json['shipping_rate_computation_method_system_name'];
|
||||
rate = json['rate'];
|
||||
rateVat = json['rate_vat'];
|
||||
rateVatPercent = json['rate_vat_percent'];
|
||||
name = json['name'];
|
||||
namen = json['namen'];
|
||||
description = json['description'];
|
||||
descriptionn = json['descriptionn'];
|
||||
allowShippingSunday = json['AllowShippingSunday'];
|
||||
allowShippingMonday = json['AllowShippingMonday'];
|
||||
allowShippingTuesday = json['AllowShippingTuesday'];
|
||||
allowShippingWednesday = json['AllowShippingWednesday'];
|
||||
allowShippingThursday = json['AllowShippingThursday'];
|
||||
allowShippingFriday = json['AllowShippingFriday'];
|
||||
allowShippingSaturday = json['AllowShippingSaturday'];
|
||||
allowShippingTime1From = json['AllowShippingTime1From'];
|
||||
allowShippingTime1To = json['AllowShippingTime1To'];
|
||||
allowShippingTime2From = json['AllowShippingTime2From'];
|
||||
allowShippingTime2To = json['AllowShippingTime2To'];
|
||||
allowShippingNote = json['AllowShippingNote'];
|
||||
allowShippingNoten = json['AllowShippingNoten'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['shipping_rate_computation_method_system_name'] =
|
||||
this.shippingRateComputationMethodSystemName;
|
||||
data['rate'] = this.rate;
|
||||
data['rate_vat'] = this.rateVat;
|
||||
data['rate_vat_percent'] = this.rateVatPercent;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
data['description'] = this.description;
|
||||
data['descriptionn'] = this.descriptionn;
|
||||
data['AllowShippingSunday'] = this.allowShippingSunday;
|
||||
data['AllowShippingMonday'] = this.allowShippingMonday;
|
||||
data['AllowShippingTuesday'] = this.allowShippingTuesday;
|
||||
data['AllowShippingWednesday'] = this.allowShippingWednesday;
|
||||
data['AllowShippingThursday'] = this.allowShippingThursday;
|
||||
data['AllowShippingFriday'] = this.allowShippingFriday;
|
||||
data['AllowShippingSaturday'] = this.allowShippingSaturday;
|
||||
data['AllowShippingTime1From'] = this.allowShippingTime1From;
|
||||
data['AllowShippingTime1To'] = this.allowShippingTime1To;
|
||||
data['AllowShippingTime2From'] = this.allowShippingTime2From;
|
||||
data['AllowShippingTime2To'] = this.allowShippingTime2To;
|
||||
data['AllowShippingNote'] = this.allowShippingNote;
|
||||
data['AllowShippingNoten'] = this.allowShippingNoten;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,115 @@
|
||||
import 'package:diplomaticquarterapp/core/model/pharmacies/Customer.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
|
||||
|
||||
class ShoppingCart {
|
||||
int languageId;
|
||||
String id;
|
||||
// List<Null> productAttributes;
|
||||
double customerEnteredPrice;
|
||||
int quantity;
|
||||
String discountAmountInclTax;
|
||||
String subtotal;
|
||||
String subtotalWithVat;
|
||||
String subtotalVatAmount;
|
||||
String subtotalVatRate;
|
||||
String currency;
|
||||
String currencyn;
|
||||
String rentalStartDateUtc;
|
||||
String rentalEndDateUtc;
|
||||
String createdOnUtc;
|
||||
String updatedOnUtc;
|
||||
String shoppingCartType;
|
||||
int productId;
|
||||
PharmacyProduct product;
|
||||
int customerId;
|
||||
Customer customer;
|
||||
|
||||
ShoppingCart(
|
||||
{this.languageId,
|
||||
this.id,
|
||||
// this.productAttributes,
|
||||
this.customerEnteredPrice,
|
||||
this.quantity,
|
||||
this.discountAmountInclTax,
|
||||
this.subtotal,
|
||||
this.subtotalWithVat,
|
||||
this.subtotalVatAmount,
|
||||
this.subtotalVatRate,
|
||||
this.currency,
|
||||
this.currencyn,
|
||||
this.rentalStartDateUtc,
|
||||
this.rentalEndDateUtc,
|
||||
this.createdOnUtc,
|
||||
this.updatedOnUtc,
|
||||
this.shoppingCartType,
|
||||
this.productId,
|
||||
this.product,
|
||||
this.customerId,
|
||||
this.customer});
|
||||
|
||||
ShoppingCart.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
id = json['id'];
|
||||
/*if (json['product_attributes'] != null) {
|
||||
productAttributes = new List<Null>();
|
||||
json['product_attributes'].forEach((v) {
|
||||
productAttributes.add(new Null.fromJson(v));
|
||||
});
|
||||
}*/
|
||||
customerEnteredPrice = json['customer_entered_price'];
|
||||
quantity = json['quantity'];
|
||||
discountAmountInclTax = json['discount_amount_incl_tax'];
|
||||
subtotal = json['subtotal'];
|
||||
subtotalWithVat = json['subtotal_with_vat'];
|
||||
subtotalVatAmount = json['subtotal_vat_amount'];
|
||||
subtotalVatRate = json['subtotal_vat_rate'];
|
||||
currency = json['currency'];
|
||||
currencyn = json['currencyn'];
|
||||
rentalStartDateUtc = json['rental_start_date_utc'];
|
||||
rentalEndDateUtc = json['rental_end_date_utc'];
|
||||
createdOnUtc = json['created_on_utc'];
|
||||
updatedOnUtc = json['updated_on_utc'];
|
||||
shoppingCartType = json['shopping_cart_type'];
|
||||
productId = json['product_id'];
|
||||
product = json['product'] != null
|
||||
? new PharmacyProduct.fromJson(json['product'])
|
||||
: null;
|
||||
customerId = json['customer_id'];
|
||||
customer = json['customer'] != null
|
||||
? new Customer.fromJson(json['customer'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['id'] = this.id;
|
||||
/*if (this.productAttributes != null) {
|
||||
data['product_attributes'] =
|
||||
this.productAttributes.map((v) => v.toJson()).toList();
|
||||
}*/
|
||||
data['customer_entered_price'] = this.customerEnteredPrice;
|
||||
data['quantity'] = this.quantity;
|
||||
data['discount_amount_incl_tax'] = this.discountAmountInclTax;
|
||||
data['subtotal'] = this.subtotal;
|
||||
data['subtotal_with_vat'] = this.subtotalWithVat;
|
||||
data['subtotal_vat_amount'] = this.subtotalVatAmount;
|
||||
data['subtotal_vat_rate'] = this.subtotalVatRate;
|
||||
data['currency'] = this.currency;
|
||||
data['currencyn'] = this.currencyn;
|
||||
data['rental_start_date_utc'] = this.rentalStartDateUtc;
|
||||
data['rental_end_date_utc'] = this.rentalEndDateUtc;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['updated_on_utc'] = this.updatedOnUtc;
|
||||
data['shopping_cart_type'] = this.shoppingCartType;
|
||||
data['product_id'] = this.productId;
|
||||
if (this.product != null) {
|
||||
data['product'] = this.product.toJson();
|
||||
}
|
||||
data['customer_id'] = this.customerId;
|
||||
if (this.customer != null) {
|
||||
data['customer'] = this.customer.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ShoppingCartResponse with ChangeNotifier {
|
||||
int itemCount;
|
||||
int quantityCount;
|
||||
double subtotal;
|
||||
double subtotalWithVat;
|
||||
double subtotalVatAmount;
|
||||
double subtotalVatRate;
|
||||
List<ShoppingCart> shoppingCarts;
|
||||
|
||||
ShoppingCartResponse(
|
||||
{this.itemCount,
|
||||
this.quantityCount,
|
||||
this.subtotal,
|
||||
this.subtotalWithVat,
|
||||
this.subtotalVatAmount,
|
||||
this.subtotalVatRate,
|
||||
this.shoppingCarts});
|
||||
|
||||
void updateShoppingCard() {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
ShoppingCartResponse.fromJson(Map<String, dynamic> json) {
|
||||
itemCount = json['item_count'];
|
||||
quantityCount = json['quantity_count'];
|
||||
subtotal = json['subtotal'];
|
||||
subtotalWithVat = json['subtotal_with_vat'];
|
||||
subtotalVatAmount = json['subtotal_vat_amount'];
|
||||
subtotalVatRate = json['subtotal_vat_rate'];
|
||||
if (json['shopping_carts'] != null) {
|
||||
shoppingCarts = new List<ShoppingCart>();
|
||||
json['shopping_carts'].forEach((v) {
|
||||
shoppingCarts.add(new ShoppingCart.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['item_count'] = this.itemCount;
|
||||
data['quantity_count'] = this.quantityCount;
|
||||
data['subtotal'] = this.subtotal;
|
||||
data['subtotal_with_vat'] = this.subtotalWithVat;
|
||||
data['subtotal_vat_amount'] = this.subtotalVatAmount;
|
||||
data['subtotal_vat_rate'] = this.subtotalVatRate;
|
||||
if (this.shoppingCarts != null) {
|
||||
data['shopping_carts'] =
|
||||
this.shoppingCarts.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
class Specifications {
|
||||
int id;
|
||||
int displayOrder;
|
||||
String defaultValue;
|
||||
String defaultValuen;
|
||||
String name;
|
||||
String nameN;
|
||||
|
||||
Specifications(
|
||||
{this.id,
|
||||
this.displayOrder,
|
||||
this.defaultValue,
|
||||
this.defaultValuen,
|
||||
this.name,
|
||||
this.nameN});
|
||||
|
||||
Specifications.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
displayOrder = json['display_order'];
|
||||
defaultValue = json['default_value'];
|
||||
defaultValuen = json['default_valuen'];
|
||||
name = json['name'];
|
||||
nameN = json['nameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['default_value'] = this.defaultValue;
|
||||
data['default_valuen'] = this.defaultValuen;
|
||||
data['name'] = this.name;
|
||||
data['nameN'] = this.nameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'ShippingOption.dart';
|
||||
|
||||
class PaymentCheckoutData with ChangeNotifier{
|
||||
Addresses address;
|
||||
PaymentOption paymentOption;
|
||||
LacumAccountInformation lacumInformation;
|
||||
bool cartDataVisible;
|
||||
ShippingOption shippingOption;
|
||||
int usedLakumPoints;
|
||||
|
||||
PaymentCheckoutData({this.address, this.paymentOption, this.lacumInformation, this.cartDataVisible = false, this.shippingOption, this.usedLakumPoints = 0});
|
||||
|
||||
void updateData() {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
class BrandsModel {
|
||||
String id;
|
||||
String name;
|
||||
String namen;
|
||||
Null image;
|
||||
|
||||
BrandsModel({this.id, this.name, this.namen, this.image});
|
||||
|
||||
BrandsModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
namen = json['namen'];
|
||||
image = json['image'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
data['image'] = this.image;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
class CategoriseParentModel {
|
||||
String id;
|
||||
String name;
|
||||
String namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
dynamic description;
|
||||
int parentCategoryId;
|
||||
int displayOrder;
|
||||
dynamic image;
|
||||
bool isLeaf;
|
||||
|
||||
CategoriseParentModel(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.description,
|
||||
this.parentCategoryId,
|
||||
this.displayOrder,
|
||||
this.image,
|
||||
this.isLeaf});
|
||||
|
||||
CategoriseParentModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
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));
|
||||
});
|
||||
}
|
||||
description = json['description'];
|
||||
parentCategoryId = json['parent_category_id'];
|
||||
displayOrder = json['display_order'];
|
||||
image = json['image'];
|
||||
isLeaf = json['is_leaf'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['description'] = this.description;
|
||||
data['parent_category_id'] = this.parentCategoryId;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['image'] = this.image;
|
||||
data['is_leaf'] = this.isLeaf;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,184 @@
|
||||
class FinalProductsModel {
|
||||
String id;
|
||||
String name;
|
||||
String namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
String shortDescription;
|
||||
String fullDescription;
|
||||
String fullDescriptionn;
|
||||
dynamic approvedRatingSum;
|
||||
dynamic approvedTotalReviews;
|
||||
String sku;
|
||||
bool isRx;
|
||||
dynamic rxMessage;
|
||||
dynamic rxMessagen;
|
||||
dynamic stockQuantity;
|
||||
String stockAvailability;
|
||||
String stockAvailabilityn;
|
||||
bool allowBackInStockSubscriptions;
|
||||
dynamic orderMinimumQuantity;
|
||||
dynamic orderMaximumQuantity;
|
||||
dynamic price;
|
||||
dynamic oldPrice;
|
||||
dynamic discountName;
|
||||
dynamic discountNamen;
|
||||
dynamic discountPercentage;
|
||||
dynamic displayOrder;
|
||||
List<dynamic> discountIds;
|
||||
List<dynamic> reviews;
|
||||
List<Images> images;
|
||||
|
||||
FinalProductsModel(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.shortDescription,
|
||||
this.fullDescription,
|
||||
this.fullDescriptionn,
|
||||
this.approvedRatingSum,
|
||||
this.approvedTotalReviews,
|
||||
this.sku,
|
||||
this.isRx,
|
||||
this.rxMessage,
|
||||
this.rxMessagen,
|
||||
this.stockQuantity,
|
||||
this.stockAvailability,
|
||||
this.stockAvailabilityn,
|
||||
this.allowBackInStockSubscriptions,
|
||||
this.orderMinimumQuantity,
|
||||
this.orderMaximumQuantity,
|
||||
this.price,
|
||||
this.oldPrice,
|
||||
this.discountName,
|
||||
this.discountNamen,
|
||||
this.discountPercentage,
|
||||
this.displayOrder,
|
||||
this.discountIds,
|
||||
this.reviews,
|
||||
this.images});
|
||||
|
||||
FinalProductsModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
if (json['images'] != null) {
|
||||
images = new List<Images>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new Images.fromJson(v));
|
||||
});
|
||||
}
|
||||
namen = json['namen'];
|
||||
if (json['localized_names'] != null) {
|
||||
localizedNames = new List<LocalizedNames>();
|
||||
json['localized_names'].forEach((v) {
|
||||
localizedNames.add(new LocalizedNames.fromJson(v));
|
||||
});
|
||||
}
|
||||
shortDescription = json['short_description'];
|
||||
fullDescription = json['full_description'];
|
||||
fullDescriptionn = json['full_descriptionn'];
|
||||
approvedRatingSum = json['approved_rating_sum'];
|
||||
approvedTotalReviews = json['approved_total_reviews'];
|
||||
sku = json['sku'];
|
||||
isRx = json['is_rx'];
|
||||
rxMessage = json['rx_message'];
|
||||
rxMessagen = json['rx_messagen'];
|
||||
stockQuantity = json['stock_quantity'];
|
||||
stockAvailability = json['stock_availability'];
|
||||
stockAvailabilityn = json['stock_availabilityn'];
|
||||
allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions'];
|
||||
orderMinimumQuantity = json['order_minimum_quantity'];
|
||||
orderMaximumQuantity = json['order_maximum_quantity'];
|
||||
price = json['price'];
|
||||
oldPrice = json['old_price'];
|
||||
discountName = json['discount_name'];
|
||||
discountNamen = json['discount_namen'];
|
||||
discountPercentage = json['discount_percentage'];
|
||||
displayOrder = json['display_order'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['short_description'] = this.shortDescription;
|
||||
data['full_description'] = this.fullDescription;
|
||||
data['full_descriptionn'] = this.fullDescriptionn;
|
||||
data['approved_rating_sum'] = this.approvedRatingSum;
|
||||
data['approved_total_reviews'] = this.approvedTotalReviews;
|
||||
data['sku'] = this.sku;
|
||||
data['is_rx'] = this.isRx;
|
||||
data['rx_message'] = this.rxMessage;
|
||||
data['rx_messagen'] = this.rxMessagen;
|
||||
data['stock_quantity'] = this.stockQuantity;
|
||||
data['stock_availability'] = this.stockAvailability;
|
||||
data['stock_availabilityn'] = this.stockAvailabilityn;
|
||||
data['allow_back_in_stock_subscriptions'] =
|
||||
this.allowBackInStockSubscriptions;
|
||||
data['order_minimum_quantity'] = this.orderMinimumQuantity;
|
||||
data['order_maximum_quantity'] = this.orderMaximumQuantity;
|
||||
data['price'] = this.price;
|
||||
data['old_price'] = this.oldPrice;
|
||||
data['discount_name'] = this.discountName;
|
||||
data['discount_namen'] = this.discountNamen;
|
||||
data['discount_percentage'] = this.discountPercentage;
|
||||
data['display_order'] = this.displayOrder;
|
||||
|
||||
if (this.images != null) {
|
||||
data['images'] = this.images.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Images {
|
||||
int id;
|
||||
int position;
|
||||
String src;
|
||||
String thumb;
|
||||
String attachment;
|
||||
|
||||
Images({this.id, this.position, this.src, this.thumb, this.attachment});
|
||||
|
||||
Images.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
position = json['position'];
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['position'] = this.position;
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,579 @@
|
||||
class OfferProductsModel {
|
||||
String id;
|
||||
bool visibleIndividually;
|
||||
String name;
|
||||
String namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
String shortDescription;
|
||||
String shortDescriptionn;
|
||||
String fullDescription;
|
||||
String fullDescriptionn;
|
||||
bool markasNew;
|
||||
bool showOnHomePage;
|
||||
dynamic metaKeywords;
|
||||
dynamic metaDescription;
|
||||
dynamic metaTitle;
|
||||
bool allowCustomerReviews;
|
||||
dynamic approvedRatingSum;
|
||||
dynamic notApprovedRatingSum;
|
||||
dynamic approvedTotalReviews;
|
||||
dynamic notApprovedTotalReviews;
|
||||
String sku;
|
||||
bool isRx;
|
||||
bool prescriptionRequired;
|
||||
dynamic rxMessage;
|
||||
dynamic rxMessagen;
|
||||
dynamic manufacturerPartNumber;
|
||||
dynamic gtin;
|
||||
bool isGiftCard;
|
||||
bool requireOtherProducts;
|
||||
bool automaticallyAddRequiredProducts;
|
||||
bool isDownload;
|
||||
bool unlimitedDownloads;
|
||||
dynamic maxNumberOfDownloads;
|
||||
dynamic downloadExpirationDays;
|
||||
bool hasSampleDownload;
|
||||
bool hasUserAgreement;
|
||||
bool isRecurring;
|
||||
dynamic recurringCycleLength;
|
||||
dynamic recurringTotalCycles;
|
||||
bool isRental;
|
||||
dynamic rentalPriceLength;
|
||||
bool isShipEnabled;
|
||||
bool isFreeShipping;
|
||||
bool shipSeparately;
|
||||
dynamic additionalShippingCharge;
|
||||
bool isTaxExempt;
|
||||
bool isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
bool useMultipleWarehouses;
|
||||
dynamic manageInventoryMethodId;
|
||||
dynamic stockQuantity;
|
||||
String stockAvailability;
|
||||
String stockAvailabilityn;
|
||||
bool displayStockAvailability;
|
||||
bool displayStockQuantity;
|
||||
dynamic minStockQuantity;
|
||||
dynamic notifyAdminForQuantityBelow;
|
||||
bool allowBackInStockSubscriptions;
|
||||
dynamic orderMinimumQuantity;
|
||||
dynamic orderMaximumQuantity;
|
||||
dynamic allowedQuantities;
|
||||
bool allowAddingOnlyExistingAttributeCombinations;
|
||||
bool disableBuyButton;
|
||||
bool disableWishlistButton;
|
||||
bool availableForPreOrder;
|
||||
dynamic preOrderAvailabilityStartDateTimeUtc;
|
||||
bool callForPrice;
|
||||
dynamic price;
|
||||
dynamic oldPrice;
|
||||
dynamic productCost;
|
||||
dynamic specialPrice;
|
||||
dynamic specialPriceStartDateTimeUtc;
|
||||
dynamic specialPriceEndDateTimeUtc;
|
||||
bool customerEntersPrice;
|
||||
dynamic minimumCustomerEnteredPrice;
|
||||
dynamic maximumCustomerEnteredPrice;
|
||||
bool basepriceEnabled;
|
||||
dynamic basepriceAmount;
|
||||
dynamic basepriceBaseAmount;
|
||||
bool hasTierPrices;
|
||||
bool hasDiscountsApplied;
|
||||
String discountName;
|
||||
String discountNamen;
|
||||
String discountDescription;
|
||||
String discountDescriptionn;
|
||||
dynamic discountPercentage;
|
||||
String currency;
|
||||
String currencyn;
|
||||
dynamic weight;
|
||||
dynamic length;
|
||||
dynamic width;
|
||||
dynamic height;
|
||||
dynamic availableStartDateTimeUtc;
|
||||
dynamic availableEndDateTimeUtc;
|
||||
dynamic displayOrder;
|
||||
bool published;
|
||||
bool deleted;
|
||||
String createdOnUtc;
|
||||
String updatedOnUtc;
|
||||
String productType;
|
||||
dynamic parentGroupedProductId;
|
||||
List<dynamic> roleIds;
|
||||
List<dynamic> discountIds;
|
||||
List<dynamic> storeIds;
|
||||
List<dynamic> manufacturerIds;
|
||||
List<dynamic> reviews;
|
||||
List<Images> images;
|
||||
List<dynamic> attributes;
|
||||
List<Specifications> specifications;
|
||||
List<dynamic> associatedProductIds;
|
||||
List<dynamic> tags;
|
||||
dynamic vendorId;
|
||||
String seName;
|
||||
|
||||
OfferProductsModel(
|
||||
{this.id,
|
||||
this.visibleIndividually,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.shortDescription,
|
||||
this.shortDescriptionn,
|
||||
this.fullDescription,
|
||||
this.fullDescriptionn,
|
||||
this.markasNew,
|
||||
this.showOnHomePage,
|
||||
this.metaKeywords,
|
||||
this.metaDescription,
|
||||
this.metaTitle,
|
||||
this.allowCustomerReviews,
|
||||
this.approvedRatingSum,
|
||||
this.notApprovedRatingSum,
|
||||
this.approvedTotalReviews,
|
||||
this.notApprovedTotalReviews,
|
||||
this.sku,
|
||||
this.isRx,
|
||||
this.prescriptionRequired,
|
||||
this.rxMessage,
|
||||
this.rxMessagen,
|
||||
this.manufacturerPartNumber,
|
||||
this.gtin,
|
||||
this.isGiftCard,
|
||||
this.requireOtherProducts,
|
||||
this.automaticallyAddRequiredProducts,
|
||||
this.isDownload,
|
||||
this.unlimitedDownloads,
|
||||
this.maxNumberOfDownloads,
|
||||
this.downloadExpirationDays,
|
||||
this.hasSampleDownload,
|
||||
this.hasUserAgreement,
|
||||
this.isRecurring,
|
||||
this.recurringCycleLength,
|
||||
this.recurringTotalCycles,
|
||||
this.isRental,
|
||||
this.rentalPriceLength,
|
||||
this.isShipEnabled,
|
||||
this.isFreeShipping,
|
||||
this.shipSeparately,
|
||||
this.additionalShippingCharge,
|
||||
this.isTaxExempt,
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
|
||||
this.useMultipleWarehouses,
|
||||
this.manageInventoryMethodId,
|
||||
this.stockQuantity,
|
||||
this.stockAvailability,
|
||||
this.stockAvailabilityn,
|
||||
this.displayStockAvailability,
|
||||
this.displayStockQuantity,
|
||||
this.minStockQuantity,
|
||||
this.notifyAdminForQuantityBelow,
|
||||
this.allowBackInStockSubscriptions,
|
||||
this.orderMinimumQuantity,
|
||||
this.orderMaximumQuantity,
|
||||
this.allowedQuantities,
|
||||
this.allowAddingOnlyExistingAttributeCombinations,
|
||||
this.disableBuyButton,
|
||||
this.disableWishlistButton,
|
||||
this.availableForPreOrder,
|
||||
this.preOrderAvailabilityStartDateTimeUtc,
|
||||
this.callForPrice,
|
||||
this.price,
|
||||
this.oldPrice,
|
||||
this.productCost,
|
||||
this.specialPrice,
|
||||
this.specialPriceStartDateTimeUtc,
|
||||
this.specialPriceEndDateTimeUtc,
|
||||
this.customerEntersPrice,
|
||||
this.minimumCustomerEnteredPrice,
|
||||
this.maximumCustomerEnteredPrice,
|
||||
this.basepriceEnabled,
|
||||
this.basepriceAmount,
|
||||
this.basepriceBaseAmount,
|
||||
this.hasTierPrices,
|
||||
this.hasDiscountsApplied,
|
||||
this.discountName,
|
||||
this.discountNamen,
|
||||
this.discountDescription,
|
||||
this.discountDescriptionn,
|
||||
this.discountPercentage,
|
||||
this.currency,
|
||||
this.currencyn,
|
||||
this.weight,
|
||||
this.length,
|
||||
this.width,
|
||||
this.height,
|
||||
this.availableStartDateTimeUtc,
|
||||
this.availableEndDateTimeUtc,
|
||||
this.displayOrder,
|
||||
this.published,
|
||||
this.deleted,
|
||||
this.createdOnUtc,
|
||||
this.updatedOnUtc,
|
||||
this.productType,
|
||||
this.parentGroupedProductId,
|
||||
this.roleIds,
|
||||
this.discountIds,
|
||||
this.storeIds,
|
||||
this.manufacturerIds,
|
||||
this.reviews,
|
||||
this.images,
|
||||
this.attributes,
|
||||
this.specifications,
|
||||
this.associatedProductIds,
|
||||
this.tags,
|
||||
this.vendorId,
|
||||
this.seName});
|
||||
|
||||
OfferProductsModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
visibleIndividually = json['visible_individually'];
|
||||
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));
|
||||
});
|
||||
}
|
||||
shortDescription = json['short_description'];
|
||||
shortDescriptionn = 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'];
|
||||
metaDescription = json['meta_description'];
|
||||
metaTitle = 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'];
|
||||
oldPrice = json['old_price'];
|
||||
productCost = json['product_cost'];
|
||||
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'];
|
||||
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 = json['created_on_utc'];
|
||||
updatedOnUtc = json['updated_on_utc'];
|
||||
productType = json['product_type'];
|
||||
parentGroupedProductId = json['parent_grouped_product_id'];
|
||||
|
||||
discountIds = json['discount_ids'].cast<int>();
|
||||
|
||||
if (json['images'] != null) {
|
||||
images = new List<Images>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new Images.fromJson(v));
|
||||
});
|
||||
}
|
||||
|
||||
vendorId = json['vendor_id'];
|
||||
seName = json['se_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['visible_individually'] = this.visibleIndividually;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['short_description'] = this.shortDescription;
|
||||
data['short_descriptionn'] = this.shortDescriptionn;
|
||||
data['full_description'] = this.fullDescription;
|
||||
data['full_descriptionn'] = this.fullDescriptionn;
|
||||
data['markas_new'] = this.markasNew;
|
||||
data['show_on_home_page'] = this.showOnHomePage;
|
||||
data['meta_keywords'] = this.metaKeywords;
|
||||
data['meta_description'] = this.metaDescription;
|
||||
data['meta_title'] = this.metaTitle;
|
||||
data['allow_customer_reviews'] = this.allowCustomerReviews;
|
||||
data['approved_rating_sum'] = this.approvedRatingSum;
|
||||
data['not_approved_rating_sum'] = this.notApprovedRatingSum;
|
||||
data['approved_total_reviews'] = this.approvedTotalReviews;
|
||||
data['not_approved_total_reviews'] = this.notApprovedTotalReviews;
|
||||
data['sku'] = this.sku;
|
||||
data['is_rx'] = this.isRx;
|
||||
data['prescription_required'] = this.prescriptionRequired;
|
||||
data['rx_message'] = this.rxMessage;
|
||||
data['rx_messagen'] = this.rxMessagen;
|
||||
data['manufacturer_part_number'] = this.manufacturerPartNumber;
|
||||
data['gtin'] = this.gtin;
|
||||
data['is_gift_card'] = this.isGiftCard;
|
||||
data['require_other_products'] = this.requireOtherProducts;
|
||||
data['automatically_add_required_products'] =
|
||||
this.automaticallyAddRequiredProducts;
|
||||
data['is_download'] = this.isDownload;
|
||||
data['unlimited_downloads'] = this.unlimitedDownloads;
|
||||
data['max_number_of_downloads'] = this.maxNumberOfDownloads;
|
||||
data['download_expiration_days'] = this.downloadExpirationDays;
|
||||
data['has_sample_download'] = this.hasSampleDownload;
|
||||
data['has_user_agreement'] = this.hasUserAgreement;
|
||||
data['is_recurring'] = this.isRecurring;
|
||||
data['recurring_cycle_length'] = this.recurringCycleLength;
|
||||
data['recurring_total_cycles'] = this.recurringTotalCycles;
|
||||
data['is_rental'] = this.isRental;
|
||||
data['rental_price_length'] = this.rentalPriceLength;
|
||||
data['is_ship_enabled'] = this.isShipEnabled;
|
||||
data['is_free_shipping'] = this.isFreeShipping;
|
||||
data['ship_separately'] = this.shipSeparately;
|
||||
data['additional_shipping_charge'] = this.additionalShippingCharge;
|
||||
data['is_tax_exempt'] = this.isTaxExempt;
|
||||
data['is_telecommunications_or_broadcasting_or_electronic_services'] =
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
data['use_multiple_warehouses'] = this.useMultipleWarehouses;
|
||||
data['manage_inventory_method_id'] = this.manageInventoryMethodId;
|
||||
data['stock_quantity'] = this.stockQuantity;
|
||||
data['stock_availability'] = this.stockAvailability;
|
||||
data['stock_availabilityn'] = this.stockAvailabilityn;
|
||||
data['display_stock_availability'] = this.displayStockAvailability;
|
||||
data['display_stock_quantity'] = this.displayStockQuantity;
|
||||
data['min_stock_quantity'] = this.minStockQuantity;
|
||||
data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow;
|
||||
data['allow_back_in_stock_subscriptions'] =
|
||||
this.allowBackInStockSubscriptions;
|
||||
data['order_minimum_quantity'] = this.orderMinimumQuantity;
|
||||
data['order_maximum_quantity'] = this.orderMaximumQuantity;
|
||||
data['allowed_quantities'] = this.allowedQuantities;
|
||||
data['allow_adding_only_existing_attribute_combinations'] =
|
||||
this.allowAddingOnlyExistingAttributeCombinations;
|
||||
data['disable_buy_button'] = this.disableBuyButton;
|
||||
data['disable_wishlist_button'] = this.disableWishlistButton;
|
||||
data['available_for_pre_order'] = this.availableForPreOrder;
|
||||
data['pre_order_availability_start_date_time_utc'] =
|
||||
this.preOrderAvailabilityStartDateTimeUtc;
|
||||
data['call_for_price'] = this.callForPrice;
|
||||
data['price'] = this.price;
|
||||
data['old_price'] = this.oldPrice;
|
||||
data['product_cost'] = this.productCost;
|
||||
data['special_price'] = this.specialPrice;
|
||||
data['special_price_start_date_time_utc'] =
|
||||
this.specialPriceStartDateTimeUtc;
|
||||
data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
|
||||
data['customer_enters_price'] = this.customerEntersPrice;
|
||||
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
|
||||
data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice;
|
||||
data['baseprice_enabled'] = this.basepriceEnabled;
|
||||
data['baseprice_amount'] = this.basepriceAmount;
|
||||
data['baseprice_base_amount'] = this.basepriceBaseAmount;
|
||||
data['has_tier_prices'] = this.hasTierPrices;
|
||||
data['has_discounts_applied'] = this.hasDiscountsApplied;
|
||||
data['discount_name'] = this.discountName;
|
||||
data['discount_namen'] = this.discountNamen;
|
||||
data['discount_description'] = this.discountDescription;
|
||||
data['discount_Descriptionn'] = this.discountDescriptionn;
|
||||
data['discount_percentage'] = this.discountPercentage;
|
||||
data['currency'] = this.currency;
|
||||
data['currencyn'] = this.currencyn;
|
||||
data['weight'] = this.weight;
|
||||
data['length'] = this.length;
|
||||
data['width'] = this.width;
|
||||
data['height'] = this.height;
|
||||
data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
|
||||
data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['published'] = this.published;
|
||||
data['deleted'] = this.deleted;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['updated_on_utc'] = this.updatedOnUtc;
|
||||
data['product_type'] = this.productType;
|
||||
data['parent_grouped_product_id'] = this.parentGroupedProductId;
|
||||
if (this.roleIds != null) {
|
||||
data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['discount_ids'] = this.discountIds;
|
||||
if (this.storeIds != null) {
|
||||
data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.manufacturerIds != null) {
|
||||
data['manufacturer_ids'] =
|
||||
this.manufacturerIds.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.reviews != null) {
|
||||
data['reviews'] = this.reviews.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.images != null) {
|
||||
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();
|
||||
}
|
||||
if (this.associatedProductIds != null) {
|
||||
data['associated_product_ids'] =
|
||||
this.associatedProductIds.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.tags != null) {
|
||||
data['tags'] = this.tags.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['vendor_id'] = this.vendorId;
|
||||
data['se_name'] = this.seName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Images {
|
||||
int id;
|
||||
int position;
|
||||
String src;
|
||||
String thumb;
|
||||
String attachment;
|
||||
|
||||
Images({this.id, this.position, this.src, this.thumb, this.attachment});
|
||||
|
||||
Images.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
position = json['position'];
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['position'] = this.position;
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Specifications {
|
||||
int id;
|
||||
int displayOrder;
|
||||
String defaultValue;
|
||||
String defaultValuen;
|
||||
String name;
|
||||
String nameN;
|
||||
|
||||
Specifications(
|
||||
{this.id,
|
||||
this.displayOrder,
|
||||
this.defaultValue,
|
||||
this.defaultValuen,
|
||||
this.name,
|
||||
this.nameN});
|
||||
|
||||
Specifications.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
displayOrder = json['display_order'];
|
||||
defaultValue = json['default_value'];
|
||||
defaultValuen = json['default_valuen'];
|
||||
name = json['name'];
|
||||
nameN = json['nameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['default_value'] = this.defaultValue;
|
||||
data['default_valuen'] = this.defaultValuen;
|
||||
data['name'] = this.name;
|
||||
data['nameN'] = this.nameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,175 @@
|
||||
class OffersModel {
|
||||
String id;
|
||||
String name;
|
||||
String namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
Null description;
|
||||
int categoryTemplateId;
|
||||
String metaKeywords;
|
||||
String metaDescription;
|
||||
String metaTitle;
|
||||
int parentCategoryId;
|
||||
int pageSize;
|
||||
String pageSizeOptions;
|
||||
Null priceRanges;
|
||||
bool showOnHomePage;
|
||||
bool includeInTopMenu;
|
||||
Null hasDiscountsApplied;
|
||||
bool published;
|
||||
bool deleted;
|
||||
int displayOrder;
|
||||
String createdOnUtc;
|
||||
String updatedOnUtc;
|
||||
List<dynamic> roleIds;
|
||||
List<dynamic> discountIds;
|
||||
List<dynamic> storeIds;
|
||||
Image image;
|
||||
String seName;
|
||||
bool isLeaf;
|
||||
|
||||
OffersModel(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.description,
|
||||
this.categoryTemplateId,
|
||||
this.metaKeywords,
|
||||
this.metaDescription,
|
||||
this.metaTitle,
|
||||
this.parentCategoryId,
|
||||
this.pageSize,
|
||||
this.pageSizeOptions,
|
||||
this.priceRanges,
|
||||
this.showOnHomePage,
|
||||
this.includeInTopMenu,
|
||||
this.hasDiscountsApplied,
|
||||
this.published,
|
||||
this.deleted,
|
||||
this.displayOrder,
|
||||
this.createdOnUtc,
|
||||
this.updatedOnUtc,
|
||||
this.roleIds,
|
||||
this.discountIds,
|
||||
this.storeIds,
|
||||
this.image,
|
||||
this.seName,
|
||||
this.isLeaf});
|
||||
|
||||
OffersModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
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));
|
||||
});
|
||||
}
|
||||
description = json['description'];
|
||||
categoryTemplateId = json['category_template_id'];
|
||||
metaKeywords = json['meta_keywords'];
|
||||
metaDescription = json['meta_description'];
|
||||
metaTitle = json['meta_title'];
|
||||
parentCategoryId = json['parent_category_id'];
|
||||
pageSize = json['page_size'];
|
||||
pageSizeOptions = json['page_size_options'];
|
||||
priceRanges = json['price_ranges'];
|
||||
showOnHomePage = json['show_on_home_page'];
|
||||
includeInTopMenu = json['include_in_top_menu'];
|
||||
hasDiscountsApplied = json['has_discounts_applied'];
|
||||
published = json['published'];
|
||||
deleted = json['deleted'];
|
||||
displayOrder = json['display_order'];
|
||||
createdOnUtc = json['created_on_utc'];
|
||||
updatedOnUtc = json['updated_on_utc'];
|
||||
|
||||
image = json['image'] != null ? new Image.fromJson(json['image']) : null;
|
||||
seName = json['se_name'];
|
||||
isLeaf = json['is_leaf'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['description'] = this.description;
|
||||
data['category_template_id'] = this.categoryTemplateId;
|
||||
data['meta_keywords'] = this.metaKeywords;
|
||||
data['meta_description'] = this.metaDescription;
|
||||
data['meta_title'] = this.metaTitle;
|
||||
data['parent_category_id'] = this.parentCategoryId;
|
||||
data['page_size'] = this.pageSize;
|
||||
data['page_size_options'] = this.pageSizeOptions;
|
||||
data['price_ranges'] = this.priceRanges;
|
||||
data['show_on_home_page'] = this.showOnHomePage;
|
||||
data['include_in_top_menu'] = this.includeInTopMenu;
|
||||
data['has_discounts_applied'] = this.hasDiscountsApplied;
|
||||
data['published'] = this.published;
|
||||
data['deleted'] = this.deleted;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['updated_on_utc'] = this.updatedOnUtc;
|
||||
if (this.roleIds != null) {
|
||||
data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.discountIds != null) {
|
||||
data['discount_ids'] = this.discountIds.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.storeIds != null) {
|
||||
data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.image != null) {
|
||||
data['image'] = this.image.toJson();
|
||||
}
|
||||
data['se_name'] = this.seName;
|
||||
data['is_leaf'] = this.isLeaf;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Image {
|
||||
String src;
|
||||
Null thumb;
|
||||
Null attachment;
|
||||
|
||||
Image({this.src, this.thumb, this.attachment});
|
||||
|
||||
Image.fromJson(Map<String, dynamic> json) {
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,566 @@
|
||||
class ParentProductsModel {
|
||||
dynamic id;
|
||||
dynamic visibleIndividually;
|
||||
dynamic name;
|
||||
dynamic namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
dynamic shortDescription;
|
||||
dynamic shortDescriptionn;
|
||||
dynamic fullDescription;
|
||||
dynamic fullDescriptionn;
|
||||
dynamic markasNew;
|
||||
dynamic showOnHomePage;
|
||||
dynamic metaKeywords;
|
||||
dynamic metaDescription;
|
||||
dynamic metaTitle;
|
||||
dynamic allowCustomerReviews;
|
||||
dynamic approvedRatingSum;
|
||||
dynamic notApprovedRatingSum;
|
||||
dynamic approvedTotalReviews;
|
||||
dynamic notApprovedTotalReviews;
|
||||
dynamic sku;
|
||||
dynamic isRx;
|
||||
dynamic prescriptionRequired;
|
||||
dynamic rxMessage;
|
||||
dynamic rxMessagen;
|
||||
dynamic manufacturerPartNumber;
|
||||
dynamic gtin;
|
||||
dynamic isGiftCard;
|
||||
dynamic requireOtherProducts;
|
||||
dynamic automaticallyAddRequiredProducts;
|
||||
dynamic isDownload;
|
||||
dynamic unlimitedDownloads;
|
||||
dynamic maxNumberOfDownloads;
|
||||
dynamic downloadExpirationDays;
|
||||
dynamic hasSampleDownload;
|
||||
dynamic hasUserAgreement;
|
||||
dynamic isRecurring;
|
||||
dynamic recurringCycleLength;
|
||||
dynamic recurringTotalCycles;
|
||||
dynamic isRental;
|
||||
dynamic rentalPriceLength;
|
||||
dynamic isShipEnabled;
|
||||
dynamic isFreeShipping;
|
||||
dynamic shipSeparately;
|
||||
dynamic additionalShippingCharge;
|
||||
dynamic isTaxExempt;
|
||||
dynamic isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
dynamic useMultipleWarehouses;
|
||||
dynamic manageInventoryMethodId;
|
||||
dynamic stockQuantity;
|
||||
dynamic stockAvailability;
|
||||
dynamic stockAvailabilityn;
|
||||
dynamic displayStockAvailability;
|
||||
dynamic displayStockQuantity;
|
||||
dynamic minStockQuantity;
|
||||
dynamic notifyAdminForQuantityBelow;
|
||||
dynamic allowBackInStockSubscriptions;
|
||||
dynamic orderMinimumQuantity;
|
||||
dynamic orderMaximumQuantity;
|
||||
dynamic allowedQuantities;
|
||||
dynamic allowAddingOnlyExistingAttributeCombinations;
|
||||
dynamic disableBuyButton;
|
||||
dynamic disableWishlistButton;
|
||||
dynamic availableForPreOrder;
|
||||
dynamic preOrderAvailabilityStartDateTimeUtc;
|
||||
dynamic callForPrice;
|
||||
dynamic price;
|
||||
dynamic oldPrice;
|
||||
dynamic productCost;
|
||||
dynamic specialPrice;
|
||||
dynamic specialPriceStartDateTimeUtc;
|
||||
dynamic specialPriceEndDateTimeUtc;
|
||||
dynamic customerEntersPrice;
|
||||
dynamic minimumCustomerEnteredPrice;
|
||||
dynamic maximumCustomerEnteredPrice;
|
||||
dynamic basepriceEnabled;
|
||||
dynamic basepriceAmount;
|
||||
dynamic basepriceBaseAmount;
|
||||
dynamic hasTierPrices;
|
||||
dynamic hasDiscountsApplied;
|
||||
dynamic discountName;
|
||||
dynamic discountNamen;
|
||||
dynamic discountDescription;
|
||||
dynamic discountDescriptionn;
|
||||
dynamic discountPercentage;
|
||||
dynamic currency;
|
||||
dynamic currencyn;
|
||||
dynamic weight;
|
||||
dynamic length;
|
||||
dynamic width;
|
||||
dynamic height;
|
||||
dynamic availableStartDateTimeUtc;
|
||||
dynamic availableEndDateTimeUtc;
|
||||
dynamic displayOrder;
|
||||
dynamic published;
|
||||
dynamic deleted;
|
||||
dynamic createdOnUtc;
|
||||
dynamic updatedOnUtc;
|
||||
dynamic productType;
|
||||
dynamic parentGroupedProductId;
|
||||
List<dynamic> roleIds;
|
||||
List<dynamic> discountIds;
|
||||
List<dynamic> storeIds;
|
||||
List<dynamic> manufacturerIds;
|
||||
List<dynamic> reviews;
|
||||
List<Images> images;
|
||||
List<dynamic> attributes;
|
||||
List<Specifications> specifications;
|
||||
List<dynamic> associatedProductIds;
|
||||
List<dynamic> tags;
|
||||
dynamic vendorId;
|
||||
String seName;
|
||||
|
||||
ParentProductsModel(
|
||||
{this.id,
|
||||
this.visibleIndividually,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.shortDescription,
|
||||
this.shortDescriptionn,
|
||||
this.fullDescription,
|
||||
this.fullDescriptionn,
|
||||
this.markasNew,
|
||||
this.showOnHomePage,
|
||||
this.metaKeywords,
|
||||
this.metaDescription,
|
||||
this.metaTitle,
|
||||
this.allowCustomerReviews,
|
||||
this.approvedRatingSum,
|
||||
this.notApprovedRatingSum,
|
||||
this.approvedTotalReviews,
|
||||
this.notApprovedTotalReviews,
|
||||
this.sku,
|
||||
this.isRx,
|
||||
this.prescriptionRequired,
|
||||
this.rxMessage,
|
||||
this.rxMessagen,
|
||||
this.manufacturerPartNumber,
|
||||
this.gtin,
|
||||
this.isGiftCard,
|
||||
this.requireOtherProducts,
|
||||
this.automaticallyAddRequiredProducts,
|
||||
this.isDownload,
|
||||
this.unlimitedDownloads,
|
||||
this.maxNumberOfDownloads,
|
||||
this.downloadExpirationDays,
|
||||
this.hasSampleDownload,
|
||||
this.hasUserAgreement,
|
||||
this.isRecurring,
|
||||
this.recurringCycleLength,
|
||||
this.recurringTotalCycles,
|
||||
this.isRental,
|
||||
this.rentalPriceLength,
|
||||
this.isShipEnabled,
|
||||
this.isFreeShipping,
|
||||
this.shipSeparately,
|
||||
this.additionalShippingCharge,
|
||||
this.isTaxExempt,
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
|
||||
this.useMultipleWarehouses,
|
||||
this.manageInventoryMethodId,
|
||||
this.stockQuantity,
|
||||
this.stockAvailability,
|
||||
this.stockAvailabilityn,
|
||||
this.displayStockAvailability,
|
||||
this.displayStockQuantity,
|
||||
this.minStockQuantity,
|
||||
this.notifyAdminForQuantityBelow,
|
||||
this.allowBackInStockSubscriptions,
|
||||
this.orderMinimumQuantity,
|
||||
this.orderMaximumQuantity,
|
||||
this.allowedQuantities,
|
||||
this.allowAddingOnlyExistingAttributeCombinations,
|
||||
this.disableBuyButton,
|
||||
this.disableWishlistButton,
|
||||
this.availableForPreOrder,
|
||||
this.preOrderAvailabilityStartDateTimeUtc,
|
||||
this.callForPrice,
|
||||
this.price,
|
||||
this.oldPrice,
|
||||
this.productCost,
|
||||
this.specialPrice,
|
||||
this.specialPriceStartDateTimeUtc,
|
||||
this.specialPriceEndDateTimeUtc,
|
||||
this.customerEntersPrice,
|
||||
this.minimumCustomerEnteredPrice,
|
||||
this.maximumCustomerEnteredPrice,
|
||||
this.basepriceEnabled,
|
||||
this.basepriceAmount,
|
||||
this.basepriceBaseAmount,
|
||||
this.hasTierPrices,
|
||||
this.hasDiscountsApplied,
|
||||
this.discountName,
|
||||
this.discountNamen,
|
||||
this.discountDescription,
|
||||
this.discountDescriptionn,
|
||||
this.discountPercentage,
|
||||
this.currency,
|
||||
this.currencyn,
|
||||
this.weight,
|
||||
this.length,
|
||||
this.width,
|
||||
this.height,
|
||||
this.availableStartDateTimeUtc,
|
||||
this.availableEndDateTimeUtc,
|
||||
this.displayOrder,
|
||||
this.published,
|
||||
this.deleted,
|
||||
this.createdOnUtc,
|
||||
this.updatedOnUtc,
|
||||
this.productType,
|
||||
this.parentGroupedProductId,
|
||||
this.roleIds,
|
||||
this.discountIds,
|
||||
this.storeIds,
|
||||
this.manufacturerIds,
|
||||
this.reviews,
|
||||
this.images,
|
||||
this.attributes,
|
||||
this.specifications,
|
||||
this.associatedProductIds,
|
||||
this.tags,
|
||||
this.vendorId,
|
||||
this.seName});
|
||||
|
||||
ParentProductsModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
visibleIndividually = json['visible_individually'];
|
||||
name = json['name'];
|
||||
if (json['images'] != null) {
|
||||
images = new List<Images>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new Images.fromJson(v));
|
||||
});
|
||||
}
|
||||
namen = json['namen'];
|
||||
if (json['localized_names'] != null) {
|
||||
localizedNames = new List<LocalizedNames>();
|
||||
json['localized_names'].forEach((v) {
|
||||
localizedNames.add(new LocalizedNames.fromJson(v));
|
||||
});
|
||||
}
|
||||
shortDescription = json['short_description'];
|
||||
shortDescriptionn = 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'];
|
||||
metaDescription = json['meta_description'];
|
||||
metaTitle = 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'];
|
||||
oldPrice = json['old_price'];
|
||||
productCost = json['product_cost'];
|
||||
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'];
|
||||
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 = json['created_on_utc'];
|
||||
updatedOnUtc = json['updated_on_utc'];
|
||||
productType = json['product_type'];
|
||||
parentGroupedProductId = json['parent_grouped_product_id'];
|
||||
|
||||
manufacturerIds = json['manufacturer_ids'].cast<int>();
|
||||
|
||||
if (json['specifications'] != null) {
|
||||
specifications = new List<Specifications>();
|
||||
json['specifications'].forEach((v) {
|
||||
specifications.add(new Specifications.fromJson(v));
|
||||
});
|
||||
}
|
||||
|
||||
vendorId = json['vendor_id'];
|
||||
seName = json['se_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['visible_individually'] = this.visibleIndividually;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['short_description'] = this.shortDescription;
|
||||
data['short_descriptionn'] = this.shortDescriptionn;
|
||||
data['full_description'] = this.fullDescription;
|
||||
data['full_descriptionn'] = this.fullDescriptionn;
|
||||
data['markas_new'] = this.markasNew;
|
||||
data['show_on_home_page'] = this.showOnHomePage;
|
||||
data['meta_keywords'] = this.metaKeywords;
|
||||
data['meta_description'] = this.metaDescription;
|
||||
data['meta_title'] = this.metaTitle;
|
||||
data['allow_customer_reviews'] = this.allowCustomerReviews;
|
||||
data['approved_rating_sum'] = this.approvedRatingSum;
|
||||
data['not_approved_rating_sum'] = this.notApprovedRatingSum;
|
||||
data['approved_total_reviews'] = this.approvedTotalReviews;
|
||||
data['not_approved_total_reviews'] = this.notApprovedTotalReviews;
|
||||
data['sku'] = this.sku;
|
||||
data['is_rx'] = this.isRx;
|
||||
data['prescription_required'] = this.prescriptionRequired;
|
||||
data['rx_message'] = this.rxMessage;
|
||||
data['rx_messagen'] = this.rxMessagen;
|
||||
data['manufacturer_part_number'] = this.manufacturerPartNumber;
|
||||
data['gtin'] = this.gtin;
|
||||
data['is_gift_card'] = this.isGiftCard;
|
||||
data['require_other_products'] = this.requireOtherProducts;
|
||||
data['automatically_add_required_products'] =
|
||||
this.automaticallyAddRequiredProducts;
|
||||
data['is_download'] = this.isDownload;
|
||||
data['unlimited_downloads'] = this.unlimitedDownloads;
|
||||
data['max_number_of_downloads'] = this.maxNumberOfDownloads;
|
||||
data['download_expiration_days'] = this.downloadExpirationDays;
|
||||
data['has_sample_download'] = this.hasSampleDownload;
|
||||
data['has_user_agreement'] = this.hasUserAgreement;
|
||||
data['is_recurring'] = this.isRecurring;
|
||||
data['recurring_cycle_length'] = this.recurringCycleLength;
|
||||
data['recurring_total_cycles'] = this.recurringTotalCycles;
|
||||
data['is_rental'] = this.isRental;
|
||||
data['rental_price_length'] = this.rentalPriceLength;
|
||||
data['is_ship_enabled'] = this.isShipEnabled;
|
||||
data['is_free_shipping'] = this.isFreeShipping;
|
||||
data['ship_separately'] = this.shipSeparately;
|
||||
data['additional_shipping_charge'] = this.additionalShippingCharge;
|
||||
data['is_tax_exempt'] = this.isTaxExempt;
|
||||
data['is_telecommunications_or_broadcasting_or_electronic_services'] =
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
data['use_multiple_warehouses'] = this.useMultipleWarehouses;
|
||||
data['manage_inventory_method_id'] = this.manageInventoryMethodId;
|
||||
data['stock_quantity'] = this.stockQuantity;
|
||||
data['stock_availability'] = this.stockAvailability;
|
||||
data['stock_availabilityn'] = this.stockAvailabilityn;
|
||||
data['display_stock_availability'] = this.displayStockAvailability;
|
||||
data['display_stock_quantity'] = this.displayStockQuantity;
|
||||
data['min_stock_quantity'] = this.minStockQuantity;
|
||||
data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow;
|
||||
data['allow_back_in_stock_subscriptions'] =
|
||||
this.allowBackInStockSubscriptions;
|
||||
data['order_minimum_quantity'] = this.orderMinimumQuantity;
|
||||
data['order_maximum_quantity'] = this.orderMaximumQuantity;
|
||||
data['allowed_quantities'] = this.allowedQuantities;
|
||||
data['allow_adding_only_existing_attribute_combinations'] =
|
||||
this.allowAddingOnlyExistingAttributeCombinations;
|
||||
data['disable_buy_button'] = this.disableBuyButton;
|
||||
data['disable_wishlist_button'] = this.disableWishlistButton;
|
||||
data['available_for_pre_order'] = this.availableForPreOrder;
|
||||
data['pre_order_availability_start_date_time_utc'] =
|
||||
this.preOrderAvailabilityStartDateTimeUtc;
|
||||
data['call_for_price'] = this.callForPrice;
|
||||
data['price'] = this.price;
|
||||
data['old_price'] = this.oldPrice;
|
||||
data['product_cost'] = this.productCost;
|
||||
data['special_price'] = this.specialPrice;
|
||||
data['special_price_start_date_time_utc'] =
|
||||
this.specialPriceStartDateTimeUtc;
|
||||
data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
|
||||
data['customer_enters_price'] = this.customerEntersPrice;
|
||||
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
|
||||
data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice;
|
||||
data['baseprice_enabled'] = this.basepriceEnabled;
|
||||
data['baseprice_amount'] = this.basepriceAmount;
|
||||
data['baseprice_base_amount'] = this.basepriceBaseAmount;
|
||||
data['has_tier_prices'] = this.hasTierPrices;
|
||||
data['has_discounts_applied'] = this.hasDiscountsApplied;
|
||||
data['discount_name'] = this.discountName;
|
||||
data['discount_namen'] = this.discountNamen;
|
||||
data['discount_description'] = this.discountDescription;
|
||||
data['discount_Descriptionn'] = this.discountDescriptionn;
|
||||
data['discount_percentage'] = this.discountPercentage;
|
||||
data['currency'] = this.currency;
|
||||
data['currencyn'] = this.currencyn;
|
||||
data['weight'] = this.weight;
|
||||
data['length'] = this.length;
|
||||
data['width'] = this.width;
|
||||
data['height'] = this.height;
|
||||
data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
|
||||
data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['published'] = this.published;
|
||||
data['deleted'] = this.deleted;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['updated_on_utc'] = this.updatedOnUtc;
|
||||
data['product_type'] = this.productType;
|
||||
data['parent_grouped_product_id'] = this.parentGroupedProductId;
|
||||
|
||||
data['manufacturer_ids'] = this.manufacturerIds;
|
||||
|
||||
if (this.images != null) {
|
||||
data['images'] = this.images.map((v) => v.toJson()).toList();
|
||||
}
|
||||
|
||||
if (this.specifications != null) {
|
||||
data['specifications'] =
|
||||
this.specifications.map((v) => v.toJson()).toList();
|
||||
}
|
||||
|
||||
data['vendor_id'] = this.vendorId;
|
||||
data['se_name'] = this.seName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Images {
|
||||
int id;
|
||||
int position;
|
||||
String src;
|
||||
String thumb;
|
||||
String attachment;
|
||||
|
||||
Images({this.id, this.position, this.src, this.thumb, this.attachment});
|
||||
|
||||
Images.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
position = json['position'];
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['position'] = this.position;
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Specifications {
|
||||
int id;
|
||||
int displayOrder;
|
||||
String defaultValue;
|
||||
String defaultValuen;
|
||||
String name;
|
||||
String nameN;
|
||||
|
||||
Specifications(
|
||||
{this.id,
|
||||
this.displayOrder,
|
||||
this.defaultValue,
|
||||
this.defaultValuen,
|
||||
this.name,
|
||||
this.nameN});
|
||||
|
||||
Specifications.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
displayOrder = json['display_order'];
|
||||
defaultValue = json['default_value'];
|
||||
defaultValuen = json['default_valuen'];
|
||||
name = json['name'];
|
||||
nameN = json['nameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['default_value'] = this.defaultValue;
|
||||
data['default_valuen'] = this.defaultValuen;
|
||||
data['name'] = this.name;
|
||||
data['nameN'] = this.nameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
class PharmacyCategorise {
|
||||
dynamic id;
|
||||
String name;
|
||||
dynamic namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
dynamic description;
|
||||
dynamic parentCategoryId;
|
||||
dynamic displayOrder;
|
||||
dynamic image;
|
||||
dynamic isLeaf;
|
||||
|
||||
PharmacyCategorise(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.description,
|
||||
this.parentCategoryId,
|
||||
this.displayOrder,
|
||||
this.image,
|
||||
this.isLeaf});
|
||||
|
||||
PharmacyCategorise.fromJson(Map<String, dynamic> json) {
|
||||
try {
|
||||
id = json['id'];
|
||||
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));
|
||||
});
|
||||
}
|
||||
description = json['description'];
|
||||
parentCategoryId = json['parent_category_id'];
|
||||
displayOrder = json['display_order'];
|
||||
image = json['image'] != null ? new Image.fromJson(json['image']) : null;
|
||||
isLeaf = json['is_leaf'];
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['description'] = this.description;
|
||||
data['parent_category_id'] = this.parentCategoryId;
|
||||
data['display_order'] = this.displayOrder;
|
||||
if (this.image != null) {
|
||||
data['image'] = this.image.toJson();
|
||||
}
|
||||
data['is_leaf'] = this.isLeaf;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Image {
|
||||
String src;
|
||||
Null thumb;
|
||||
Null attachment;
|
||||
|
||||
Image({this.src, this.thumb, this.attachment});
|
||||
|
||||
Image.fromJson(Map<String, dynamic> json) {
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,584 @@
|
||||
class ScanQrModel {
|
||||
String id;
|
||||
bool visibleIndividually;
|
||||
String name;
|
||||
String namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
String shortDescription;
|
||||
String shortDescriptionn;
|
||||
String fullDescription;
|
||||
String fullDescriptionn;
|
||||
bool markasNew;
|
||||
bool showOnHomePage;
|
||||
dynamic metaKeywords;
|
||||
dynamic metaDescription;
|
||||
dynamic metaTitle;
|
||||
bool allowCustomerReviews;
|
||||
dynamic approvedRatingSum;
|
||||
dynamic notApprovedRatingSum;
|
||||
dynamic approvedTotalReviews;
|
||||
dynamic notApprovedTotalReviews;
|
||||
String sku;
|
||||
bool isRx;
|
||||
bool prescriptionRequired;
|
||||
dynamic rxMessage;
|
||||
dynamic rxMessagen;
|
||||
dynamic manufacturerPartNumber;
|
||||
dynamic gtin;
|
||||
bool isGiftCard;
|
||||
bool requireOtherProducts;
|
||||
bool automaticallyAddRequiredProducts;
|
||||
bool isDownload;
|
||||
bool unlimitedDownloads;
|
||||
dynamic maxNumberOfDownloads;
|
||||
dynamic downloadExpirationDays;
|
||||
bool hasSampleDownload;
|
||||
bool hasUserAgreement;
|
||||
bool isRecurring;
|
||||
dynamic recurringCycleLength;
|
||||
dynamic recurringTotalCycles;
|
||||
bool isRental;
|
||||
dynamic rentalPriceLength;
|
||||
bool isShipEnabled;
|
||||
bool isFreeShipping;
|
||||
bool shipSeparately;
|
||||
dynamic additionalShippingCharge;
|
||||
bool isTaxExempt;
|
||||
bool isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
bool useMultipleWarehouses;
|
||||
dynamic manageInventoryMethodId;
|
||||
dynamic stockQuantity;
|
||||
String stockAvailability;
|
||||
String stockAvailabilityn;
|
||||
bool displayStockAvailability;
|
||||
bool displayStockQuantity;
|
||||
dynamic minStockQuantity;
|
||||
dynamic notifyAdminForQuantityBelow;
|
||||
bool allowBackInStockSubscriptions;
|
||||
dynamic orderMinimumQuantity;
|
||||
dynamic orderMaximumQuantity;
|
||||
dynamic allowedQuantities;
|
||||
bool allowAddingOnlyExistingAttributeCombinations;
|
||||
bool disableBuyButton;
|
||||
bool disableWishlistButton;
|
||||
bool availableForPreOrder;
|
||||
dynamic preOrderAvailabilityStartDateTimeUtc;
|
||||
bool callForPrice;
|
||||
dynamic price;
|
||||
dynamic oldPrice;
|
||||
dynamic productCost;
|
||||
dynamic specialPrice;
|
||||
dynamic specialPriceStartDateTimeUtc;
|
||||
dynamic specialPriceEndDateTimeUtc;
|
||||
bool customerEntersPrice;
|
||||
dynamic minimumCustomerEnteredPrice;
|
||||
dynamic maximumCustomerEnteredPrice;
|
||||
bool basepriceEnabled;
|
||||
dynamic basepriceAmount;
|
||||
dynamic basepriceBaseAmount;
|
||||
bool hasTierPrices;
|
||||
bool hasDiscountsApplied;
|
||||
dynamic discountName;
|
||||
dynamic discountNamen;
|
||||
dynamic discountDescription;
|
||||
dynamic discountDescriptionn;
|
||||
dynamic discountPercentage;
|
||||
String currency;
|
||||
String currencyn;
|
||||
double weight;
|
||||
dynamic length;
|
||||
dynamic width;
|
||||
dynamic height;
|
||||
dynamic availableStartDateTimeUtc;
|
||||
dynamic availableEndDateTimeUtc;
|
||||
dynamic displayOrder;
|
||||
bool published;
|
||||
bool deleted;
|
||||
String createdOnUtc;
|
||||
String updatedOnUtc;
|
||||
String productType;
|
||||
dynamic parentGroupedProductId;
|
||||
List<dynamic> roleIds;
|
||||
List<dynamic> discountIds;
|
||||
List<dynamic> storeIds;
|
||||
List<dynamic> manufacturerIds;
|
||||
List<dynamic> reviews;
|
||||
List<Images> images;
|
||||
List<dynamic> attributes;
|
||||
List<Specifications> specifications;
|
||||
List<dynamic> associatedProductIds;
|
||||
List<dynamic> tags;
|
||||
dynamic vendorId;
|
||||
String seName;
|
||||
|
||||
ScanQrModel(
|
||||
{this.id,
|
||||
this.visibleIndividually,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.shortDescription,
|
||||
this.shortDescriptionn,
|
||||
this.fullDescription,
|
||||
this.fullDescriptionn,
|
||||
this.markasNew,
|
||||
this.showOnHomePage,
|
||||
this.metaKeywords,
|
||||
this.metaDescription,
|
||||
this.metaTitle,
|
||||
this.allowCustomerReviews,
|
||||
this.approvedRatingSum,
|
||||
this.notApprovedRatingSum,
|
||||
this.approvedTotalReviews,
|
||||
this.notApprovedTotalReviews,
|
||||
this.sku,
|
||||
this.isRx,
|
||||
this.prescriptionRequired,
|
||||
this.rxMessage,
|
||||
this.rxMessagen,
|
||||
this.manufacturerPartNumber,
|
||||
this.gtin,
|
||||
this.isGiftCard,
|
||||
this.requireOtherProducts,
|
||||
this.automaticallyAddRequiredProducts,
|
||||
this.isDownload,
|
||||
this.unlimitedDownloads,
|
||||
this.maxNumberOfDownloads,
|
||||
this.downloadExpirationDays,
|
||||
this.hasSampleDownload,
|
||||
this.hasUserAgreement,
|
||||
this.isRecurring,
|
||||
this.recurringCycleLength,
|
||||
this.recurringTotalCycles,
|
||||
this.isRental,
|
||||
this.rentalPriceLength,
|
||||
this.isShipEnabled,
|
||||
this.isFreeShipping,
|
||||
this.shipSeparately,
|
||||
this.additionalShippingCharge,
|
||||
this.isTaxExempt,
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
|
||||
this.useMultipleWarehouses,
|
||||
this.manageInventoryMethodId,
|
||||
this.stockQuantity,
|
||||
this.stockAvailability,
|
||||
this.stockAvailabilityn,
|
||||
this.displayStockAvailability,
|
||||
this.displayStockQuantity,
|
||||
this.minStockQuantity,
|
||||
this.notifyAdminForQuantityBelow,
|
||||
this.allowBackInStockSubscriptions,
|
||||
this.orderMinimumQuantity,
|
||||
this.orderMaximumQuantity,
|
||||
this.allowedQuantities,
|
||||
this.allowAddingOnlyExistingAttributeCombinations,
|
||||
this.disableBuyButton,
|
||||
this.disableWishlistButton,
|
||||
this.availableForPreOrder,
|
||||
this.preOrderAvailabilityStartDateTimeUtc,
|
||||
this.callForPrice,
|
||||
this.price,
|
||||
this.oldPrice,
|
||||
this.productCost,
|
||||
this.specialPrice,
|
||||
this.specialPriceStartDateTimeUtc,
|
||||
this.specialPriceEndDateTimeUtc,
|
||||
this.customerEntersPrice,
|
||||
this.minimumCustomerEnteredPrice,
|
||||
this.maximumCustomerEnteredPrice,
|
||||
this.basepriceEnabled,
|
||||
this.basepriceAmount,
|
||||
this.basepriceBaseAmount,
|
||||
this.hasTierPrices,
|
||||
this.hasDiscountsApplied,
|
||||
this.discountName,
|
||||
this.discountNamen,
|
||||
this.discountDescription,
|
||||
this.discountDescriptionn,
|
||||
this.discountPercentage,
|
||||
this.currency,
|
||||
this.currencyn,
|
||||
this.weight,
|
||||
this.length,
|
||||
this.width,
|
||||
this.height,
|
||||
this.availableStartDateTimeUtc,
|
||||
this.availableEndDateTimeUtc,
|
||||
this.displayOrder,
|
||||
this.published,
|
||||
this.deleted,
|
||||
this.createdOnUtc,
|
||||
this.updatedOnUtc,
|
||||
this.productType,
|
||||
this.parentGroupedProductId,
|
||||
this.roleIds,
|
||||
this.discountIds,
|
||||
this.storeIds,
|
||||
this.manufacturerIds,
|
||||
this.reviews,
|
||||
this.images,
|
||||
this.attributes,
|
||||
this.specifications,
|
||||
this.associatedProductIds,
|
||||
this.tags,
|
||||
this.vendorId,
|
||||
this.seName});
|
||||
|
||||
ScanQrModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
visibleIndividually = json['visible_individually'];
|
||||
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));
|
||||
});
|
||||
}
|
||||
shortDescription = json['short_description'];
|
||||
shortDescriptionn = 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'];
|
||||
metaDescription = json['meta_description'];
|
||||
metaTitle = 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'];
|
||||
oldPrice = json['old_price'];
|
||||
productCost = json['product_cost'];
|
||||
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'];
|
||||
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 = json['created_on_utc'];
|
||||
updatedOnUtc = json['updated_on_utc'];
|
||||
productType = json['product_type'];
|
||||
parentGroupedProductId = json['parent_grouped_product_id'];
|
||||
if (json['role_ids'] != null) {
|
||||
roleIds = new List<Null>();
|
||||
}
|
||||
if (json['discount_ids'] != null) {
|
||||
discountIds = new List<Null>();
|
||||
}
|
||||
if (json['store_ids'] != null) {
|
||||
storeIds = new List<Null>();
|
||||
}
|
||||
manufacturerIds = json['manufacturer_ids'].cast<int>();
|
||||
if (json['reviews'] != null) {
|
||||
reviews = new List<Null>();
|
||||
}
|
||||
if (json['images'] != null) {
|
||||
images = new List<Images>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new Images.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['attributes'] != null) {
|
||||
attributes = new List<Null>();
|
||||
}
|
||||
if (json['specifications'] != null) {
|
||||
specifications = new List<Specifications>();
|
||||
json['specifications'].forEach((v) {
|
||||
specifications.add(new Specifications.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['associated_product_ids'] != null) {
|
||||
associatedProductIds = new List<Null>();
|
||||
}
|
||||
if (json['tags'] != null) {
|
||||
tags = new List<Null>();
|
||||
}
|
||||
vendorId = json['vendor_id'];
|
||||
seName = json['se_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['visible_individually'] = this.visibleIndividually;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['short_description'] = this.shortDescription;
|
||||
data['short_descriptionn'] = this.shortDescriptionn;
|
||||
data['full_description'] = this.fullDescription;
|
||||
data['full_descriptionn'] = this.fullDescriptionn;
|
||||
data['markas_new'] = this.markasNew;
|
||||
data['show_on_home_page'] = this.showOnHomePage;
|
||||
data['meta_keywords'] = this.metaKeywords;
|
||||
data['meta_description'] = this.metaDescription;
|
||||
data['meta_title'] = this.metaTitle;
|
||||
data['allow_customer_reviews'] = this.allowCustomerReviews;
|
||||
data['approved_rating_sum'] = this.approvedRatingSum;
|
||||
data['not_approved_rating_sum'] = this.notApprovedRatingSum;
|
||||
data['approved_total_reviews'] = this.approvedTotalReviews;
|
||||
data['not_approved_total_reviews'] = this.notApprovedTotalReviews;
|
||||
data['sku'] = this.sku;
|
||||
data['is_rx'] = this.isRx;
|
||||
data['prescription_required'] = this.prescriptionRequired;
|
||||
data['rx_message'] = this.rxMessage;
|
||||
data['rx_messagen'] = this.rxMessagen;
|
||||
data['manufacturer_part_number'] = this.manufacturerPartNumber;
|
||||
data['gtin'] = this.gtin;
|
||||
data['is_gift_card'] = this.isGiftCard;
|
||||
data['require_other_products'] = this.requireOtherProducts;
|
||||
data['automatically_add_required_products'] =
|
||||
this.automaticallyAddRequiredProducts;
|
||||
data['is_download'] = this.isDownload;
|
||||
data['unlimited_downloads'] = this.unlimitedDownloads;
|
||||
data['max_number_of_downloads'] = this.maxNumberOfDownloads;
|
||||
data['download_expiration_days'] = this.downloadExpirationDays;
|
||||
data['has_sample_download'] = this.hasSampleDownload;
|
||||
data['has_user_agreement'] = this.hasUserAgreement;
|
||||
data['is_recurring'] = this.isRecurring;
|
||||
data['recurring_cycle_length'] = this.recurringCycleLength;
|
||||
data['recurring_total_cycles'] = this.recurringTotalCycles;
|
||||
data['is_rental'] = this.isRental;
|
||||
data['rental_price_length'] = this.rentalPriceLength;
|
||||
data['is_ship_enabled'] = this.isShipEnabled;
|
||||
data['is_free_shipping'] = this.isFreeShipping;
|
||||
data['ship_separately'] = this.shipSeparately;
|
||||
data['additional_shipping_charge'] = this.additionalShippingCharge;
|
||||
data['is_tax_exempt'] = this.isTaxExempt;
|
||||
data['is_telecommunications_or_broadcasting_or_electronic_services'] =
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
data['use_multiple_warehouses'] = this.useMultipleWarehouses;
|
||||
data['manage_inventory_method_id'] = this.manageInventoryMethodId;
|
||||
data['stock_quantity'] = this.stockQuantity;
|
||||
data['stock_availability'] = this.stockAvailability;
|
||||
data['stock_availabilityn'] = this.stockAvailabilityn;
|
||||
data['display_stock_availability'] = this.displayStockAvailability;
|
||||
data['display_stock_quantity'] = this.displayStockQuantity;
|
||||
data['min_stock_quantity'] = this.minStockQuantity;
|
||||
data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow;
|
||||
data['allow_back_in_stock_subscriptions'] =
|
||||
this.allowBackInStockSubscriptions;
|
||||
data['order_minimum_quantity'] = this.orderMinimumQuantity;
|
||||
data['order_maximum_quantity'] = this.orderMaximumQuantity;
|
||||
data['allowed_quantities'] = this.allowedQuantities;
|
||||
data['allow_adding_only_existing_attribute_combinations'] =
|
||||
this.allowAddingOnlyExistingAttributeCombinations;
|
||||
data['disable_buy_button'] = this.disableBuyButton;
|
||||
data['disable_wishlist_button'] = this.disableWishlistButton;
|
||||
data['available_for_pre_order'] = this.availableForPreOrder;
|
||||
data['pre_order_availability_start_date_time_utc'] =
|
||||
this.preOrderAvailabilityStartDateTimeUtc;
|
||||
data['call_for_price'] = this.callForPrice;
|
||||
data['price'] = this.price;
|
||||
data['old_price'] = this.oldPrice;
|
||||
data['product_cost'] = this.productCost;
|
||||
data['special_price'] = this.specialPrice;
|
||||
data['special_price_start_date_time_utc'] =
|
||||
this.specialPriceStartDateTimeUtc;
|
||||
data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
|
||||
data['customer_enters_price'] = this.customerEntersPrice;
|
||||
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
|
||||
data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice;
|
||||
data['baseprice_enabled'] = this.basepriceEnabled;
|
||||
data['baseprice_amount'] = this.basepriceAmount;
|
||||
data['baseprice_base_amount'] = this.basepriceBaseAmount;
|
||||
data['has_tier_prices'] = this.hasTierPrices;
|
||||
data['has_discounts_applied'] = this.hasDiscountsApplied;
|
||||
data['discount_name'] = this.discountName;
|
||||
data['discount_namen'] = this.discountNamen;
|
||||
data['discount_description'] = this.discountDescription;
|
||||
data['discount_Descriptionn'] = this.discountDescriptionn;
|
||||
data['discount_percentage'] = this.discountPercentage;
|
||||
data['currency'] = this.currency;
|
||||
data['currencyn'] = this.currencyn;
|
||||
data['weight'] = this.weight;
|
||||
data['length'] = this.length;
|
||||
data['width'] = this.width;
|
||||
data['height'] = this.height;
|
||||
data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
|
||||
data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['published'] = this.published;
|
||||
data['deleted'] = this.deleted;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['updated_on_utc'] = this.updatedOnUtc;
|
||||
data['product_type'] = this.productType;
|
||||
data['parent_grouped_product_id'] = this.parentGroupedProductId;
|
||||
|
||||
data['manufacturer_ids'] = this.manufacturerIds;
|
||||
|
||||
if (this.images != null) {
|
||||
data['images'] = this.images.map((v) => v.toJson()).toList();
|
||||
}
|
||||
|
||||
if (this.specifications != null) {
|
||||
data['specifications'] =
|
||||
this.specifications.map((v) => v.toJson()).toList();
|
||||
}
|
||||
|
||||
data['vendor_id'] = this.vendorId;
|
||||
data['se_name'] = this.seName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Images {
|
||||
int id;
|
||||
int position;
|
||||
String src;
|
||||
String thumb;
|
||||
String attachment;
|
||||
|
||||
Images({this.id, this.position, this.src, this.thumb, this.attachment});
|
||||
|
||||
Images.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
position = json['position'];
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['position'] = this.position;
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Specifications {
|
||||
int id;
|
||||
int displayOrder;
|
||||
String defaultValue;
|
||||
String defaultValuen;
|
||||
String name;
|
||||
String nameN;
|
||||
|
||||
Specifications(
|
||||
{this.id,
|
||||
this.displayOrder,
|
||||
this.defaultValue,
|
||||
this.defaultValuen,
|
||||
this.name,
|
||||
this.nameN});
|
||||
|
||||
Specifications.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
displayOrder = json['display_order'];
|
||||
defaultValue = json['default_value'];
|
||||
defaultValuen = json['default_valuen'];
|
||||
name = json['name'];
|
||||
nameN = json['nameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['default_value'] = this.defaultValue;
|
||||
data['default_valuen'] = this.defaultValuen;
|
||||
data['name'] = this.name;
|
||||
data['nameN'] = this.nameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
class SubCategoriesModel {
|
||||
String id;
|
||||
String name;
|
||||
String namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
String description;
|
||||
int parentCategoryId;
|
||||
int displayOrder;
|
||||
dynamic image;
|
||||
bool isLeaf;
|
||||
|
||||
SubCategoriesModel(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.description,
|
||||
this.parentCategoryId,
|
||||
this.displayOrder,
|
||||
this.image,
|
||||
this.isLeaf});
|
||||
|
||||
SubCategoriesModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
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));
|
||||
});
|
||||
}
|
||||
description = json['description'];
|
||||
parentCategoryId = json['parent_category_id'];
|
||||
displayOrder = json['display_order'];
|
||||
image = json['image'];
|
||||
isLeaf = json['is_leaf'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['description'] = this.description;
|
||||
data['parent_category_id'] = this.parentCategoryId;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['image'] = this.image;
|
||||
data['is_leaf'] = this.isLeaf;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,562 @@
|
||||
class SubProductsModel {
|
||||
String id;
|
||||
bool visibleIndividually;
|
||||
String name;
|
||||
String namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
String shortDescription;
|
||||
String shortDescriptionn;
|
||||
String fullDescription;
|
||||
String fullDescriptionn;
|
||||
bool markasNew;
|
||||
bool showOnHomePage;
|
||||
dynamic metaKeywords;
|
||||
dynamic metaDescription;
|
||||
dynamic metaTitle;
|
||||
bool allowCustomerReviews;
|
||||
dynamic approvedRatingSum;
|
||||
dynamic notApprovedRatingSum;
|
||||
dynamic approvedTotalReviews;
|
||||
dynamic notApprovedTotalReviews;
|
||||
String sku;
|
||||
bool isRx;
|
||||
bool prescriptionRequired;
|
||||
dynamic rxMessage;
|
||||
dynamic rxMessagen;
|
||||
dynamic manufacturerPartNumber;
|
||||
dynamic gtin;
|
||||
bool isGiftCard;
|
||||
bool requireOtherProducts;
|
||||
bool automaticallyAddRequiredProducts;
|
||||
bool isDownload;
|
||||
bool unlimitedDownloads;
|
||||
dynamic maxNumberOfDownloads;
|
||||
dynamic downloadExpirationDays;
|
||||
bool hasSampleDownload;
|
||||
bool hasUserAgreement;
|
||||
bool isRecurring;
|
||||
dynamic recurringCycleLength;
|
||||
dynamic recurringTotalCycles;
|
||||
bool isRental;
|
||||
dynamic rentalPriceLength;
|
||||
bool isShipEnabled;
|
||||
bool isFreeShipping;
|
||||
bool shipSeparately;
|
||||
dynamic additionalShippingCharge;
|
||||
bool isTaxExempt;
|
||||
bool isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
bool useMultipleWarehouses;
|
||||
dynamic manageInventoryMethodId;
|
||||
dynamic stockQuantity;
|
||||
String stockAvailability;
|
||||
String stockAvailabilityn;
|
||||
bool displayStockAvailability;
|
||||
bool displayStockQuantity;
|
||||
dynamic minStockQuantity;
|
||||
dynamic notifyAdminForQuantityBelow;
|
||||
bool allowBackInStockSubscriptions;
|
||||
dynamic orderMinimumQuantity;
|
||||
dynamic orderMaximumQuantity;
|
||||
dynamic allowedQuantities;
|
||||
bool allowAddingOnlyExistingAttributeCombinations;
|
||||
bool disableBuyButton;
|
||||
bool disableWishlistButton;
|
||||
bool availableForPreOrder;
|
||||
dynamic preOrderAvailabilityStartDateTimeUtc;
|
||||
bool callForPrice;
|
||||
dynamic price;
|
||||
dynamic oldPrice;
|
||||
dynamic productCost;
|
||||
dynamic specialPrice;
|
||||
dynamic specialPriceStartDateTimeUtc;
|
||||
dynamic specialPriceEndDateTimeUtc;
|
||||
bool customerEntersPrice;
|
||||
dynamic minimumCustomerEnteredPrice;
|
||||
dynamic maximumCustomerEnteredPrice;
|
||||
bool basepriceEnabled;
|
||||
dynamic basepriceAmount;
|
||||
dynamic basepriceBaseAmount;
|
||||
bool hasTierPrices;
|
||||
bool hasDiscountsApplied;
|
||||
dynamic discountName;
|
||||
dynamic discountNamen;
|
||||
dynamic discountDescription;
|
||||
dynamic discountDescriptionn;
|
||||
dynamic discountPercentage;
|
||||
String currency;
|
||||
String currencyn;
|
||||
double weight;
|
||||
dynamic length;
|
||||
dynamic width;
|
||||
dynamic height;
|
||||
dynamic availableStartDateTimeUtc;
|
||||
dynamic availableEndDateTimeUtc;
|
||||
dynamic displayOrder;
|
||||
bool published;
|
||||
bool deleted;
|
||||
String createdOnUtc;
|
||||
String updatedOnUtc;
|
||||
String productType;
|
||||
dynamic parentGroupedProductId;
|
||||
List<dynamic> roleIds;
|
||||
List<dynamic> discountIds;
|
||||
List<dynamic> storeIds;
|
||||
List<int> manufacturerIds;
|
||||
List<dynamic> reviews;
|
||||
List<Images> images;
|
||||
List<dynamic> attributes;
|
||||
List<Specifications> specifications;
|
||||
List<dynamic> associatedProductIds;
|
||||
List<dynamic> tags;
|
||||
dynamic vendorId;
|
||||
String seName;
|
||||
|
||||
SubProductsModel(
|
||||
{this.id,
|
||||
this.visibleIndividually,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.shortDescription,
|
||||
this.shortDescriptionn,
|
||||
this.fullDescription,
|
||||
this.fullDescriptionn,
|
||||
this.markasNew,
|
||||
this.showOnHomePage,
|
||||
this.metaKeywords,
|
||||
this.metaDescription,
|
||||
this.metaTitle,
|
||||
this.allowCustomerReviews,
|
||||
this.approvedRatingSum,
|
||||
this.notApprovedRatingSum,
|
||||
this.approvedTotalReviews,
|
||||
this.notApprovedTotalReviews,
|
||||
this.sku,
|
||||
this.isRx,
|
||||
this.prescriptionRequired,
|
||||
this.rxMessage,
|
||||
this.rxMessagen,
|
||||
this.manufacturerPartNumber,
|
||||
this.gtin,
|
||||
this.isGiftCard,
|
||||
this.requireOtherProducts,
|
||||
this.automaticallyAddRequiredProducts,
|
||||
this.isDownload,
|
||||
this.unlimitedDownloads,
|
||||
this.maxNumberOfDownloads,
|
||||
this.downloadExpirationDays,
|
||||
this.hasSampleDownload,
|
||||
this.hasUserAgreement,
|
||||
this.isRecurring,
|
||||
this.recurringCycleLength,
|
||||
this.recurringTotalCycles,
|
||||
this.isRental,
|
||||
this.rentalPriceLength,
|
||||
this.isShipEnabled,
|
||||
this.isFreeShipping,
|
||||
this.shipSeparately,
|
||||
this.additionalShippingCharge,
|
||||
this.isTaxExempt,
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
|
||||
this.useMultipleWarehouses,
|
||||
this.manageInventoryMethodId,
|
||||
this.stockQuantity,
|
||||
this.stockAvailability,
|
||||
this.stockAvailabilityn,
|
||||
this.displayStockAvailability,
|
||||
this.displayStockQuantity,
|
||||
this.minStockQuantity,
|
||||
this.notifyAdminForQuantityBelow,
|
||||
this.allowBackInStockSubscriptions,
|
||||
this.orderMinimumQuantity,
|
||||
this.orderMaximumQuantity,
|
||||
this.allowedQuantities,
|
||||
this.allowAddingOnlyExistingAttributeCombinations,
|
||||
this.disableBuyButton,
|
||||
this.disableWishlistButton,
|
||||
this.availableForPreOrder,
|
||||
this.preOrderAvailabilityStartDateTimeUtc,
|
||||
this.callForPrice,
|
||||
this.price,
|
||||
this.oldPrice,
|
||||
this.productCost,
|
||||
this.specialPrice,
|
||||
this.specialPriceStartDateTimeUtc,
|
||||
this.specialPriceEndDateTimeUtc,
|
||||
this.customerEntersPrice,
|
||||
this.minimumCustomerEnteredPrice,
|
||||
this.maximumCustomerEnteredPrice,
|
||||
this.basepriceEnabled,
|
||||
this.basepriceAmount,
|
||||
this.basepriceBaseAmount,
|
||||
this.hasTierPrices,
|
||||
this.hasDiscountsApplied,
|
||||
this.discountName,
|
||||
this.discountNamen,
|
||||
this.discountDescription,
|
||||
this.discountDescriptionn,
|
||||
this.discountPercentage,
|
||||
this.currency,
|
||||
this.currencyn,
|
||||
this.weight,
|
||||
this.length,
|
||||
this.width,
|
||||
this.height,
|
||||
this.availableStartDateTimeUtc,
|
||||
this.availableEndDateTimeUtc,
|
||||
this.displayOrder,
|
||||
this.published,
|
||||
this.deleted,
|
||||
this.createdOnUtc,
|
||||
this.updatedOnUtc,
|
||||
this.productType,
|
||||
this.parentGroupedProductId,
|
||||
this.roleIds,
|
||||
this.discountIds,
|
||||
this.storeIds,
|
||||
this.manufacturerIds,
|
||||
this.reviews,
|
||||
this.images,
|
||||
this.attributes,
|
||||
this.specifications,
|
||||
this.associatedProductIds,
|
||||
this.tags,
|
||||
this.vendorId,
|
||||
this.seName});
|
||||
|
||||
SubProductsModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
visibleIndividually = json['visible_individually'];
|
||||
name = json['name'];
|
||||
if (json['images'] != null) {
|
||||
images = new List<Images>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new Images.fromJson(v));
|
||||
});
|
||||
}
|
||||
namen = json['namen'];
|
||||
if (json['localized_names'] != null) {
|
||||
localizedNames = new List<LocalizedNames>();
|
||||
json['localized_names'].forEach((v) {
|
||||
localizedNames.add(new LocalizedNames.fromJson(v));
|
||||
});
|
||||
}
|
||||
shortDescription = json['short_description'];
|
||||
shortDescriptionn = 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'];
|
||||
metaDescription = json['meta_description'];
|
||||
metaTitle = 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'];
|
||||
oldPrice = json['old_price'];
|
||||
productCost = json['product_cost'];
|
||||
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'];
|
||||
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 = json['created_on_utc'];
|
||||
updatedOnUtc = json['updated_on_utc'];
|
||||
productType = json['product_type'];
|
||||
parentGroupedProductId = json['parent_grouped_product_id'];
|
||||
|
||||
manufacturerIds = json['manufacturer_ids'].cast<int>();
|
||||
|
||||
if (json['specifications'] != null) {
|
||||
specifications = new List<Specifications>();
|
||||
json['specifications'].forEach((v) {
|
||||
specifications.add(new Specifications.fromJson(v));
|
||||
});
|
||||
}
|
||||
|
||||
vendorId = json['vendor_id'];
|
||||
seName = json['se_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['visible_individually'] = this.visibleIndividually;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['short_description'] = this.shortDescription;
|
||||
data['short_descriptionn'] = this.shortDescriptionn;
|
||||
data['full_description'] = this.fullDescription;
|
||||
data['full_descriptionn'] = this.fullDescriptionn;
|
||||
data['markas_new'] = this.markasNew;
|
||||
data['show_on_home_page'] = this.showOnHomePage;
|
||||
data['meta_keywords'] = this.metaKeywords;
|
||||
data['meta_description'] = this.metaDescription;
|
||||
data['meta_title'] = this.metaTitle;
|
||||
data['allow_customer_reviews'] = this.allowCustomerReviews;
|
||||
data['approved_rating_sum'] = this.approvedRatingSum;
|
||||
data['not_approved_rating_sum'] = this.notApprovedRatingSum;
|
||||
data['approved_total_reviews'] = this.approvedTotalReviews;
|
||||
data['not_approved_total_reviews'] = this.notApprovedTotalReviews;
|
||||
data['sku'] = this.sku;
|
||||
data['is_rx'] = this.isRx;
|
||||
data['prescription_required'] = this.prescriptionRequired;
|
||||
data['rx_message'] = this.rxMessage;
|
||||
data['rx_messagen'] = this.rxMessagen;
|
||||
data['manufacturer_part_number'] = this.manufacturerPartNumber;
|
||||
data['gtin'] = this.gtin;
|
||||
data['is_gift_card'] = this.isGiftCard;
|
||||
data['require_other_products'] = this.requireOtherProducts;
|
||||
data['automatically_add_required_products'] =
|
||||
this.automaticallyAddRequiredProducts;
|
||||
data['is_download'] = this.isDownload;
|
||||
data['unlimited_downloads'] = this.unlimitedDownloads;
|
||||
data['max_number_of_downloads'] = this.maxNumberOfDownloads;
|
||||
data['download_expiration_days'] = this.downloadExpirationDays;
|
||||
data['has_sample_download'] = this.hasSampleDownload;
|
||||
data['has_user_agreement'] = this.hasUserAgreement;
|
||||
data['is_recurring'] = this.isRecurring;
|
||||
data['recurring_cycle_length'] = this.recurringCycleLength;
|
||||
data['recurring_total_cycles'] = this.recurringTotalCycles;
|
||||
data['is_rental'] = this.isRental;
|
||||
data['rental_price_length'] = this.rentalPriceLength;
|
||||
data['is_ship_enabled'] = this.isShipEnabled;
|
||||
data['is_free_shipping'] = this.isFreeShipping;
|
||||
data['ship_separately'] = this.shipSeparately;
|
||||
data['additional_shipping_charge'] = this.additionalShippingCharge;
|
||||
data['is_tax_exempt'] = this.isTaxExempt;
|
||||
data['is_telecommunications_or_broadcasting_or_electronic_services'] =
|
||||
this.isTelecommunicationsOrBroadcastingOrElectronicServices;
|
||||
data['use_multiple_warehouses'] = this.useMultipleWarehouses;
|
||||
data['manage_inventory_method_id'] = this.manageInventoryMethodId;
|
||||
data['stock_quantity'] = this.stockQuantity;
|
||||
data['stock_availability'] = this.stockAvailability;
|
||||
data['stock_availabilityn'] = this.stockAvailabilityn;
|
||||
data['display_stock_availability'] = this.displayStockAvailability;
|
||||
data['display_stock_quantity'] = this.displayStockQuantity;
|
||||
data['min_stock_quantity'] = this.minStockQuantity;
|
||||
data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow;
|
||||
data['allow_back_in_stock_subscriptions'] =
|
||||
this.allowBackInStockSubscriptions;
|
||||
data['order_minimum_quantity'] = this.orderMinimumQuantity;
|
||||
data['order_maximum_quantity'] = this.orderMaximumQuantity;
|
||||
data['allowed_quantities'] = this.allowedQuantities;
|
||||
data['allow_adding_only_existing_attribute_combinations'] =
|
||||
this.allowAddingOnlyExistingAttributeCombinations;
|
||||
data['disable_buy_button'] = this.disableBuyButton;
|
||||
data['disable_wishlist_button'] = this.disableWishlistButton;
|
||||
data['available_for_pre_order'] = this.availableForPreOrder;
|
||||
data['pre_order_availability_start_date_time_utc'] =
|
||||
this.preOrderAvailabilityStartDateTimeUtc;
|
||||
data['call_for_price'] = this.callForPrice;
|
||||
data['price'] = this.price;
|
||||
data['old_price'] = this.oldPrice;
|
||||
data['product_cost'] = this.productCost;
|
||||
data['special_price'] = this.specialPrice;
|
||||
data['special_price_start_date_time_utc'] =
|
||||
this.specialPriceStartDateTimeUtc;
|
||||
data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
|
||||
data['customer_enters_price'] = this.customerEntersPrice;
|
||||
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
|
||||
data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice;
|
||||
data['baseprice_enabled'] = this.basepriceEnabled;
|
||||
data['baseprice_amount'] = this.basepriceAmount;
|
||||
data['baseprice_base_amount'] = this.basepriceBaseAmount;
|
||||
data['has_tier_prices'] = this.hasTierPrices;
|
||||
data['has_discounts_applied'] = this.hasDiscountsApplied;
|
||||
data['discount_name'] = this.discountName;
|
||||
data['discount_namen'] = this.discountNamen;
|
||||
data['discount_description'] = this.discountDescription;
|
||||
data['discount_Descriptionn'] = this.discountDescriptionn;
|
||||
data['discount_percentage'] = this.discountPercentage;
|
||||
data['currency'] = this.currency;
|
||||
data['currencyn'] = this.currencyn;
|
||||
data['weight'] = this.weight;
|
||||
data['length'] = this.length;
|
||||
data['width'] = this.width;
|
||||
data['height'] = this.height;
|
||||
data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
|
||||
data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['published'] = this.published;
|
||||
data['deleted'] = this.deleted;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['updated_on_utc'] = this.updatedOnUtc;
|
||||
data['product_type'] = this.productType;
|
||||
data['parent_grouped_product_id'] = this.parentGroupedProductId;
|
||||
|
||||
data['manufacturer_ids'] = this.manufacturerIds;
|
||||
|
||||
if (this.specifications != null) {
|
||||
data['specifications'] =
|
||||
this.specifications.map((v) => v.toJson()).toList();
|
||||
}
|
||||
|
||||
data['vendor_id'] = this.vendorId;
|
||||
data['se_name'] = this.seName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Images {
|
||||
int id;
|
||||
int position;
|
||||
String src;
|
||||
String thumb;
|
||||
String attachment;
|
||||
|
||||
Images({this.id, this.position, this.src, this.thumb, this.attachment});
|
||||
|
||||
Images.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
position = json['position'];
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['position'] = this.position;
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Specifications {
|
||||
int id;
|
||||
int displayOrder;
|
||||
String defaultValue;
|
||||
String defaultValuen;
|
||||
String name;
|
||||
String nameN;
|
||||
|
||||
Specifications(
|
||||
{this.id,
|
||||
this.displayOrder,
|
||||
this.defaultValue,
|
||||
this.defaultValuen,
|
||||
this.name,
|
||||
this.nameN});
|
||||
|
||||
Specifications.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
displayOrder = json['display_order'];
|
||||
defaultValue = json['default_value'];
|
||||
defaultValuen = json['default_valuen'];
|
||||
name = json['name'];
|
||||
nameN = json['nameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['display_order'] = this.displayOrder;
|
||||
data['default_value'] = this.defaultValue;
|
||||
data['default_valuen'] = this.defaultValuen;
|
||||
data['name'] = this.name;
|
||||
data['nameN'] = this.nameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,185 @@
|
||||
class SearchProductsModel {
|
||||
String id;
|
||||
String name;
|
||||
String namen;
|
||||
List<LocalizedNames> localizedNames;
|
||||
String shortDescription;
|
||||
String fullDescription;
|
||||
String fullDescriptionn;
|
||||
dynamic approvedRatingSum;
|
||||
dynamic approvedTotalReviews;
|
||||
String sku;
|
||||
bool isRx;
|
||||
dynamic rxMessage;
|
||||
dynamic rxMessagen;
|
||||
dynamic stockQuantity;
|
||||
String stockAvailability;
|
||||
String stockAvailabilityn;
|
||||
bool allowBackInStockSubscriptions;
|
||||
dynamic orderMinimumQuantity;
|
||||
dynamic orderMaximumQuantity;
|
||||
double price;
|
||||
dynamic oldPrice;
|
||||
dynamic discountName;
|
||||
dynamic discountNamen;
|
||||
dynamic discountPercentage;
|
||||
dynamic displayOrder;
|
||||
List<dynamic> discountIds;
|
||||
List<dynamic> reviews;
|
||||
List<Images> images;
|
||||
|
||||
SearchProductsModel(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.namen,
|
||||
this.localizedNames,
|
||||
this.shortDescription,
|
||||
this.fullDescription,
|
||||
this.fullDescriptionn,
|
||||
this.approvedRatingSum,
|
||||
this.approvedTotalReviews,
|
||||
this.sku,
|
||||
this.isRx,
|
||||
this.rxMessage,
|
||||
this.rxMessagen,
|
||||
this.stockQuantity,
|
||||
this.stockAvailability,
|
||||
this.stockAvailabilityn,
|
||||
this.allowBackInStockSubscriptions,
|
||||
this.orderMinimumQuantity,
|
||||
this.orderMaximumQuantity,
|
||||
this.price,
|
||||
this.oldPrice,
|
||||
this.discountName,
|
||||
this.discountNamen,
|
||||
this.discountPercentage,
|
||||
this.displayOrder,
|
||||
this.discountIds,
|
||||
this.reviews,
|
||||
this.images});
|
||||
|
||||
SearchProductsModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
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));
|
||||
});
|
||||
}
|
||||
shortDescription = json['short_description'];
|
||||
fullDescription = json['full_description'];
|
||||
fullDescriptionn = json['full_descriptionn'];
|
||||
approvedRatingSum = json['approved_rating_sum'];
|
||||
approvedTotalReviews = json['approved_total_reviews'];
|
||||
sku = json['sku'];
|
||||
isRx = json['is_rx'];
|
||||
rxMessage = json['rx_message'];
|
||||
rxMessagen = json['rx_messagen'];
|
||||
stockQuantity = json['stock_quantity'];
|
||||
stockAvailability = json['stock_availability'];
|
||||
stockAvailabilityn = json['stock_availabilityn'];
|
||||
allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions'];
|
||||
orderMinimumQuantity = json['order_minimum_quantity'];
|
||||
orderMaximumQuantity = json['order_maximum_quantity'];
|
||||
price = json['price'];
|
||||
oldPrice = json['old_price'];
|
||||
discountName = json['discount_name'];
|
||||
discountNamen = json['discount_namen'];
|
||||
discountPercentage = json['discount_percentage'];
|
||||
displayOrder = json['display_order'];
|
||||
|
||||
if (json['images'] != null) {
|
||||
images = new List<Images>();
|
||||
json['images'].forEach((v) {
|
||||
images.add(new Images.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['namen'] = this.namen;
|
||||
if (this.localizedNames != null) {
|
||||
data['localized_names'] =
|
||||
this.localizedNames.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['short_description'] = this.shortDescription;
|
||||
data['full_description'] = this.fullDescription;
|
||||
data['full_descriptionn'] = this.fullDescriptionn;
|
||||
data['approved_rating_sum'] = this.approvedRatingSum;
|
||||
data['approved_total_reviews'] = this.approvedTotalReviews;
|
||||
data['sku'] = this.sku;
|
||||
data['is_rx'] = this.isRx;
|
||||
data['rx_message'] = this.rxMessage;
|
||||
data['rx_messagen'] = this.rxMessagen;
|
||||
data['stock_quantity'] = this.stockQuantity;
|
||||
data['stock_availability'] = this.stockAvailability;
|
||||
data['stock_availabilityn'] = this.stockAvailabilityn;
|
||||
data['allow_back_in_stock_subscriptions'] =
|
||||
this.allowBackInStockSubscriptions;
|
||||
data['order_minimum_quantity'] = this.orderMinimumQuantity;
|
||||
data['order_maximum_quantity'] = this.orderMaximumQuantity;
|
||||
data['price'] = this.price;
|
||||
data['old_price'] = this.oldPrice;
|
||||
data['discount_name'] = this.discountName;
|
||||
data['discount_namen'] = this.discountNamen;
|
||||
data['discount_percentage'] = this.discountPercentage;
|
||||
data['display_order'] = this.displayOrder;
|
||||
|
||||
if (this.images != null) {
|
||||
data['images'] = this.images.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LocalizedNames {
|
||||
int languageId;
|
||||
String localizedName;
|
||||
|
||||
LocalizedNames({this.languageId, this.localizedName});
|
||||
|
||||
LocalizedNames.fromJson(Map<String, dynamic> json) {
|
||||
languageId = json['language_id'];
|
||||
localizedName = json['localized_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['language_id'] = this.languageId;
|
||||
data['localized_name'] = this.localizedName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Images {
|
||||
int id;
|
||||
int position;
|
||||
String src;
|
||||
String thumb;
|
||||
String attachment;
|
||||
|
||||
Images({this.id, this.position, this.src, this.thumb, this.attachment});
|
||||
|
||||
Images.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
position = json['position'];
|
||||
src = json['src'];
|
||||
thumb = json['thumb'];
|
||||
attachment = json['attachment'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['position'] = this.position;
|
||||
data['src'] = this.src;
|
||||
data['thumb'] = this.thumb;
|
||||
data['attachment'] = this.attachment;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,211 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../base_service.dart';
|
||||
|
||||
class CustomerAddressesService extends BaseService {
|
||||
|
||||
List<AddressInfo> addressesList = List();
|
||||
CustomerInfo customerInfo;
|
||||
|
||||
Future addAddressInfo({ AddNewAddressRequestModel
|
||||
addNewAddressRequestModel }) async {
|
||||
|
||||
addNewAddressRequestModel.customer.email = customerInfo.email;
|
||||
addNewAddressRequestModel.customer.id = customerInfo.customerId;
|
||||
addNewAddressRequestModel.customer.roleIds = [3];
|
||||
addNewAddressRequestModel.customer.addresses[0].email = customerInfo.email;
|
||||
addNewAddressRequestModel.customer.addresses[0].phoneNumber = customerInfo.mobileNumber;
|
||||
addNewAddressRequestModel.customer.addresses[0].firstName = user.firstName;
|
||||
addNewAddressRequestModel.customer.addresses[0].lastName = user.lastName;
|
||||
addNewAddressRequestModel.customer.addresses[0].countryId = 69;
|
||||
|
||||
var f = DateFormat('E, d MMM yyyy HH:mm:ss');
|
||||
var date = f.format(DateTime.now().toUtc()) + " GMT";
|
||||
addNewAddressRequestModel.customer.addresses[0].createdOnUtc = date;
|
||||
hasError = false;
|
||||
await baseAppClient.post(ADD_ADDRESS_INFO,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
addressesList.clear();
|
||||
response["customers"][0]["addresses"].forEach((data) {
|
||||
addressesList
|
||||
.add(AddressInfo.fromJson(data));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: addNewAddressRequestModel.toJson(), isExternal: true, isAllowAny: true);
|
||||
}
|
||||
|
||||
Future getCustomerAddresses() async {
|
||||
Map<String, String> queryParams = {
|
||||
'fields':'addresses'
|
||||
};
|
||||
hasError = false;
|
||||
await baseAppClient.get("$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}",
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
addressesList.clear();
|
||||
response["customers"][0]["addresses"].forEach((data) {
|
||||
addressesList
|
||||
.add(AddressInfo.fromJson(data));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, queryParams: queryParams, isExternal: true);
|
||||
}
|
||||
|
||||
|
||||
Future getCustomerInfo() async {
|
||||
Map<String, String> queryParams = {
|
||||
'FileNumber':'${user.patientID}'
|
||||
};
|
||||
|
||||
hasError = false;
|
||||
await baseAppClient.get(GET_CUSTOMER_INFO,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
customerInfo= CustomerInfo.fromJson(response);
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, queryParams: queryParams, isExternal: true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CustomerInfo {
|
||||
bool isRegistered;
|
||||
String userName;
|
||||
Null password;
|
||||
String email;
|
||||
Null errorMessage;
|
||||
String mobileNumber;
|
||||
int customerId;
|
||||
|
||||
CustomerInfo(
|
||||
{this.isRegistered,
|
||||
this.userName,
|
||||
this.password,
|
||||
this.email,
|
||||
this.errorMessage,
|
||||
this.mobileNumber,
|
||||
this.customerId});
|
||||
|
||||
CustomerInfo.fromJson(Map<String, dynamic> json) {
|
||||
isRegistered = json['IsRegistered'];
|
||||
userName = json['UserName'];
|
||||
password = json['Password'];
|
||||
email = json['Email'];
|
||||
errorMessage = json['ErrorMessage'];
|
||||
mobileNumber = json['MobileNumber'];
|
||||
customerId = json['CustomerId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['IsRegistered'] = this.isRegistered;
|
||||
data['UserName'] = this.userName;
|
||||
data['Password'] = this.password;
|
||||
data['Email'] = this.email;
|
||||
data['ErrorMessage'] = this.errorMessage;
|
||||
data['MobileNumber'] = this.mobileNumber;
|
||||
data['CustomerId'] = this.customerId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AddressInfo {
|
||||
String id;
|
||||
String firstName;
|
||||
String lastName;
|
||||
String email;
|
||||
Null company;
|
||||
int countryId;
|
||||
String country;
|
||||
Null stateProvinceId;
|
||||
String city;
|
||||
String address1;
|
||||
String address2;
|
||||
String zipPostalCode;
|
||||
String phoneNumber;
|
||||
Null faxNumber;
|
||||
String customerAttributes;
|
||||
String createdOnUtc;
|
||||
Null province;
|
||||
String latLong;
|
||||
|
||||
AddressInfo(
|
||||
{this.id,
|
||||
this.firstName,
|
||||
this.lastName,
|
||||
this.email,
|
||||
this.company,
|
||||
this.countryId,
|
||||
this.country,
|
||||
this.stateProvinceId,
|
||||
this.city,
|
||||
this.address1,
|
||||
this.address2,
|
||||
this.zipPostalCode,
|
||||
this.phoneNumber,
|
||||
this.faxNumber,
|
||||
this.customerAttributes,
|
||||
this.createdOnUtc,
|
||||
this.province,
|
||||
this.latLong});
|
||||
|
||||
AddressInfo.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
firstName = json['first_name'];
|
||||
lastName = json['last_name'];
|
||||
email = json['email'];
|
||||
company = json['company'];
|
||||
countryId = json['country_id'];
|
||||
country = json['country'];
|
||||
stateProvinceId = json['state_province_id'];
|
||||
city = json['city'];
|
||||
address1 = json['address1'];
|
||||
address2 = json['address2'];
|
||||
zipPostalCode = json['zip_postal_code'];
|
||||
phoneNumber = json['phone_number'];
|
||||
faxNumber = json['fax_number'];
|
||||
customerAttributes = json['customer_attributes'];
|
||||
createdOnUtc = json['created_on_utc'];
|
||||
province = json['province'];
|
||||
latLong = json['lat_long'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['first_name'] = this.firstName;
|
||||
data['last_name'] = this.lastName;
|
||||
data['email'] = this.email;
|
||||
data['company'] = this.company;
|
||||
data['country_id'] = this.countryId;
|
||||
data['country'] = this.country;
|
||||
data['state_province_id'] = this.stateProvinceId;
|
||||
data['city'] = this.city;
|
||||
data['address1'] = this.address1;
|
||||
data['address2'] = this.address2;
|
||||
data['zip_postal_code'] = this.zipPostalCode;
|
||||
data['phone_number'] = this.phoneNumber;
|
||||
data['fax_number'] = this.faxNumber;
|
||||
data['customer_attributes'] = this.customerAttributes;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['province'] = this.province;
|
||||
data['lat_long'] = this.latLong;
|
||||
return data;
|
||||
}
|
||||
}
|
||||