mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
8f865f4911
- Updated imports and references from TON to GRAM across multiple modules. - Renamed functions and variables to reflect the change from TON to GRAM. - Adjusted validation checks for top-up and recharge amounts to use GRAM limits. - Modified error messages and exceptions to indicate GRAM instead of TON. - Updated tests to ensure they reflect the new GRAM terminology and functionality. - Introduced new constants for GRAM-related configurations.
20 lines
702 B
Python
20 lines
702 B
Python
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from pyfragment.domains.ads.recharge import recharge_ads
|
|
from pyfragment.domains.ads.tonup import topup_gram
|
|
from pyfragment.domains.base import BaseService
|
|
from pyfragment.models.payments import AdsRechargeResult, AdsTopupResult
|
|
|
|
if TYPE_CHECKING:
|
|
pass
|
|
|
|
|
|
class AdsService(BaseService):
|
|
async def recharge_ads(self, account: str, amount: int) -> AdsRechargeResult:
|
|
return await recharge_ads(self._client, account, amount)
|
|
|
|
async def topup_gram(self, username: str, amount: int, show_sender: bool = True) -> AdsTopupResult:
|
|
return await topup_gram(self._client, username, amount, show_sender=show_sender)
|