PremiumGiveawayPaymentOption.fromJson constructor

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

Parses a PremiumGiveawayPaymentOption from TDLib JSON.

Implementation

factory PremiumGiveawayPaymentOption.fromJson(Map<String, dynamic> json) =>
    PremiumGiveawayPaymentOption(
      currency: _readString(json['currency']),
      amount: _readInt(json['amount']),
      winnerCount: _readInt(json['winner_count']),
      monthCount: _readInt(json['month_count']),
      storeProductId: _readString(json['store_product_id']),
      storeProductQuantity: _readInt(json['store_product_quantity']),
    );