toJson method

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

Implementation

@override
Map<String, Object?> toJson() => {
      "balance": encodeValue(balance),
      if (billingAddress != null)
        "billing_address": encodeValue(billingAddress),
      "created_at": encodeValue(createdAt),
      if (customData != null) "custom_data": encodeValue(customData),
      if (emailAddress != null) "email_address": encodeValue(emailAddress),
      "fingerprint": encodeValue(fingerprint),
      "guest": encodeValue(guest),
      "id": encodeValue(id),
      "name": encodeValue(name),
      if (phoneNumber != null) "phone_number": encodeValue(phoneNumber),
      if (reference != null) "reference": encodeValue(reference),
      if (shippingAddress != null)
        "shipping_address": encodeValue(shippingAddress),
      if (suffix != null) "suffix": encodeValue(suffix),
      if (title != null) "title": encodeValue(title),
      if (updatedAt != null) "updated_at": encodeValue(updatedAt),
    };