replyInvoice method

Future<Message> replyInvoice(
  1. String title,
  2. String description,
  3. String payload,
  4. String providerToken,
  5. String currency,
  6. List<LabeledPrice> prices, {
  7. bool withQuote = false,
  8. int? maxTipAmount,
  9. List<int>? suggestedTipAmounts,
  10. String? startParameter,
  11. String? providerData,
  12. String? photoUrl,
  13. int? photoSize,
  14. int? photoWidth,
  15. int? photoHeight,
  16. bool? needName,
  17. bool? needPhoneNumber,
  18. bool? needEmail,
  19. bool? needShippingAddress,
  20. bool? sendPhoneNumberToProvider,
  21. bool? sendEmailToProvider,
  22. bool? isFlexible,
  23. bool? disableNotification,
  24. bool? protectContent,
  25. bool? allowSendingWithoutReply,
  26. InlineKeyboardMarkup? replyMarkup,
})

Reply to the recieved message with an invoice

A wrapper around TeleDart.sendInvoice. On success, returns the sent Message.

Apart from a title, a description, a payload, a providerToken and a list of prices, it can also take some options that control the message appearance and behavior.

Check Telegram API documentation for more information about those options.

Implementation

Future<Message> replyInvoice(
  String title,
  String description,
  String payload,
  String providerToken,
  String currency,
  List<LabeledPrice> prices, {
  bool withQuote = false,
  int? maxTipAmount,
  List<int>? suggestedTipAmounts,
  String? startParameter,
  String? providerData,
  String? photoUrl,
  int? photoSize,
  int? photoWidth,
  int? photoHeight,
  bool? needName,
  bool? needPhoneNumber,
  bool? needEmail,
  bool? needShippingAddress,
  bool? sendPhoneNumberToProvider,
  bool? sendEmailToProvider,
  bool? isFlexible,
  bool? disableNotification,
  bool? protectContent,
  bool? allowSendingWithoutReply,
  InlineKeyboardMarkup? replyMarkup,
}) =>
    _teledart.sendInvoice(
        chat.id, title, description, payload, providerToken, currency, prices,
        messageThreadId: messageThreadId,
        maxTipAmount: maxTipAmount,
        suggestedTipAmounts: suggestedTipAmounts,
        startParameter: startParameter,
        providerData: providerData,
        photoUrl: photoUrl,
        photoSize: photoSize,
        photoWidth: photoWidth,
        photoHeight: photoHeight,
        needName: needName,
        needPhoneNumber: needPhoneNumber,
        needEmail: needEmail,
        needShippingAddress: needShippingAddress,
        sendPhoneNumberToProvider: sendPhoneNumberToProvider,
        sendEmailToProvider: sendEmailToProvider,
        isFlexible: isFlexible,
        disableNotification: disableNotification,
        protectContent: protectContent,
        replyToMessageId: withQuote ? messageId : null,
        allowSendingWithoutReply: allowSendingWithoutReply,
        replyMarkup: replyMarkup);