Customers.fromJson constructor
Customers.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Customers.fromJson(Map<String, dynamic> json) => Customers(
id: json["id"],
dateCreated: DateTime.parse(json["date_created"]),
dateCreatedGmt: DateTime.parse(json["date_created_gmt"]),
dateModified: DateTime.parse(json["date_modified"]),
dateModifiedGmt: DateTime.parse(json["date_modified_gmt"]),
email: json["email"],
firstName: json["first_name"],
lastName: json["last_name"],
role: json["role"],
username: json["username"],
billing: Ing.fromJson(json["billing"]),
shipping: Ing.fromJson(json["shipping"]),
isPayingCustomer: json["is_paying_customer"],
avatarUrl: json["avatar_url"],
metaData: List<dynamic>.from(json["meta_data"].map((x) => x)),
links: Links.fromJson(json["_links"]),
);