|
1 | 1 | import hashlib |
2 | 2 | import hmac |
3 | 3 | import json # type: ignore |
| 4 | +import os |
| 5 | +import sys |
4 | 6 |
|
5 | | -import httpx |
6 | | -from decouple import config # type: ignore |
7 | | -from utils.constants import BASE_URL # type: ignore |
8 | | -from utils.exceptions.handleErrors import SwitchErrorStates # type: ignore |
| 7 | +sys.path.append(os.path.dirname(os.path.abspath(__file__))) |
| 8 | + |
| 9 | + |
| 10 | +import httpx # noqa: E402 |
| 11 | +from decouple import config # noqa: E402 |
| 12 | +from utils.constants import BASE_URL # noqa: E402 |
| 13 | +from utils.exceptions.handleErrors import SwitchErrorStates # noqa: E402 |
9 | 14 |
|
10 | 15 |
|
11 | 16 | class ThePeerInit: |
@@ -249,19 +254,19 @@ def refund_transaction(self, transaction_id, reason): |
249 | 254 |
|
250 | 255 |
|
251 | 256 | # test function |
252 | | -thepeer = ThePeerInit(config("PEER_SECRET_KEY")) |
253 | | -test = thepeer.index_user("Osagie Iyayi", "iyayiemmanuel1@gmail.com", "iyayiemmanuel1@gmail.com") |
| 257 | +peer = ThePeerInit(config("PEER_SECRET_KEY")) |
| 258 | +test = peer.index_user("Osagie Iyayi", "iyayiemmanuel1@gmail.com", "iyayiemmanuel1@gmail.com") |
254 | 259 |
|
255 | | -get = thepeer.update_user( |
| 260 | +get = peer.update_user( |
256 | 261 | "3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd", |
257 | 262 | identifier="iyayiemmanuel1@gmail.com", |
258 | 263 | name="Osagie Iyayi", |
259 | 264 | email="iyayiemmanuel1@gmail.com", |
260 | 265 | ) |
261 | 266 |
|
262 | 267 | # get = thepeer.all_users() |
263 | | -charge = thepeer.authorize_direct_charge("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd", "failed") |
264 | | -view = thepeer.view_user("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd") |
| 268 | +charge = peer.authorize_direct_charge("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd", "failed") |
| 269 | +view = peer.view_user("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd") |
265 | 270 | # print(test) |
266 | 271 | # print(view) |
267 | 272 | # print(get) |
0 commit comments