fromJson static method

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

Implementation

static PremiumGiveawayPaymentOption? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return PremiumGiveawayPaymentOption(
    currency: (json['currency'] as String?) ?? '',
    amount: (json['amount'] as int?) ?? 0,
    winnerCount: (json['winner_count'] as int?) ?? 0,
    monthCount: (json['month_count'] as int?) ?? 0,
    storeProductId: (json['store_product_id'] as String?) ?? '',
    storeProductQuantity: (json['store_product_quantity'] as int?) ?? 0,
  );
}