Update test data

This commit is contained in:
2022-11-25 23:03:43 +13:00
parent bbd2083109
commit f10b39a3ba
7 changed files with 82 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import requests
import logging
gimport logging
from requests.auth import HTTPBasicAuth
from akauntingpy import exceptions
@@ -7,9 +7,9 @@ from akauntingpy.helpers import *
__version__ = "1.0.5"
logger = logging.getLogger(__name__)
class Client(object):
"""
Akaunting interface.
@@ -73,7 +73,7 @@ class Client(object):
# raise exceptions.Error(response_['message'])
elif response.status_code == 429:
# We hit the maximum requests
raise exceptions.TooManyAttempts(response_['message'])
raise exceptions.TooManyAttempts(response_['message'])
return response_
def ping(self):
@@ -168,7 +168,7 @@ class Client(object):
transferred_at=None, # Date of expense/transfer or income
payment_method="Bank Transfer", # Payment method
amount=None, # Amount received/paid
**params # Any additional parameters
**params # Any additional parameters
):
logger.info("Transfer called with parameters")
logger.info("from_account_id: %s", from_account_id)
@@ -176,7 +176,7 @@ class Client(object):
logger.info("transferred_at: %s", transferred_at)
logger.info("payment_method: %s", payment_method)
logger.info("amount: %s", amount)
data = self.call(endpoint="transfers",
method="POST",
from_account_id=from_account_id,