OrderLineItemProduct.fromJson constructor

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

Implementation

factory OrderLineItemProduct.fromJson(Map<String, Object?> json) {
  expectExactKeys(
    json,
    json.containsKey("id") ? const {"id", "name"} : const {"name"},
    "refund order line item product",
  );
  return OrderLineItemProduct(
    id: json["id"] as String?,
    name: json["name"] as String,
  );
}