create static method
MessageInvoice
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "messageInvoice",
- String special_return_type = "messageContent",
- ProductInfo? product_info,
- String? currency,
- num? total_amount,
- String? start_parameter,
- bool? is_test,
- bool? need_shipping_address,
- num? receipt_message_id,
- PaidMedia? paid_media,
- FormattedText? paid_media_caption,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static MessageInvoice create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "messageInvoice",
String special_return_type = "messageContent",
ProductInfo? product_info,
String? currency,
num? total_amount,
String? start_parameter,
bool? is_test,
bool? need_shipping_address,
num? receipt_message_id,
PaidMedia? paid_media,
FormattedText? paid_media_caption,
}) {
// MessageInvoice messageInvoice = MessageInvoice({
final Map messageInvoice_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"product_info": (product_info != null) ? product_info.toJson() : null,
"currency": currency,
"total_amount": total_amount,
"start_parameter": start_parameter,
"is_test": is_test,
"need_shipping_address": need_shipping_address,
"receipt_message_id": receipt_message_id,
"paid_media": (paid_media != null) ? paid_media.toJson() : null,
"paid_media_caption": (paid_media_caption != null) ? paid_media_caption.toJson() : null,
};
messageInvoice_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (messageInvoice_data_create_json.containsKey(key) == false) {
messageInvoice_data_create_json[key] = value;
}
});
}
return MessageInvoice(messageInvoice_data_create_json);
}