Customer.fromJson constructor
Customer.fromJson(
- Map<String, dynamic> json
)
Implementation
Customer.fromJson(Map<String, dynamic> json) {
id = json['id'];
createdAt = json['createdAt'];
email = json['email'];
passwordChangedAt = json['passwordChangedAt'];
isGuest = json['isGuest'];
isTest = json['isTest'];
type = json['type'];
detail =
json['detail'] != null ? CustomerDetail.fromJson(json['detail']) : null;
store = json['store'] != null ? StoreDTO.fromJson(json['store']) : null;
balance = json['balance'] != null
? double.tryParse(json['balance'].toString())
: null;
balanceCurrency = json['balanceCurrency'];
}