PurchasesUpgrade.fromJson constructor

PurchasesUpgrade.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory PurchasesUpgrade.fromJson(Map<String, Object?> json) =>
    PurchasesUpgrade(
      claim: json['claim'] as String,
      name: json['name'] as String,
      description: json['description'] as String,
      benefits: (json['benefits'] as List<Object?>).cast<String>(),
      active: json['active'] as bool,
      plan: json['plan'] == null
          ? null
          : PurchasePlan.fromWire(json['plan'] as String),
      store: json['store'] == null
          ? null
          : PurchaseRecordStore.fromWire(json['store'] as String),
      renews: json['renews'] as bool,
      endsAt: json['endsAt'] as String?,
    );