ActiveSubscription.fromJson constructor
ActiveSubscription.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ActiveSubscription.fromJson(Map<String, dynamic> json) {
return ActiveSubscription(
autoRenewingAndroid: json['autoRenewingAndroid'] as bool?,
basePlanIdAndroid: json['basePlanIdAndroid'] as String?,
currentPlanId: json['currentPlanId'] as String?,
daysUntilExpirationIOS:
(json['daysUntilExpirationIOS'] as num?)?.toDouble(),
environmentIOS: json['environmentIOS'] as String?,
expirationDateIOS: (json['expirationDateIOS'] as num?)?.toDouble(),
isActive: json['isActive'] as bool,
productId: json['productId'] as String,
purchaseToken: json['purchaseToken'] as String?,
purchaseTokenAndroid: json['purchaseTokenAndroid'] as String?,
transactionDate: (json['transactionDate'] as num).toDouble(),
transactionId: json['transactionId'] as String,
willExpireSoon: json['willExpireSoon'] as bool?,
);
}