Models#
- pydantic model pyspw.models.Transaction#
 Bases:
BaseModelПараметры транзакции
- Validators:
 receiver_type»receiver
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
 A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- field receiver: str [Required]#
 Карта получателя тразакции
- Validated by:
 receiver_type
- field amount: int [Required]#
 Сумма которую должен оплатить пользователь
- Constraints:
 ge = 1
- field comment: str [Required]#
 Комментарий к транзакции
- Constraints:
 min_length = 1
max_length = 32
- validator receiver_type » receiver#
 Проверяет номер карты на валидность
- pydantic model pyspw.models.Payment#
 Bases:
BaseModelПараметры оплаты
- Validators:
 verify_amount»itemsverify_url»redirectUrlverify_url»webhookUrl
- field items: List[PaymentItem] [Required]#
 Список товаров, которые оплачивает пользователь
- Constraints:
 min_length = 1
- Validated by:
 verify_amount
- field redirectUrl: str [Required]#
 Ссылка на которую перенаправит пользователя после успешной оплаты
- Validated by:
 verify_url
- field webhookUrl: str [Required]#
 Ссылка вебхука, туда придет сообщение об успешной оплат.
- Validated by:
 verify_url
- field data: str [Required]#
 Полезные данные, которые вы хотите получить в будущем вместе с вебхуком
- Constraints:
 max_length = 100
- validator verify_url » webhookUrl, redirectUrl#
 Проверяет URL на валидность
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
 A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- validator verify_amount » items#
 Проверяет не превышен ли придел в 10000 на общую сумму товаров
- pydantic model pyspw.models.PaymentItem#
 Bases:
BaseModelТовар для оплаты
- field name: str [Required]#
 Количество товара.
- Constraints:
 min_length = 3
max_length = 64
- field count: int [Required]#
 Цена товара.
- Constraints:
 ge = 1
le = 9999
- field price: int [Required]#
 Комментарий к товару.
- Constraints:
 ge = 1
le = 1728
- field comment: str = None#
 - Constraints:
 min_length = 3
max_length = 64
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
 A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model pyspw.models.Card#
 Bases:
BaseModel- field id: Optional[str] = None#
 
- field name: str [Required]#
 
- field number: str [Required]#
 
- field color: Optional[int] = None#
 
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
 A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model pyspw.models.SelfCard#
 Bases:
BaseModel- field balance: int [Required]#
 
- field webhook: Optional[str] [Required]#
 
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
 A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model pyspw.models.User#
 Bases:
BaseModel- field username: Optional[str] [Required]#
 
- field uuid: Optional[str] [Required]#
 
- property nickname: Optional[str]#
 
- get_profile() Optional[UserProfile]#
 
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
 A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model pyspw.models.SelfUser#
 Bases:
BaseModel- field id: str [Required]#
 
- field username: str [Required]#
 
- field uuid: Optional[str] [Required]#
 
- field status: str [Required]#
 
- field roles: List[str] [Required]#
 
- field createdAt: datetime [Required]#
 
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
 A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class pyspw.models.Skin(profile: UserProfile)#
 Bases:
object- property variant: SkinVariant#
 
- property cape: Optional[SkinPart]#
 
- get_face(image_size: int = 64) SkinPart#
 
- get_front(image_size: int = 64) SkinPart#
 
- get_front_full(image_size: int = 64) SkinPart#
 
- get_head(image_size: int = 64) SkinPart#
 
- get_bust(image_size: int = 64) SkinPart#
 
- get_full(image_size: int = 64) SkinPart#
 
- get_skin(image_size: int = 64) SkinPart#
 
- class pyspw.models.SkinVariant(value)#
 Bases:
EnumВарианты скинов.
- SLIM = 'slim'#
 
- CLASSIC = 'classic'#
 
- pydantic model pyspw.models.City#
 Bases:
BaseModel- field id: str [Required]#
 
- field name: str [Required]#
 
- field description: str [Required]#
 
- field x: int [Required]#
 
- field z: int [Required]#
 
- field isMayor: bool [Required]#
 
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
 A dictionary of computed field names and their corresponding ComputedFieldInfo objects.