PurchasesCredits.fromJson constructor

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

Implementation

factory PurchasesCredits.fromJson(Map<String, Object?> json) =>
    PurchasesCredits(
      name: json['name'] as String,
      singular: json['singular'] as String,
      plural: json['plural'] as String,
      balance: (json['balance'] as num).toInt(),
      bought: (json['bought'] as num).toInt(),
      free: (json['free'] as num).toInt(),
      freeEachMonth: (json['freeEachMonth'] as num).toInt(),
      freeRefillsAt: json['freeRefillsAt'] as String?,
    );