|
|
|
|
@ -1,11 +1,9 @@
|
|
|
|
|
class RecommendedProductModel {
|
|
|
|
|
String messageStatus;
|
|
|
|
|
List<Products> products;
|
|
|
|
|
|
|
|
|
|
RecommendedProductModel({this.messageStatus, this.products});
|
|
|
|
|
RecommendedProductModel({this.products});
|
|
|
|
|
|
|
|
|
|
RecommendedProductModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
messageStatus = json['MessageStatus'];
|
|
|
|
|
if (json['products'] != null) {
|
|
|
|
|
products = new List<Products>();
|
|
|
|
|
json['products'].forEach((v) {
|
|
|
|
|
@ -16,7 +14,6 @@ class RecommendedProductModel {
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['MessageStatus'] = this.messageStatus;
|
|
|
|
|
if (this.products != null) {
|
|
|
|
|
data['products'] = this.products.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
@ -29,238 +26,213 @@ class Products {
|
|
|
|
|
bool visibleIndividually;
|
|
|
|
|
String name;
|
|
|
|
|
String namen;
|
|
|
|
|
List<LocalizedNames> localizedNames;
|
|
|
|
|
String shortDescription;
|
|
|
|
|
String shortDescriptionn;
|
|
|
|
|
String fullDescription;
|
|
|
|
|
String fullDescriptionn;
|
|
|
|
|
bool markasNew;
|
|
|
|
|
bool showOnHomePage;
|
|
|
|
|
Null metaKeywords;
|
|
|
|
|
Null metaDescription;
|
|
|
|
|
Null metaTitle;
|
|
|
|
|
dynamic metaKeywords;
|
|
|
|
|
dynamic metaDescription;
|
|
|
|
|
dynamic metaTitle;
|
|
|
|
|
bool allowCustomerReviews;
|
|
|
|
|
int approvedRatingSum;
|
|
|
|
|
int notApprovedRatingSum;
|
|
|
|
|
int approvedTotalReviews;
|
|
|
|
|
int notApprovedTotalReviews;
|
|
|
|
|
dynamic approvedRatingSum;
|
|
|
|
|
dynamic notApprovedRatingSum;
|
|
|
|
|
dynamic approvedTotalReviews;
|
|
|
|
|
dynamic notApprovedTotalReviews;
|
|
|
|
|
String sku;
|
|
|
|
|
bool isRx;
|
|
|
|
|
bool prescriptionRequired;
|
|
|
|
|
Null rxMessage;
|
|
|
|
|
Null rxMessagen;
|
|
|
|
|
Null manufacturerPartNumber;
|
|
|
|
|
Null gtin;
|
|
|
|
|
dynamic rxMessage;
|
|
|
|
|
dynamic rxMessagen;
|
|
|
|
|
dynamic manufacturerPartNumber;
|
|
|
|
|
dynamic gtin;
|
|
|
|
|
bool isGiftCard;
|
|
|
|
|
bool requireOtherProducts;
|
|
|
|
|
bool automaticallyAddRequiredProducts;
|
|
|
|
|
bool isDownload;
|
|
|
|
|
bool unlimitedDownloads;
|
|
|
|
|
int maxNumberOfDownloads;
|
|
|
|
|
Null downloadExpirationDays;
|
|
|
|
|
dynamic maxNumberOfDownloads;
|
|
|
|
|
dynamic downloadExpirationDays;
|
|
|
|
|
bool hasSampleDownload;
|
|
|
|
|
bool hasUserAgreement;
|
|
|
|
|
bool isRecurring;
|
|
|
|
|
int recurringCycleLength;
|
|
|
|
|
int recurringTotalCycles;
|
|
|
|
|
dynamic recurringCycleLength;
|
|
|
|
|
dynamic recurringTotalCycles;
|
|
|
|
|
bool isRental;
|
|
|
|
|
int rentalPriceLength;
|
|
|
|
|
dynamic rentalPriceLength;
|
|
|
|
|
bool isShipEnabled;
|
|
|
|
|
bool isFreeShipping;
|
|
|
|
|
bool shipSeparately;
|
|
|
|
|
int additionalShippingCharge;
|
|
|
|
|
dynamic additionalShippingCharge;
|
|
|
|
|
bool isTaxExempt;
|
|
|
|
|
bool isTelecommunicationsOrBroadcastingOrElectronicServices;
|
|
|
|
|
bool useMultipleWarehouses;
|
|
|
|
|
int manageInventoryMethodId;
|
|
|
|
|
int stockQuantity;
|
|
|
|
|
dynamic manageInventoryMethodId;
|
|
|
|
|
dynamic stockQuantity;
|
|
|
|
|
String stockAvailability;
|
|
|
|
|
String stockAvailabilityn;
|
|
|
|
|
bool displayStockAvailability;
|
|
|
|
|
bool displayStockQuantity;
|
|
|
|
|
int minStockQuantity;
|
|
|
|
|
int notifyAdminForQuantityBelow;
|
|
|
|
|
dynamic minStockQuantity;
|
|
|
|
|
dynamic notifyAdminForQuantityBelow;
|
|
|
|
|
bool allowBackInStockSubscriptions;
|
|
|
|
|
int orderMinimumQuantity;
|
|
|
|
|
int orderMaximumQuantity;
|
|
|
|
|
Null allowedQuantities;
|
|
|
|
|
dynamic orderMinimumQuantity;
|
|
|
|
|
dynamic orderMaximumQuantity;
|
|
|
|
|
dynamic allowedQuantities;
|
|
|
|
|
bool allowAddingOnlyExistingAttributeCombinations;
|
|
|
|
|
bool disableBuyButton;
|
|
|
|
|
bool disableWishlistButton;
|
|
|
|
|
bool availableForPreOrder;
|
|
|
|
|
Null preOrderAvailabilityStartDateTimeUtc;
|
|
|
|
|
dynamic preOrderAvailabilityStartDateTimeUtc;
|
|
|
|
|
bool callForPrice;
|
|
|
|
|
double price;
|
|
|
|
|
int oldPrice;
|
|
|
|
|
double productCost;
|
|
|
|
|
Null specialPrice;
|
|
|
|
|
Null specialPriceStartDateTimeUtc;
|
|
|
|
|
Null specialPriceEndDateTimeUtc;
|
|
|
|
|
dynamic price;
|
|
|
|
|
dynamic oldPrice;
|
|
|
|
|
dynamic productCost;
|
|
|
|
|
dynamic specialPrice;
|
|
|
|
|
dynamic specialPriceStartDateTimeUtc;
|
|
|
|
|
dynamic specialPriceEndDateTimeUtc;
|
|
|
|
|
bool customerEntersPrice;
|
|
|
|
|
int minimumCustomerEnteredPrice;
|
|
|
|
|
int maximumCustomerEnteredPrice;
|
|
|
|
|
dynamic minimumCustomerEnteredPrice;
|
|
|
|
|
dynamic maximumCustomerEnteredPrice;
|
|
|
|
|
bool basepriceEnabled;
|
|
|
|
|
int basepriceAmount;
|
|
|
|
|
int basepriceBaseAmount;
|
|
|
|
|
dynamic basepriceAmount;
|
|
|
|
|
dynamic basepriceBaseAmount;
|
|
|
|
|
bool hasTierPrices;
|
|
|
|
|
bool hasDiscountsApplied;
|
|
|
|
|
Null discountName;
|
|
|
|
|
Null discountNamen;
|
|
|
|
|
Null discountDescription;
|
|
|
|
|
Null discountDescriptionn;
|
|
|
|
|
Null discountPercentage;
|
|
|
|
|
dynamic discountName;
|
|
|
|
|
dynamic discountNamen;
|
|
|
|
|
dynamic discountDescription;
|
|
|
|
|
dynamic discountDescriptionn;
|
|
|
|
|
dynamic discountPercentage;
|
|
|
|
|
String currency;
|
|
|
|
|
String currencyn;
|
|
|
|
|
double weight;
|
|
|
|
|
int length;
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
Null availableStartDateTimeUtc;
|
|
|
|
|
Null availableEndDateTimeUtc;
|
|
|
|
|
int displayOrder;
|
|
|
|
|
dynamic length;
|
|
|
|
|
dynamic width;
|
|
|
|
|
dynamic height;
|
|
|
|
|
dynamic availableStartDateTimeUtc;
|
|
|
|
|
dynamic availableEndDateTimeUtc;
|
|
|
|
|
dynamic displayOrder;
|
|
|
|
|
bool published;
|
|
|
|
|
bool deleted;
|
|
|
|
|
String createdOnUtc;
|
|
|
|
|
String updatedOnUtc;
|
|
|
|
|
String productType;
|
|
|
|
|
int parentGroupedProductId;
|
|
|
|
|
List<Null> roleIds;
|
|
|
|
|
List<Null> discountIds;
|
|
|
|
|
List<Null> storeIds;
|
|
|
|
|
List<int> manufacturerIds;
|
|
|
|
|
List<Reviews> reviews;
|
|
|
|
|
List<Images> images;
|
|
|
|
|
List<Null> attributes;
|
|
|
|
|
List<Specifications> specifications;
|
|
|
|
|
List<Null> associatedProductIds;
|
|
|
|
|
List<Null> tags;
|
|
|
|
|
int vendorId;
|
|
|
|
|
dynamic parentGroupedProductId;
|
|
|
|
|
dynamic vendorId;
|
|
|
|
|
String seName;
|
|
|
|
|
List<Images> images;
|
|
|
|
|
|
|
|
|
|
Products(
|
|
|
|
|
{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});
|
|
|
|
|
Products({
|
|
|
|
|
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.vendorId,
|
|
|
|
|
this.seName,
|
|
|
|
|
this.images,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Products.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'];
|
|
|
|
|
@ -285,7 +257,7 @@ class Products {
|
|
|
|
|
isGiftCard = json['is_gift_card'];
|
|
|
|
|
requireOtherProducts = json['require_other_products'];
|
|
|
|
|
automaticallyAddRequiredProducts =
|
|
|
|
|
json['automatically_add_required_products'];
|
|
|
|
|
json['automatically_add_required_products'];
|
|
|
|
|
isDownload = json['is_download'];
|
|
|
|
|
unlimitedDownloads = json['unlimited_downloads'];
|
|
|
|
|
maxNumberOfDownloads = json['max_number_of_downloads'];
|
|
|
|
|
@ -303,7 +275,7 @@ class Products {
|
|
|
|
|
additionalShippingCharge = json['additional_shipping_charge'];
|
|
|
|
|
isTaxExempt = json['is_tax_exempt'];
|
|
|
|
|
isTelecommunicationsOrBroadcastingOrElectronicServices =
|
|
|
|
|
json['is_telecommunications_or_broadcasting_or_electronic_services'];
|
|
|
|
|
json['is_telecommunications_or_broadcasting_or_electronic_services'];
|
|
|
|
|
useMultipleWarehouses = json['use_multiple_warehouses'];
|
|
|
|
|
manageInventoryMethodId = json['manage_inventory_method_id'];
|
|
|
|
|
stockQuantity = json['stock_quantity'];
|
|
|
|
|
@ -318,12 +290,12 @@ class Products {
|
|
|
|
|
orderMaximumQuantity = json['order_maximum_quantity'];
|
|
|
|
|
allowedQuantities = json['allowed_quantities'];
|
|
|
|
|
allowAddingOnlyExistingAttributeCombinations =
|
|
|
|
|
json['allow_adding_only_existing_attribute_combinations'];
|
|
|
|
|
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'];
|
|
|
|
|
json['pre_order_availability_start_date_time_utc'];
|
|
|
|
|
callForPrice = json['call_for_price'];
|
|
|
|
|
price = json['price'];
|
|
|
|
|
oldPrice = json['old_price'];
|
|
|
|
|
@ -359,63 +331,14 @@ class Products {
|
|
|
|
|
updatedOnUtc = json['updated_on_utc'];
|
|
|
|
|
productType = json['product_type'];
|
|
|
|
|
parentGroupedProductId = json['parent_grouped_product_id'];
|
|
|
|
|
if (json['role_ids'] != null) {
|
|
|
|
|
roleIds = new List<Null>();
|
|
|
|
|
json['role_ids'].forEach((v) {
|
|
|
|
|
roleIds.add(null);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (json['discount_ids'] != null) {
|
|
|
|
|
discountIds = new List<Null>();
|
|
|
|
|
json['discount_ids'].forEach((v) {
|
|
|
|
|
discountIds.add(null);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (json['store_ids'] != null) {
|
|
|
|
|
storeIds = new List<Null>();
|
|
|
|
|
json['store_ids'].forEach((v) {
|
|
|
|
|
storeIds.add(null);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
manufacturerIds = json['manufacturer_ids'].cast<int>();
|
|
|
|
|
if (json['reviews'] != null) {
|
|
|
|
|
reviews = new List<Reviews>();
|
|
|
|
|
json['reviews'].forEach((v) {
|
|
|
|
|
reviews.add(new Reviews.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
vendorId = json['vendor_id'];
|
|
|
|
|
seName = json['se_name'];
|
|
|
|
|
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>();
|
|
|
|
|
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<Null>();
|
|
|
|
|
json['associated_product_ids'].forEach((v) {
|
|
|
|
|
associatedProductIds.add(v);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (json['tags'] != null) {
|
|
|
|
|
tags = new List<Null>();
|
|
|
|
|
json['tags'].forEach((v) {
|
|
|
|
|
tags.add(v);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
vendorId = json['vendor_id'];
|
|
|
|
|
seName = json['se_name'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
@ -424,10 +347,6 @@ class Products {
|
|
|
|
|
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;
|
|
|
|
|
@ -528,289 +447,12 @@ class Products {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
if (this.discountIds != null) {
|
|
|
|
|
data['discount_ids'] = this.discountIds.map((v) => v);
|
|
|
|
|
}
|
|
|
|
|
if (this.storeIds != null) {
|
|
|
|
|
data['store_ids'] = this.storeIds.map((v) => v);
|
|
|
|
|
}
|
|
|
|
|
data['manufacturer_ids'] = this.manufacturerIds;
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
if (this.tags != null) {
|
|
|
|
|
data['tags'] = this.tags.map((v) => v);
|
|
|
|
|
}
|
|
|
|
|
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 Reviews {
|
|
|
|
|
int id;
|
|
|
|
|
int position;
|
|
|
|
|
int reviewId;
|
|
|
|
|
int customerId;
|
|
|
|
|
int productId;
|
|
|
|
|
int storeId;
|
|
|
|
|
bool isApproved;
|
|
|
|
|
String title;
|
|
|
|
|
String reviewText;
|
|
|
|
|
Null replyText;
|
|
|
|
|
int rating;
|
|
|
|
|
int helpfulYesTotal;
|
|
|
|
|
int helpfulNoTotal;
|
|
|
|
|
String createdOnUtc;
|
|
|
|
|
Customer customer;
|
|
|
|
|
Null product;
|
|
|
|
|
|
|
|
|
|
Reviews(
|
|
|
|
|
{this.id,
|
|
|
|
|
this.position,
|
|
|
|
|
this.reviewId,
|
|
|
|
|
this.customerId,
|
|
|
|
|
this.productId,
|
|
|
|
|
this.storeId,
|
|
|
|
|
this.isApproved,
|
|
|
|
|
this.title,
|
|
|
|
|
this.reviewText,
|
|
|
|
|
this.replyText,
|
|
|
|
|
this.rating,
|
|
|
|
|
this.helpfulYesTotal,
|
|
|
|
|
this.helpfulNoTotal,
|
|
|
|
|
this.createdOnUtc,
|
|
|
|
|
this.customer,
|
|
|
|
|
this.product});
|
|
|
|
|
|
|
|
|
|
Reviews.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
position = json['position'];
|
|
|
|
|
reviewId = json['review_id'];
|
|
|
|
|
customerId = json['customer_id'];
|
|
|
|
|
productId = json['product_id'];
|
|
|
|
|
storeId = json['store_id'];
|
|
|
|
|
isApproved = json['is_approved'];
|
|
|
|
|
title = json['title'];
|
|
|
|
|
reviewText = json['review_text'];
|
|
|
|
|
replyText = json['reply_text'];
|
|
|
|
|
rating = json['rating'];
|
|
|
|
|
helpfulYesTotal = json['helpful_yes_total'];
|
|
|
|
|
helpfulNoTotal = json['helpful_no_total'];
|
|
|
|
|
createdOnUtc = json['created_on_utc'];
|
|
|
|
|
customer = json['customer'] != null
|
|
|
|
|
? new Customer.fromJson(json['customer'])
|
|
|
|
|
: null;
|
|
|
|
|
product = json['product'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['position'] = this.position;
|
|
|
|
|
data['review_id'] = this.reviewId;
|
|
|
|
|
data['customer_id'] = this.customerId;
|
|
|
|
|
data['product_id'] = this.productId;
|
|
|
|
|
data['store_id'] = this.storeId;
|
|
|
|
|
data['is_approved'] = this.isApproved;
|
|
|
|
|
data['title'] = this.title;
|
|
|
|
|
data['review_text'] = this.reviewText;
|
|
|
|
|
data['reply_text'] = this.replyText;
|
|
|
|
|
data['rating'] = this.rating;
|
|
|
|
|
data['helpful_yes_total'] = this.helpfulYesTotal;
|
|
|
|
|
data['helpful_no_total'] = this.helpfulNoTotal;
|
|
|
|
|
data['created_on_utc'] = this.createdOnUtc;
|
|
|
|
|
if (this.customer != null) {
|
|
|
|
|
data['customer'] = this.customer.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['product'] = this.product;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Customer {
|
|
|
|
|
Null fileNumber;
|
|
|
|
|
Null iqamaNumber;
|
|
|
|
|
int isOutSa;
|
|
|
|
|
int patientType;
|
|
|
|
|
Null gender;
|
|
|
|
|
String birthDate;
|
|
|
|
|
Null phone;
|
|
|
|
|
Null countryCode;
|
|
|
|
|
Null yahalaAccountno;
|
|
|
|
|
Null billingAddress;
|
|
|
|
|
Null shippingAddress;
|
|
|
|
|
List<Null> addresses;
|
|
|
|
|
String id;
|
|
|
|
|
String username;
|
|
|
|
|
String email;
|
|
|
|
|
Null firstName;
|
|
|
|
|
Null lastName;
|
|
|
|
|
Null languageId;
|
|
|
|
|
Null adminComment;
|
|
|
|
|
Null isTaxExempt;
|
|
|
|
|
Null hasShoppingCartItems;
|
|
|
|
|
Null active;
|
|
|
|
|
Null deleted;
|
|
|
|
|
Null isSystemAccount;
|
|
|
|
|
Null systemName;
|
|
|
|
|
Null lastIpAddress;
|
|
|
|
|
Null createdOnUtc;
|
|
|
|
|
Null lastLoginDateUtc;
|
|
|
|
|
Null lastActivityDateUtc;
|
|
|
|
|
Null registeredInStoreId;
|
|
|
|
|
List<Null> roleIds;
|
|
|
|
|
|
|
|
|
|
Customer(
|
|
|
|
|
{this.fileNumber,
|
|
|
|
|
this.iqamaNumber,
|
|
|
|
|
this.isOutSa,
|
|
|
|
|
this.patientType,
|
|
|
|
|
this.gender,
|
|
|
|
|
this.birthDate,
|
|
|
|
|
this.phone,
|
|
|
|
|
this.countryCode,
|
|
|
|
|
this.yahalaAccountno,
|
|
|
|
|
this.billingAddress,
|
|
|
|
|
this.shippingAddress,
|
|
|
|
|
this.addresses,
|
|
|
|
|
this.id,
|
|
|
|
|
this.username,
|
|
|
|
|
this.email,
|
|
|
|
|
this.firstName,
|
|
|
|
|
this.lastName,
|
|
|
|
|
this.languageId,
|
|
|
|
|
this.adminComment,
|
|
|
|
|
this.isTaxExempt,
|
|
|
|
|
this.hasShoppingCartItems,
|
|
|
|
|
this.active,
|
|
|
|
|
this.deleted,
|
|
|
|
|
this.isSystemAccount,
|
|
|
|
|
this.systemName,
|
|
|
|
|
this.lastIpAddress,
|
|
|
|
|
this.createdOnUtc,
|
|
|
|
|
this.lastLoginDateUtc,
|
|
|
|
|
this.lastActivityDateUtc,
|
|
|
|
|
this.registeredInStoreId,
|
|
|
|
|
this.roleIds});
|
|
|
|
|
|
|
|
|
|
Customer.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
fileNumber = json['file_number'];
|
|
|
|
|
iqamaNumber = json['iqama_number'];
|
|
|
|
|
isOutSa = json['is_out_sa'];
|
|
|
|
|
patientType = json['patient_type'];
|
|
|
|
|
gender = json['gender'];
|
|
|
|
|
birthDate = json['birth_date'];
|
|
|
|
|
phone = json['phone'];
|
|
|
|
|
countryCode = json['country_code'];
|
|
|
|
|
yahalaAccountno = json['yahala_accountno'];
|
|
|
|
|
billingAddress = json['billing_address'];
|
|
|
|
|
shippingAddress = json['shipping_address'];
|
|
|
|
|
if (json['addresses'] != null) {
|
|
|
|
|
addresses = new List<Null>();
|
|
|
|
|
json['addresses'].forEach((v) {
|
|
|
|
|
addresses.add(v);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
id = json['id'];
|
|
|
|
|
username = json['username'];
|
|
|
|
|
email = json['email'];
|
|
|
|
|
firstName = json['first_name'];
|
|
|
|
|
lastName = json['last_name'];
|
|
|
|
|
languageId = json['language_id'];
|
|
|
|
|
adminComment = json['admin_comment'];
|
|
|
|
|
isTaxExempt = json['is_tax_exempt'];
|
|
|
|
|
hasShoppingCartItems = json['has_shopping_cart_items'];
|
|
|
|
|
active = json['active'];
|
|
|
|
|
deleted = json['deleted'];
|
|
|
|
|
isSystemAccount = json['is_system_account'];
|
|
|
|
|
systemName = json['system_name'];
|
|
|
|
|
lastIpAddress = json['last_ip_address'];
|
|
|
|
|
createdOnUtc = json['created_on_utc'];
|
|
|
|
|
lastLoginDateUtc = json['last_login_date_utc'];
|
|
|
|
|
lastActivityDateUtc = json['last_activity_date_utc'];
|
|
|
|
|
registeredInStoreId = json['registered_in_store_id'];
|
|
|
|
|
if (json['role_ids'] != null) {
|
|
|
|
|
roleIds = new List<Null>();
|
|
|
|
|
json['role_ids'].forEach((v) {
|
|
|
|
|
roleIds.add(null);
|
|
|
|
|
});
|
|
|
|
|
if (this.images != null) {
|
|
|
|
|
data['images'] = this.images.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['file_number'] = this.fileNumber;
|
|
|
|
|
data['iqama_number'] = this.iqamaNumber;
|
|
|
|
|
data['is_out_sa'] = this.isOutSa;
|
|
|
|
|
data['patient_type'] = this.patientType;
|
|
|
|
|
data['gender'] = this.gender;
|
|
|
|
|
data['birth_date'] = this.birthDate;
|
|
|
|
|
data['phone'] = this.phone;
|
|
|
|
|
data['country_code'] = this.countryCode;
|
|
|
|
|
data['yahala_accountno'] = this.yahalaAccountno;
|
|
|
|
|
data['billing_address'] = this.billingAddress;
|
|
|
|
|
data['shipping_address'] = this.shippingAddress;
|
|
|
|
|
if (this.addresses != null) {
|
|
|
|
|
data['addresses'] = this.addresses.map((v) => v);
|
|
|
|
|
}
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['username'] = this.username;
|
|
|
|
|
data['email'] = this.email;
|
|
|
|
|
data['first_name'] = this.firstName;
|
|
|
|
|
data['last_name'] = this.lastName;
|
|
|
|
|
data['language_id'] = this.languageId;
|
|
|
|
|
data['admin_comment'] = this.adminComment;
|
|
|
|
|
data['is_tax_exempt'] = this.isTaxExempt;
|
|
|
|
|
data['has_shopping_cart_items'] = this.hasShoppingCartItems;
|
|
|
|
|
data['active'] = this.active;
|
|
|
|
|
data['deleted'] = this.deleted;
|
|
|
|
|
data['is_system_account'] = this.isSystemAccount;
|
|
|
|
|
data['system_name'] = this.systemName;
|
|
|
|
|
data['last_ip_address'] = this.lastIpAddress;
|
|
|
|
|
data['created_on_utc'] = this.createdOnUtc;
|
|
|
|
|
data['last_login_date_utc'] = this.lastLoginDateUtc;
|
|
|
|
|
data['last_activity_date_utc'] = this.lastActivityDateUtc;
|
|
|
|
|
data['registered_in_store_id'] = this.registeredInStoreId;
|
|
|
|
|
if (this.roleIds != null) {
|
|
|
|
|
data['role_ids'] = this.roleIds.map((v) => v);
|
|
|
|
|
}
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -842,40 +484,3 @@ class Images {
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|