TaxTransactionCreateFromCalculationOptions.fromJson constructor
TaxTransactionCreateFromCalculationOptions.fromJson(
- Object? json
Implementation
factory TaxTransactionCreateFromCalculationOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return TaxTransactionCreateFromCalculationOptions(
calculation: (map['calculation'] as String),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
reference: (map['reference'] as String),
);
}