fromJson static method
Implementation
static StarSubscription? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return StarSubscription(
id: (json['id'] as String?) ?? '',
chatId: (json['chat_id'] as int?) ?? 0,
expirationDate: (json['expiration_date'] as int?) ?? 0,
isCanceled: (json['is_canceled'] as bool?) ?? false,
isExpiring: (json['is_expiring'] as bool?) ?? false,
pricing: StarSubscriptionPricing.fromJson(tdMapFromJson(json['pricing'])),
type: StarSubscriptionType.fromJson(tdMapFromJson(json['type'])),
);
}