Skip to content

Commit

Permalink
update to ver 0.0.5 and add support for sub acc
Browse files Browse the repository at this point in the history
  • Loading branch information
thedtvn committed Aug 5, 2023
1 parent a95e3cc commit 66cad7c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import mbbank
mb = mbbank.MBBank(username="<account number>", password="<account password>" [, tesseract_path="path/to/tesseract"])
daynow = datetime.datetime.now()
lasttime = daynow - datetime.timedelta(weeks=4*3) # maximum time 3 Month
mb.getTransactionAccountHistory(from_date=lasttime, to_date=daynow)
mb.getTransactionAccountHistory(from_date=lasttime, to_date=daynow [, accountNo="<sub account number default is main account number>"])
mb.getBalance()
mb.getBalanceLoyalty()
mb.getInterestRate()
Expand All @@ -50,7 +50,7 @@ async def main():
mb = mbbank.MBBank(username="<account number>", password="<account password>" [, tesseract_path="path/to/tesseract"])
daynow = datetime.datetime.now()
lasttime = daynow - datetime.timedelta(weeks=4*3) # maximum time 3 Month
await mb.getTransactionAccountHistory(from_date=lasttime, to_date=daynow)
await mb.getTransactionAccountHistory(from_date=lasttime, to_date=daynow [, accountNo="<sub account number default is main account number>"])
await mb.getBalance()
await mb.getBalanceLoyalty()
await mb.getInterestRate()
Expand Down
2 changes: 1 addition & 1 deletion mbbank/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .main import MBBank
from .mb_async import main as mb_async

__version__ = '0.0.4'
__version__ = '0.0.5'
2 changes: 1 addition & 1 deletion mbbank/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def authenticate(self):

def getTransactionAccountHistory(self, *, from_date: datetime.datetime, to_date: datetime.datetime):
json_data = {
'accountNo': self.__userid,
'accountNo': self.__userid if accountNo is None else accountNo,
'fromDate': from_date.strftime("%d/%m/%Y"),
'toDate': to_date.strftime("%d/%m/%Y"), # max 3 months
}
Expand Down
4 changes: 2 additions & 2 deletions mbbank/mb_async/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ async def authenticate(self):
err_out = data_out["result"]
raise Exception(f"{err_out['responseCode']} | {err_out['message']}")

async def getTransactionAccountHistory(self, *, from_date: datetime.datetime, to_date: datetime.datetime):
async def getTransactionAccountHistory(self, *, accountNo:str=None, from_date: datetime.datetime, to_date: datetime.datetime):
json_data = {
'accountNo': self.__userid,
'accountNo': self.__userid if accountNo is None else accountNo,
'fromDate': from_date.strftime("%d/%m/%Y"),
'toDate': to_date.strftime("%d/%m/%Y"), # max 3 months
}
Expand Down

0 comments on commit 66cad7c

Please sign in to comment.