CreateRequest.fromJson constructor

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

Implementation

factory CreateRequest.fromJson(Map<String, Object?> json) => CreateRequest(
      billingAddress: json["billing_address"] == null
          ? null
          : AddressInput.fromJson(
              (json["billing_address"] as Map).cast<String, Object?>(),
            ),
      customData: json["custom_data"] == null
          ? null
          : core.CustomDataInput.fromJson(json["custom_data"]),
      emailAddress: json["email_address"] == null
          ? null
          : json["email_address"] 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?>(),
            ),
      title: json["title"] == null ? null : json["title"] as String,
      name: json["name"] as String,
    );