Offering.fromJson constructor

Offering.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Offering.fromJson(Map<String, dynamic> json) {
  return Offering(
    description: json['description'] as String?,
    id: json['id'] as String?,
    platform: (json['platform'] as String?)?.toDevicePlatform(),
    recurringCharges: (json['recurringCharges'] as List?)
        ?.whereNotNull()
        .map((e) => RecurringCharge.fromJson(e as Map<String, dynamic>))
        .toList(),
    type: (json['type'] as String?)?.toOfferingType(),
  );
}