StorePaymentPurpose.fromJson constructor

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

Implementation

factory StorePaymentPurpose.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case StorePaymentPurposePremiumSubscription.CONSTRUCTOR:
      return StorePaymentPurposePremiumSubscription.fromJson(json);
    case StorePaymentPurposeGiftedPremium.CONSTRUCTOR:
      return StorePaymentPurposeGiftedPremium.fromJson(json);
    default:
      return const StorePaymentPurpose();
  }
}