SourceOrderItem.fromJson constructor

SourceOrderItem.fromJson(
  1. Object? json
)

Implementation

factory SourceOrderItem.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SourceOrderItem(
    amount: map['amount'] == null ? null : (map['amount'] as num).toInt(),
    currency: map['currency'] == null ? null : (map['currency'] as String),
    description:
        map['description'] == null ? null : (map['description'] as String),
    parent: map['parent'] == null ? null : (map['parent'] as String),
    quantity:
        map['quantity'] == null ? null : (map['quantity'] as num).toInt(),
    type: map['type'] == null ? null : (map['type'] as String),
  );
}