You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/releases/changes-in-this-fork.rst
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,14 @@ Breaking Changes
19
19
Changes in this Fork
20
20
=====================
21
21
22
+
+------------------------+
23
+
| Scheme layer used: 194 |
24
+
+------------------------+
25
+
26
+
- Added the field ``subscription_expiration_date`` in the :obj:`~pyrogram.types.SuccessfulPayment`.
27
+
- Added the parameter ``subscription_period`` in the :meth:`~pyrogram.Client.create_invoice_link`.
28
+
- View `new and changed <https://telegramplayground.github.io/TG-APIs/TL/diff/tdlib.html?from=192&to=194>`__ `raw API methods <https://telegramplayground.github.io/TG-APIs/TL/diff/tdesktop.html?from=192&to=194>`__.
Copy file name to clipboardExpand all lines: pyrogram/methods/business/create_invoice_link.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@
17
17
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
18
18
19
19
importlogging
20
+
fromdatetimeimportdatetime
20
21
fromtypingimportList, Optional, Union
21
22
22
23
importpyrogram
@@ -34,6 +35,7 @@ async def create_invoice_link(
34
35
currency: str,
35
36
prices: List["types.LabeledPrice"],
36
37
provider_token: str=None,
38
+
subscription_period: datetime=None,
37
39
max_tip_amount: int=None,
38
40
suggested_tip_amounts: List[int] =None,
39
41
start_parameter: str=None,
@@ -73,6 +75,9 @@ async def create_invoice_link(
73
75
provider_token (``str``, *optional*):
74
76
Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified.
80
+
76
81
max_tip_amount (``int``, *optional*):
77
82
The maximum accepted amount for tips in the smallest units of the currency (integer, **not** float/double). For example, for a maximum tip of ``US$ 1.45`` pass ``max_tip_amount = 145``. See the exp parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
Copy file name to clipboardExpand all lines: pyrogram/methods/business/send_invoice.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ async def send_invoice(
91
91
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
92
92
93
93
message_thread_id (``int``, *optional*):
94
-
If the message is in a thread, ID of the original message.
94
+
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
95
95
96
96
provider_token (``str``, *optional*):
97
97
Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.
0 commit comments