diff --git a/telegram/bot.py b/telegram/bot.py index 1febaaaa294..55e17a60c3c 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -2202,6 +2202,8 @@ def send_invoice(self, reply_to_message_id=None, reply_markup=None, provider_data=None, + send_phone_number_to_provider=None, + send_email_to_provider=None, timeout=None, **kwargs): """Use this method to send invoices. @@ -2236,6 +2238,10 @@ def send_invoice(self, complete the order. need_shipping_address (:obj:`bool`, optional): Pass True, if you require the user's shipping address to complete the order. + send_phone_number_to_provider (:obj:`bool`, optional): Pass True, if user's phone + number should be sent to provider. + send_email_to_provider (:obj:`bool`, optional): Pass True, if user's email address + should be sent to provider. is_flexible (:obj:`bool`, optional): Pass True, if the final price depends on the shipping method. disable_notification (:obj:`bool`, optional): Sends the message silently. Users will @@ -2292,6 +2298,10 @@ def send_invoice(self, data['need_shipping_address'] = need_shipping_address if is_flexible is not None: data['is_flexible'] = is_flexible + if send_phone_number_to_provider is not None: + data['send_phone_number_to_provider'] = send_email_to_provider + if send_email_to_provider is not None: + data['send_email_to_provider'] = send_email_to_provider return url, data diff --git a/tests/test_invoice.py b/tests/test_invoice.py index 88a3d454693..bfaa8d51240 100644 --- a/tests/test_invoice.py +++ b/tests/test_invoice.py @@ -100,6 +100,8 @@ def test_send_all_args(self, bot, chat_id, provider_token): need_phone_number=True, need_email=True, need_shipping_address=True, + send_phone_number_to_provider=True, + send_email_to_provider=True, is_flexible=True) assert message.invoice.currency == self.currency pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy