Skip to content

Commit 583caa6

Browse files
Format files and remove print code in message_service.py
1 parent dabc59e commit 583caa6

File tree

5 files changed

+31
-9
lines changed

5 files changed

+31
-9
lines changed

examples/sms/sms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from solapi.message_service import SolapiMessageService
2-
from solapi.model.message import Message
1+
from solapi import SolapiMessageService
2+
from solapi.model import Message
33

44
message_service = SolapiMessageService(
55
api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET"

solapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .services.message_service import SolapiMessageService
22

3-
__all__ = ['SolapiMessageService']
3+
__all__ = ["SolapiMessageService"]

solapi/model/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
from .message import Message
33
from .request.send_message_request import SendRequestConfig
44

5-
__all__ = ['Message', 'SendRequestConfig', 'KakaoOption']
5+
__all__ = ["Message", "SendRequestConfig", "KakaoOption"]

solapi/model/response/common_response.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,36 @@ class CountForChargeResponse(BaseModel):
3939
rcs_lms: dict[str, float]
4040
rcs_mms: dict[str, float]
4141
rcs_tpl: dict[str, float]
42+
rcs_itpl: dict[str, float]
43+
rcs_ltpl: dict[str, float]
44+
fax: dict[str, float]
45+
voice: dict[str, float]
46+
47+
model_config = ConfigDict(extra="ignore")
48+
49+
50+
class AppProfitResponse(BaseModel):
51+
sms: float
52+
lms: float
53+
mms: float
54+
ata: float
55+
cta: float
56+
cti: float
57+
nsa: float
58+
rcs_sms: float
59+
rcs_lms: float
60+
rcs_mms: float
61+
rcs_tpl: float
62+
rcs_itpl: float
63+
rcs_ltpl: float
64+
fax: float
65+
voice: float
4266

4367
model_config = ConfigDict(extra="ignore")
4468

4569

4670
class AppResponse(BaseModel):
47-
profit: CountForChargeResponse
71+
profit: AppProfitResponse
4872
app_id: Optional[str] = None
4973

5074
model_config = ConfigDict(
@@ -54,10 +78,10 @@ class AppResponse(BaseModel):
5478

5579
class GroupMessageResponse(BaseModel):
5680
count: CountResponse
57-
count_for_charge: Any
81+
count_for_charge: CountForChargeResponse
5882
balance: CommonCashResponse
5983
point: CommonCashResponse
60-
app: Any
84+
app: AppResponse
6185
log: Any
6286
status: str
6387
allow_duplicates: bool
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ def send(
6060
request.scheduled_date = format_with_transfer(
6161
request_config.scheduled_date
6262
)
63-
64-
print(request.model_dump(exclude_none=True, by_alias=True))
6563
response = default_fetcher(
6664
self.auth_info,
6765
request={

0 commit comments

Comments
 (0)