toJson method
Implementation
Map<String, dynamic> toJson() {
Map<String, dynamic> result = Map<String, dynamic>();
result.addAll({
"customer_identifier": customerIdentifier,
"phone": phone,
"first_name": firstName,
"last_name": lastName,
"email": email
});
if (billingAddress != null)
result["billing_address"] = billingAddress.toJson();
if (shippingAddress != null)
result["shipping_address"] = shippingAddress.toJson();
return result;
}