@ -15,7 +15,7 @@ class Products {
} ) ;
dynamic messageStatus ;
List < Product > products ;
List < Product > ? products ;
factory Products . fromJson ( Map < String , dynamic > json ) = > Products (
messageStatus: json [ " MessageStatus " ] ,
@ -24,7 +24,7 @@ class Products {
Map < String , dynamic > toJson ( ) = > {
" MessageStatus " : messageStatus ,
" products " : List < dynamic > . from ( products . map ( ( x ) = > x . toJson ( ) ) ) ,
" products " : List < dynamic > . from ( products ! . map ( ( x ) = > x . toJson ( ) ) ) ,
} ;
}
@ -143,117 +143,117 @@ class Product {
this . seName ,
} ) ;
String id ;
bool visibleIndividually ;
String name ;
String namen ;
List < LocalizedName > localizedNames ;
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 ? id ;
bool ? visibleIndividually ;
String ? name ;
String ? namen ;
List < LocalizedName > ? localizedNames ;
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 ;
dynamic manufacturerPartNumber ;
dynamic gtin ;
bool isGiftCard ;
bool requireOtherProducts ;
bool automaticallyAddRequiredProducts ;
bool isDownload ;
bool unlimitedDownloads ;
int maxNumberOfDownloads ;
bool ? isGiftCard ;
bool ? requireOtherProducts ;
bool ? automaticallyAddRequiredProducts ;
bool ? isDownload ;
bool ? unlimitedDownloads ;
int ? maxNumberOfDownloads ;
dynamic downloadExpirationDays ;
bool hasSampleDownload ;
bool hasUserAgreement ;
bool isRecurring ;
int recurringCycleLength ;
int recurringTotalCycles ;
bool isRental ;
int rentalPriceLength ;
bool isShipEnabled ;
bool isFreeShipping ;
bool shipSeparately ;
int 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 ;
bool ? hasSampleDownload ;
bool ? hasUserAgreement ;
bool ? isRecurring ;
int ? recurringCycleLength ;
int ? recurringTotalCycles ;
bool ? isRental ;
int ? rentalPriceLength ;
bool ? isShipEnabled ;
bool ? isFreeShipping ;
bool ? shipSeparately ;
int ? 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 ;
dynamic allowedQuantities ;
bool allowAddingOnlyExistingAttributeCombinations ;
bool disableBuyButton ;
bool disableWishlistButton ;
bool availableForPreOrder ;
bool ? allowAddingOnlyExistingAttributeCombinations ;
bool ? disableBuyButton ;
bool ? disableWishlistButton ;
bool ? availableForPreOrder ;
dynamic preOrderAvailabilityStartDateTimeUtc ;
bool callForPrice ;
double price ;
int oldPrice ;
double productCost ;
bool ? callForPrice ;
double ? price ;
int ? oldPrice ;
double ? productCost ;
dynamic specialPrice ;
dynamic specialPriceStartDateTimeUtc ;
dynamic specialPriceEndDateTimeUtc ;
bool customerEntersPrice ;
int minimumCustomerEnteredPrice ;
int maximumCustomerEnteredPrice ;
bool basepriceEnabled ;
int basepriceAmount ;
int basepriceBaseAmount ;
bool hasTierPrices ;
bool hasDiscountsApplied ;
String discountName ;
String discountNamen ;
String discountDescription ;
String discountDescriptionn ;
String discountPercentage ;
String currency ;
String currencyn ;
double weight ;
int length ;
int width ;
int height ;
bool ? customerEntersPrice ;
int ? minimumCustomerEnteredPrice ;
int ? maximumCustomerEnteredPrice ;
bool ? basepriceEnabled ;
int ? basepriceAmount ;
int ? basepriceBaseAmount ;
bool ? hasTierPrices ;
bool ? hasDiscountsApplied ;
String ? discountName ;
String ? discountNamen ;
String ? discountDescription ;
String ? discountDescriptionn ;
String ? discountPercentage ;
String ? currency ;
String ? currencyn ;
double ? weight ;
int ? length ;
int ? width ;
int ? height ;
dynamic availableStartDateTimeUtc ;
dynamic availableEndDateTimeUtc ;
int displayOrder ;
bool published ;
bool deleted ;
DateTime createdOnUtc ;
DateTime updatedOnUtc ;
String productType ;
int parentGroupedProductId ;
List < dynamic > roleIds ;
List < int > discountIds ;
List < dynamic > storeIds ;
List < int > manufacturerIds ;
List < Review > reviews ;
List < Image > images ;
List < dynamic > attributes ;
List < Specification > specifications ;
List < dynamic > associatedProductIds ;
List < dynamic > tags ;
int vendorId ;
String seName ;
int ? displayOrder ;
bool ? published ;
bool ? deleted ;
DateTime ? createdOnUtc ;
DateTime ? updatedOnUtc ;
String ? productType ;
int ? parentGroupedProductId ;
List < dynamic > ? roleIds ;
List < int > ? discountIds ;
List < dynamic > ? storeIds ;
List < int > ? manufacturerIds ;
List < Review > ? reviews ;
List < Image > ? images ;
List < dynamic > ? attributes ;
List < Specification > ? specifications ;
List < dynamic > ? associatedProductIds ;
List < dynamic > ? tags ;
int ? vendorId ;
String ? seName ;
factory Product . fromJson ( Map < String , dynamic > json ) = > Product (
id: json [ " id " ] ,
@ -374,7 +374,7 @@ class Product {
" visible_individually " : visibleIndividually ,
" name " : name ,
" namen " : namen ,
" localized_names " : List < dynamic > . from ( localizedNames . map ( ( x ) = > x . toJson ( ) ) ) ,
" localized_names " : List < dynamic > . from ( localizedNames ! . map ( ( x ) = > x . toJson ( ) ) ) ,
" short_description " : shortDescription = = null ? null : shortDescription ,
" short_descriptionn " : shortDescriptionn = = null ? null : shortDescriptionn ,
" full_description " : fullDescription ,
@ -465,20 +465,20 @@ class Product {
" display_order " : displayOrder ,
" published " : published ,
" deleted " : deleted ,
" created_on_utc " : createdOnUtc . toIso8601String ( ) ,
" updated_on_utc " : updatedOnUtc . toIso8601String ( ) ,
" created_on_utc " : createdOnUtc ! . toIso8601String ( ) ,
" updated_on_utc " : updatedOnUtc ! . toIso8601String ( ) ,
" product_type " : productType ,
" parent_grouped_product_id " : parentGroupedProductId ,
" role_ids " : List < dynamic > . from ( roleIds . map ( ( x ) = > x ) ) ,
" discount_ids " : List < dynamic > . from ( discountIds . map ( ( x ) = > x ) ) ,
" store_ids " : List < dynamic > . from ( storeIds . map ( ( x ) = > x ) ) ,
" manufacturer_ids " : List < dynamic > . from ( manufacturerIds . map ( ( x ) = > x ) ) ,
" reviews " : List < dynamic > . from ( reviews . map ( ( x ) = > x . toJson ( ) ) ) ,
" images " : List < dynamic > . from ( images . map ( ( x ) = > x . toJson ( ) ) ) ,
" attributes " : List < dynamic > . from ( attributes . map ( ( x ) = > x ) ) ,
" specifications " : List < dynamic > . from ( specifications . map ( ( x ) = > x . toJson ( ) ) ) ,
" associated_product_ids " : List < dynamic > . from ( associatedProductIds . map ( ( x ) = > x ) ) ,
" tags " : List < dynamic > . from ( tags . map ( ( x ) = > x ) ) ,
" role_ids " : List < dynamic > . from ( roleIds ! . map ( ( x ) = > x ) ) ,
" discount_ids " : List < dynamic > . from ( discountIds ! . map ( ( x ) = > x ) ) ,
" store_ids " : List < dynamic > . from ( storeIds ! . map ( ( x ) = > x ) ) ,
" manufacturer_ids " : List < dynamic > . from ( manufacturerIds ! . map ( ( x ) = > x ) ) ,
" reviews " : List < dynamic > . from ( reviews ! . map ( ( x ) = > x . toJson ( ) ) ) ,
" images " : List < dynamic > . from ( images ! . map ( ( x ) = > x . toJson ( ) ) ) ,
" attributes " : List < dynamic > . from ( attributes ! . map ( ( x ) = > x ) ) ,
" specifications " : List < dynamic > . from ( specifications ! . map ( ( x ) = > x . toJson ( ) ) ) ,
" associated_product_ids " : List < dynamic > . from ( associatedProductIds ! . map ( ( x ) = > x ) ) ,
" tags " : List < dynamic > . from ( tags ! . map ( ( x ) = > x ) ) ,
" vendor_id " : vendorId ,
" se_name " : seName ,
} ;
@ -493,11 +493,11 @@ class Image {
this . attachment ,
} ) ;
int id ;
int position ;
String src ;
String thumb ;
String attachment ;
int ? id ;
int ? position ;
String ? src ;
String ? thumb ;
String ? attachment ;
factory Image . fromJson ( Map < String , dynamic > json ) = > Image (
id: json [ " id " ] ,
@ -522,8 +522,8 @@ class LocalizedName {
this . localizedName ,
} ) ;
int languageId ;
String localizedName ;
int ? languageId ;
String ? localizedName ;
factory LocalizedName . fromJson ( Map < String , dynamic > json ) = > LocalizedName (
languageId: json [ " language_id " ] ,
@ -556,21 +556,21 @@ class Review {
this . product ,
} ) ;
int id ;
int position ;
int reviewId ;
int customerId ;
int productId ;
int storeId ;
bool isApproved ;
String title ;
String reviewText ;
int ? id ;
int ? position ;
int ? reviewId ;
int ? customerId ;
int ? productId ;
int ? storeId ;
bool ? isApproved ;
String ? title ;
String ? reviewText ;
dynamic replyText ;
int rating ;
int helpfulYesTotal ;
int helpfulNoTotal ;
DateTime createdOnUtc ;
Customer customer ;
int ? rating ;
int ? helpfulYesTotal ;
int ? helpfulNoTotal ;
DateTime ? createdOnUtc ;
Customer ? customer ;
dynamic product ;
factory Review . fromJson ( Map < String , dynamic > json ) = > Review (
@ -606,8 +606,8 @@ class Review {
" rating " : rating ,
" helpful_yes_total " : helpfulYesTotal ,
" helpful_no_total " : helpfulNoTotal ,
" created_on_utc " : createdOnUtc . toIso8601String ( ) ,
" customer " : customer . toJson ( ) ,
" created_on_utc " : createdOnUtc ! . toIso8601String ( ) ,
" customer " : customer ! . toJson ( ) ,
" product " : product ,
} ;
}
@ -649,19 +649,19 @@ class Customer {
dynamic fileNumber ;
dynamic iqamaNumber ;
int isOutSa ;
int patientType ;
int ? isOutSa ;
int ? patientType ;
dynamic gender ;
DateTime birthDate ;
DateTime ? birthDate ;
dynamic phone ;
dynamic countryCode ;
dynamic yahalaAccountno ;
dynamic billingAddress ;
dynamic shippingAddress ;
List < dynamic > addresses ;
String id ;
Username username ;
Email email ;
List < dynamic > ? addresses ;
String ? id ;
Username ? username ;
Email ? email ;
dynamic firstName ;
dynamic lastName ;
dynamic languageId ;
@ -677,7 +677,7 @@ class Customer {
dynamic lastLoginDateUtc ;
dynamic lastActivityDateUtc ;
dynamic registeredInStoreId ;
List < dynamic > roleIds ;
List < dynamic > ? roleIds ;
factory Customer . fromJson ( Map < String , dynamic > json ) = > Customer (
fileNumber: json [ " file_number " ] ,
@ -693,8 +693,8 @@ class Customer {
shippingAddress: json [ " shipping_address " ] ,
addresses: List < dynamic > . from ( json [ " addresses " ] . map ( ( x ) = > x ) ) ,
id: json [ " id " ] ,
username: usernameValues . map [ json [ " username " ] ] ,
email: emailValues . map [ json [ " email " ] ] ,
username: usernameValues . map ! [ json [ " username " ] ] ,
email: emailValues . map ! [ json [ " email " ] ] ,
firstName: json [ " first_name " ] ,
lastName: json [ " last_name " ] ,
languageId: json [ " language_id " ] ,
@ -719,13 +719,13 @@ class Customer {
" is_out_sa " : isOutSa ,
" patient_type " : patientType ,
" gender " : gender ,
" birth_date " : birthDate . toIso8601String ( ) ,
" birth_date " : birthDate ! . toIso8601String ( ) ,
" phone " : phone ,
" country_code " : countryCode ,
" yahala_accountno " : yahalaAccountno ,
" billing_address " : billingAddress ,
" shipping_address " : shippingAddress ,
" addresses " : List < dynamic > . from ( addresses . map ( ( x ) = > x ) ) ,
" addresses " : List < dynamic > . from ( addresses ! . map ( ( x ) = > x ) ) ,
" id " : id ,
" username " : usernameValues . reverse [ username ] ,
" email " : emailValues . reverse [ email ] ,
@ -744,23 +744,17 @@ class Customer {
" last_login_date_utc " : lastLoginDateUtc ,
" last_activity_date_utc " : lastActivityDateUtc ,
" registered_in_store_id " : registeredInStoreId ,
" role_ids " : List < dynamic > . from ( roleIds . map ( ( x ) = > x ) ) ,
" role_ids " : List < dynamic > . from ( roleIds ! . map ( ( x ) = > x ) ) ,
} ;
}
enum Email { MEMO17299_GMAIL_COM , STEVE_GATES_NOP_COMMERCE_COM }
final emailValues = EnumValues ( {
" Memo17299@gmail.com " : Email . MEMO17299_GMAIL_COM ,
" steve_gates@nopCommerce.com " : Email . STEVE_GATES_NOP_COMMERCE_COM
} ) ;
final emailValues = EnumValues ( { " Memo17299@gmail.com " : Email . MEMO17299_GMAIL_COM , " steve_gates@nopCommerce.com " : Email . STEVE_GATES_NOP_COMMERCE_COM } ) ;
enum Username { AMAL_26 , STEVE_GATES_NOP_COMMERCE_COM }
final usernameValues = EnumValues ( {
" amal_26 " : Username . AMAL_26 ,
" steve_gates@nopCommerce.com " : Username . STEVE_GATES_NOP_COMMERCE_COM
} ) ;
final usernameValues = EnumValues ( { " amal_26 " : Username . AMAL_26 , " steve_gates@nopCommerce.com " : Username . STEVE_GATES_NOP_COMMERCE_COM } ) ;
class Specification {
Specification ( {
@ -772,20 +766,20 @@ class Specification {
this . nameN ,
} ) ;
int id ;
int displayOrder ;
String defaultValue ;
String defaultValuen ;
Name name ;
NameN nameN ;
int ? id ;
int ? displayOrder ;
String ? defaultValue ;
String ? defaultValuen ;
Name ? name ;
NameN ? nameN ;
factory Specification . fromJson ( Map < String , dynamic > json ) = > Specification (
id: json [ " id " ] ,
displayOrder: json [ " display_order " ] ,
defaultValue: json [ " default_value " ] ,
defaultValuen: json [ " default_valuen " ] ,
name: nameValues . map [ json [ " name " ] ] ,
nameN: nameNValues . map [ json [ " nameN " ] ] ,
name: nameValues . map ! [ json [ " name " ] ] ,
nameN: nameNValues . map ! [ json [ " nameN " ] ] ,
) ;
Map < String , dynamic > toJson ( ) = > {
@ -811,25 +805,19 @@ final nameValues = EnumValues({
enum NameN { EMPTY , NAME_N , PURPLE , FLUFFY , TENTACLED , SPF }
final nameNValues = EnumValues ( {
" وحدة القياس الأولية " : NameN . EMPTY ,
" تخزين " : NameN . FLUFFY ,
" علامة تجارية " : NameN . NAME_N ,
" اسم البلد المصنع " : NameN . PURPLE ,
" SPF " : NameN . SPF ,
" المكونات " : NameN . TENTACLED
} ) ;
final nameNValues =
EnumValues ( { " وحدة القياس الأولية " : NameN . EMPTY , " تخزين " : NameN . FLUFFY , " علامة تجارية " : NameN . NAME_N , " اسم البلد المصنع " : NameN . PURPLE , " SPF " : NameN . SPF , " المكونات " : NameN . TENTACLED } ) ;
class EnumValues < T > {
Map < String , T > map ;
Map < T , String > reverseMap ;
Map < String , T > ? map ;
Map < T , String > ? reverseMap ;
EnumValues ( this . map ) ;
Map < T , String > get reverse {
if ( reverseMap = = null ) {
reverseMap = map . map ( ( k , v ) = > new MapEntry ( v , k ) ) ;
reverseMap = map ! . map ( ( k , v ) = > new MapEntry ( v , k ) ) ;
}
return reverseMap ;
return reverseMap ! ;
}
}