StarTransactionTypeBotSubscriptionPurchase.fromJson constructor

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

Parses a StarTransactionTypeBotSubscriptionPurchase from TDLib JSON.

Implementation

factory StarTransactionTypeBotSubscriptionPurchase.fromJson(
  Map<String, dynamic> json,
) => StarTransactionTypeBotSubscriptionPurchase(
  userId: _readInt(json['user_id']),
  subscriptionPeriod: _readInt(json['subscription_period']),
  productInfo: _readOptional(json['product_info'], ProductInfo.fromJson),
);