UpdateRequest.fromJson constructor

UpdateRequest.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory UpdateRequest.fromJson(Map<String, Object?> json) => UpdateRequest(
      billingAddress: json["billing_address"] == null
          ? null
          : AddressInput.fromJson(
              (json["billing_address"] as Map).cast<String, Object?>(),
            ),
      customData: json["custom_data"] == null
          ? null
          : core.CustomDataPatch.fromJson(json["custom_data"]),
      emailAddress: json["email_address"] == null
          ? null
          : json["email_address"] as String,
      name: json["name"] == null ? null : json["name"] as String,
      phoneNumber: json["phone_number"] == null
          ? null
          : json["phone_number"] as String,
      reference:
          json["reference"] == null ? null : json["reference"] as String,
      shippingAddress: json["shipping_address"] == null
          ? null
          : AddressInput.fromJson(
              (json["shipping_address"] as Map).cast<String, Object?>(),
            ),
      suffix: json["suffix"] == null ? null : json["suffix"] as String,
      title: json["title"] == null ? null : json["title"] as String,
      customerId: json["customer_id"] as String,
    );