LineItem.fromJson constructor

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

Implementation

factory LineItem.fromJson(Map<String, Object?> json) => LineItem(
      id: json["id"] as String,
      orderLineItemId: json["order_line_item_id"] as String,
      orderLineItem: json["order_line_item"] == null
          ? null
          : OrderLineItem.fromJson(json["order_line_item"]),
      originalAmountPaid: inttegro_money.Amount.fromJson(
        (json["original_amount_paid"] as Map).cast<String, Object?>(),
      ),
      reason: json["reason"] == null ? null : Reason.fromJson(json["reason"]),
      reasonDetails: json["reason_details"] == null
          ? null
          : json["reason_details"] as String,
      refundAmount: inttegro_money.Amount.fromJson(
        (json["refund_amount"] as Map).cast<String, Object?>(),
      ),
    );