mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
ae164d4fe7
- Added MarketplaceService for searching usernames, numbers, and gifts. - Introduced PurchasesService for purchasing stars and premium subscriptions. - Created WalletService for wallet operations including balance checks and top-ups. - Developed transaction handling for TON and USDT transfers. - Added models for payments, marketplace results, and wallet information. - Implemented error handling for various operations including wallet and transaction errors. - Established domain structure for purchases, marketplace, and wallet functionalities.
35 lines
826 B
Python
35 lines
826 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
from typing import Any
|
|
|
|
|
|
@dataclass
|
|
class UsernamesResult:
|
|
items: list[dict[str, Any]]
|
|
next_offset_id: str | None
|
|
|
|
def __repr__(self) -> str:
|
|
return f"UsernamesResult(items={len(self.items)}, next_offset_id={self.next_offset_id!r})"
|
|
|
|
|
|
@dataclass
|
|
class NumbersResult:
|
|
items: list[dict[str, Any]]
|
|
next_offset_id: str | None
|
|
|
|
def __repr__(self) -> str:
|
|
return f"NumbersResult(items={len(self.items)}, next_offset_id={self.next_offset_id!r})"
|
|
|
|
|
|
@dataclass
|
|
class GiftsResult:
|
|
items: list[dict[str, Any]]
|
|
next_offset: int | None
|
|
|
|
def __repr__(self) -> str:
|
|
return f"GiftsResult(items={len(self.items)}, next_offset={self.next_offset!r})"
|
|
|
|
|
|
__all__ = ["GiftsResult", "NumbersResult", "UsernamesResult"]
|