create static method
InputMessageInvoice
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "inputMessageInvoice",
- String special_return_type = "inputMessageContent",
- Invoice? invoice,
- String? title,
- String? description,
- String? photo_url,
- num? photo_size,
- num? photo_width,
- num? photo_height,
- String? payload,
- String? provider_token,
- String? provider_data,
- String? start_parameter,
- InputPaidMedia? paid_media,
- FormattedText? paid_media_caption,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static InputMessageInvoice create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "inputMessageInvoice",
String special_return_type = "inputMessageContent",
Invoice? invoice,
String? title,
String? description,
String? photo_url,
num? photo_size,
num? photo_width,
num? photo_height,
String? payload,
String? provider_token,
String? provider_data,
String? start_parameter,
InputPaidMedia? paid_media,
FormattedText? paid_media_caption,
}) {
// InputMessageInvoice inputMessageInvoice = InputMessageInvoice({
final Map inputMessageInvoice_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"invoice": (invoice != null) ? invoice.toJson() : null,
"title": title,
"description": description,
"photo_url": photo_url,
"photo_size": photo_size,
"photo_width": photo_width,
"photo_height": photo_height,
"payload": payload,
"provider_token": provider_token,
"provider_data": provider_data,
"start_parameter": start_parameter,
"paid_media": (paid_media != null) ? paid_media.toJson() : null,
"paid_media_caption": (paid_media_caption != null) ? paid_media_caption.toJson() : null,
};
inputMessageInvoice_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (inputMessageInvoice_data_create_json.containsKey(key) == false) {
inputMessageInvoice_data_create_json[key] = value;
}
});
}
return InputMessageInvoice(inputMessageInvoice_data_create_json);
}