toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      "_id": id,
      "_type": type,
      "category": category,
      "description": description,
      "expiration_days": expirationDays,
      "name": name,
      "points": points,
      "prize_image_url": prizeImageUrl,
      "quantity": quantity,
      "quantity_limit_timeframe": quantityLimitTimeframe,
      "redeemable": redeemable,
      "require_redemption_token": requireRedemptionToken,
      "tags": List<dynamic>.from(tags.map((x) => x)),
      "tc": tc,
      "unlimited": unlimited,
      "use_point_type": usePointType,
      "user_limit": userLimit,
      "user_limit_timeframe": userLimitTimeframe,
      "filter": List<dynamic>.from(filter.map((x) => x)),
      "quantity_available": quantityAvailable,
      "image_url": imageUrl,
      "point_type": pointType,
      "point_type_id": pointTypeId,
      "sponsor": sponsor,
      "sponsor_id": sponsorId,
      "size": size,
      "use_codes_vault": useCodesVault,
      "available": available,
      "is_coupon_prize": isCouponPrize,
      "redeem_url": redeemUrl,
      "eid": eid,
      "addon_id": addonId,
      "metadata": metadata.toJson(),
      "prize_details": prizeDetails.toJson(),
      "extra_fields": List<dynamic>.from(extraFields.map((x) => x)),
      "is_external_coupon_prize": isExternalCouponPrize,
      "custom_data": List<dynamic>.from(customData.map((x) => x)),
      "shipping": shipping,
      "is_custom_prize": isCustomPrize,
    };