Skip to content

Commit

Permalink
fix unknown package bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtabaakbari221b committed Jan 2, 2023
1 parent f054507 commit 882be09
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions sms_ir/services.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import requests
from typing import List
from mixins import RequestsMixin, LoggerMixin

response = requests.models.Response
from requests.models import Response
from .mixins import RequestsMixin, LoggerMixin


class SmsIr(RequestsMixin, LoggerMixin):
Expand All @@ -28,12 +26,12 @@ def send_sms(
number: str,
message: str,
linenumber: int|None = None,
) -> response:
) -> Response:
"""
Send message to specific mobile number
"""

self.send_bulk_sms(
return self.send_bulk_sms(
numbers=[number],
message=message,
linenumber=linenumber,
Expand All @@ -44,7 +42,7 @@ def send_bulk_sms(
numbers: List[str],
message: str,
linenumber: int|None = None,
) -> response:
) -> Response:
"""
Send message to multiple mobile numbers
"""
Expand All @@ -68,7 +66,7 @@ def send_like_to_like(
messages: List[str],
linenumber: int|None =None,
send_date_time: str|None =None,
) -> response:
) -> Response:
"""
Send multiple messages to multiple mobile numbers pair to pair
"""
Expand All @@ -90,7 +88,7 @@ def send_like_to_like(
def delete_scheduled(
self,
pack_id: int,
) -> response:
) -> Response:
"""
Delete scheduled message pack
"""
Expand All @@ -106,7 +104,7 @@ def send_verify_code(
number: int,
template_id: int,
parameters: List,
) -> response:
) -> Response:
"""
Send verification code with predefined template
"""
Expand All @@ -127,7 +125,7 @@ def send_verify_code(
def report_message(
self,
message_id: int,
) -> response:
) -> Response:
"""
get report of sent message
"""
Expand All @@ -141,7 +139,7 @@ def report_message(
def report_pack(
self,
pack_id: int,
) -> response:
) -> Response:
"""
get report of sent message pack
"""
Expand All @@ -156,7 +154,7 @@ def report_today(
self,
page_size: int,
page_number: int,
) -> response:
) -> Response:
"""
get report of Today sent Messages
"""
Expand All @@ -179,7 +177,7 @@ def report_archived(
to_date: int|None =None,
page_size: int =10,
page_number: int =1,
) -> response:
) -> Response:
"""
get report of Archived Messages
"""
Expand All @@ -201,7 +199,7 @@ def report_archived(
def report_latest_received(
self,
count: int,
) -> response:
) -> Response:
"""
get report of latest received messages
"""
Expand All @@ -221,7 +219,7 @@ def report_today_received(
self,
page_size: int,
page_number: int,
) -> response:
) -> Response:
"""
get report of today received messages
"""
Expand All @@ -244,7 +242,7 @@ def report_archived_received(
to_date: int|None =None,
page_size: int =10,
page_number: int =1,
) -> response:
) -> Response:
"""
get report of today received messages
"""
Expand All @@ -263,7 +261,7 @@ def report_archived_received(
data,
)

def get_credit(self) -> response:
def get_credit(self) -> Response:
"""
get account credit
"""
Expand All @@ -274,7 +272,7 @@ def get_credit(self) -> response:
url,
)

def get_line_numbers(self) -> response:
def get_line_numbers(self) -> Response:
"""
get account line numbers
"""
Expand Down

0 comments on commit 882be09

Please sign in to comment.