diff options
Diffstat (limited to 'models')
| -rw-r--r-- | models/callback_data.py | 9 | ||||
| -rw-r--r-- | models/payment.py | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/models/callback_data.py b/models/callback_data.py index f9c9a26..5ee38bd 100644 --- a/models/callback_data.py +++ b/models/callback_data.py | |||
| @@ -28,3 +28,12 @@ class InvoicePageClb(CallbackData, prefix="invoice.p"): | |||
| 28 | class InvoiceItemClb(CallbackData, prefix="invoice.i"): | 28 | class InvoiceItemClb(CallbackData, prefix="invoice.i"): |
| 29 | page: int | 29 | page: int |
| 30 | invoice_id: int | 30 | invoice_id: int |
| 31 | |||
| 32 | |||
| 33 | class PaymentPageClb(CallbackData, prefix="payment.p"): | ||
| 34 | page: int | ||
| 35 | |||
| 36 | |||
| 37 | class PaymentItemClb(CallbackData, prefix="payment.i"): | ||
| 38 | page: int | ||
| 39 | payment_id: int | ||
diff --git a/models/payment.py b/models/payment.py index afae642..ea61817 100644 --- a/models/payment.py +++ b/models/payment.py | |||
| @@ -23,18 +23,21 @@ class ReceiptFile(BaseModel): | |||
| 23 | self, | 23 | self, |
| 24 | bot: Bot, | 24 | bot: Bot, |
| 25 | user_id: int, | 25 | user_id: int, |
| 26 | caption: str | None = None, | ||
| 26 | reply_markup: ReplyMarkupUnion | None = None, | 27 | reply_markup: ReplyMarkupUnion | None = None, |
| 27 | ) -> Message: | 28 | ) -> Message: |
| 28 | if self.type == ReceiptFileType.DOCUMENT: | 29 | if self.type == ReceiptFileType.DOCUMENT: |
| 29 | return await bot.send_document( | 30 | return await bot.send_document( |
| 30 | user_id, | 31 | user_id, |
| 31 | document=self.file_id, | 32 | document=self.file_id, |
| 33 | caption=caption, | ||
| 32 | reply_markup=reply_markup, | 34 | reply_markup=reply_markup, |
| 33 | ) | 35 | ) |
| 34 | else: | 36 | else: |
| 35 | return await bot.send_photo( | 37 | return await bot.send_photo( |
| 36 | user_id, | 38 | user_id, |
| 37 | photo=self.file_id, | 39 | photo=self.file_id, |
| 40 | caption=caption, | ||
| 38 | reply_markup=reply_markup, | 41 | reply_markup=reply_markup, |
| 39 | ) | 42 | ) |
| 40 | 43 | ||
