WooCustomer.fromJson constructor
WooCustomer.fromJson(
- Map<String, dynamic> json
)
Implementation
WooCustomer.fromJson(Map<String, dynamic> json) {
id = json['id'];
dateCreated = json['date_created'];
dateCreatedGmt = json['date_created_gmt'];
dateModified = json['date_modified'];
dateModifiedGmt = json['date_modified_gmt'];
email = json['email'];
firstName = json['first_name'];
lastName = json['last_name'];
role = json['role'];
username = json['username'];
billing =
json['billing'] != null ? new Billing.fromJson(json['billing']) : null;
shipping = json['shipping'] != null
? new Shipping.fromJson(json['shipping'])
: null;
isPayingCustomer = json['is_paying_customer'];
avatarUrl = json['avatar_url'];
metaData = (json['meta_data'] as List)
.map((i) => WooCustomerMetaData.fromJson(i))
.toList();
links = json['_links'] != null ? new Links.fromJson(json['_links']) : null;
}