From ca36945a772e156a8f07be202c9af2c2b911db69 Mon Sep 17 00:00:00 2001 From: GLEF1X Date: Fri, 2 Sep 2022 18:01:10 -0400 Subject: [PATCH] :bug: Fix bug `self._phone_number` with plus sign to `self.phone_number_without_plus_sign` --- glQiwiApi/qiwi/clients/wallet/client.py | 6 +++--- glQiwiApi/types/base.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/glQiwiApi/qiwi/clients/wallet/client.py b/glQiwiApi/qiwi/clients/wallet/client.py index 3acbb581..af6965df 100644 --- a/glQiwiApi/qiwi/clients/wallet/client.py +++ b/glQiwiApi/qiwi/clients/wallet/client.py @@ -188,7 +188,7 @@ async def get_identification(self) -> Identification: """ return await self._request_service.execute_api_method( GetIdentification(), - phone_number=self._phone_number, + phone_number=self.phone_number_without_plus_sign, ) async def get_limits(self, limit_types: Sequence[str] = ALL_LIMIT_TYPES) -> Dict[str, Limit]: @@ -384,7 +384,7 @@ async def get_list_of_balances(self) -> List[Balance]: async def get_balance(self, *, account_number: int = 1) -> AmountWithCurrency: resp: List[Balance] = await self._request_service.execute_api_method( GetBalances(), - phone_number=self._phone_number, + phone_number=self.phone_number_without_plus_sign, ) return resp[account_number - 1].balance # type: ignore @@ -539,7 +539,7 @@ async def buy_qiwi_master_package(self) -> PaymentInfo: # pragma: no cover You can choose these rights when creating a new api token, to use api QIWI Master """ return await self._request_service.execute_api_method( - BuyQIWIMasterPackage(phone_number=self._phone_number) + BuyQIWIMasterPackage(phone_number=self.phone_number_without_plus_sign) ) async def issue_qiwi_master_card( diff --git a/glQiwiApi/types/base.py b/glQiwiApi/types/base.py index 83d6cca5..75db8db7 100644 --- a/glQiwiApi/types/base.py +++ b/glQiwiApi/types/base.py @@ -1,5 +1,3 @@ -from typing import Hashable - from pydantic import BaseConfig, BaseModel from glQiwiApi.utils.compat import json