TransactionLineItemsItem.fromJson constructor
TransactionLineItemsItem.fromJson(
- Object? json
Implementation
factory TransactionLineItemsItem.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return TransactionLineItemsItem(
amount: (map['amount'] as num).toInt(),
amountTax: (map['amount_tax'] as num).toInt(),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
originalLineItem: (map['original_line_item'] as String),
quantity:
map['quantity'] == null ? null : (map['quantity'] as num).toInt(),
reference: (map['reference'] as String),
);
}