ClimateRemovalsOrderDeliveries.fromJson constructor
ClimateRemovalsOrderDeliveries.fromJson(
- Object? json
Implementation
factory ClimateRemovalsOrderDeliveries.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return ClimateRemovalsOrderDeliveries(
deliveredAt: DateTime.fromMillisecondsSinceEpoch(
(map['delivered_at'] as int).toInt()),
location: map['location'] == null
? null
: ClimateRemovalsLocation.fromJson(map['location']),
metricTons: (map['metric_tons'] as String),
registryUrl:
map['registry_url'] == null ? null : (map['registry_url'] as String),
supplier: ClimateSupplier.fromJson(map['supplier']),
);
}