toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      "id": encodeValue(id),
      "guest": encodeValue(guest),
      "name": encodeValue(name),
      if (emailAddress != null) "email_address": encodeValue(emailAddress),
      if (phoneNumber != null) "phone_number": encodeValue(phoneNumber),
      if (billingAddress != null)
        "billing_address": encodeValue(billingAddress),
      if (shippingAddress != null)
        "shipping_address": encodeValue(shippingAddress),
    };