create static method

InputMessageInvoice create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "inputMessageInvoice",
  3. String special_return_type = "inputMessageContent",
  4. Invoice? invoice,
  5. String? title,
  6. String? description,
  7. String? photo_url,
  8. num? photo_size,
  9. num? photo_width,
  10. num? photo_height,
  11. String? payload,
  12. String? provider_token,
  13. String? provider_data,
  14. String? start_parameter,
  15. InputPaidMedia? paid_media,
  16. 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);
}