create static method
PremiumGiftCodeInfo
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "premiumGiftCodeInfo",
- String special_return_type = "premiumGiftCodeInfo",
- MessageSender? creator_id,
- num? creation_date,
- bool? is_from_giveaway,
- num? giveaway_message_id,
- num? month_count,
- num? user_id,
- num? use_date,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static PremiumGiftCodeInfo create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "premiumGiftCodeInfo",
String special_return_type = "premiumGiftCodeInfo",
MessageSender? creator_id,
num? creation_date,
bool? is_from_giveaway,
num? giveaway_message_id,
num? month_count,
num? user_id,
num? use_date,
}) {
// PremiumGiftCodeInfo premiumGiftCodeInfo = PremiumGiftCodeInfo({
final Map premiumGiftCodeInfo_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"creator_id": (creator_id != null) ? creator_id.toJson() : null,
"creation_date": creation_date,
"is_from_giveaway": is_from_giveaway,
"giveaway_message_id": giveaway_message_id,
"month_count": month_count,
"user_id": user_id,
"use_date": use_date,
};
premiumGiftCodeInfo_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (premiumGiftCodeInfo_data_create_json.containsKey(key) == false) {
premiumGiftCodeInfo_data_create_json[key] = value;
}
});
}
return PremiumGiftCodeInfo(premiumGiftCodeInfo_data_create_json);
}