Skip to content

Commit

Permalink
Fix dependencies (#34)
Browse files Browse the repository at this point in the history
* fix: lib dependencies

* fix: lib dependencies

* fix: lib dependencies

* fix: lib dependencies

* fix: lib dependencies

* fix: lib dependencies

* fix: lib dependencies

---------

Co-authored-by: GitHub Actions <integrations@fylehq.com>
  • Loading branch information
ruuushhh and GitHub Actions authored Jan 17, 2025
1 parent 6e15910 commit ab9f384
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
21 changes: 11 additions & 10 deletions qbosdk/apis/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,32 +118,33 @@ def _query_get_all_generator(self, object_type: str, url: str) -> Generator[Dict
break

logger.debug('Response for get request for url: %s, %s', url, response.text)

yield query_response[object_type]

start_position += 1000

except requests.exceptions.HTTPError as err:
logger.info('Response for get request for url: %s, %s', url, err.response.text)
if err.response.status_code == 400:
raise WrongParamsError('Some of the parameters are wrong', err.response.text)
raise WrongParamsError('Some of the parameters are wrong', err.response.text) from err

if err.response.status_code == 401:
raise InvalidTokenError('Invalid token, try to refresh it', err.response.text)
raise InvalidTokenError('Invalid token, try to refresh it', err.response.text) from err

if err.response.status_code == 403:
raise NoPrivilegeError('Forbidden, the user has insufficient privilege', err.response.text)
raise NoPrivilegeError('Forbidden, the user has insufficient privilege', err.response.text) from err

if err.response.status_code == 404:
raise NotFoundItemError('Not found item with ID', err.response.text)
raise NotFoundItemError('Not found item with ID', err.response.text) from err

if err.response.status_code == 498:
raise ExpiredTokenError('Expired token, try to refresh it', err.responseesponse.text)
raise ExpiredTokenError('Expired token, try to refresh it', err.response.text) from err

if err.response.status_code == 500:
raise InternalServerError('Internal server error', err.response.text)
raise InternalServerError('Internal server error', err.response.text) from err

raise QuickbooksOnlineSDKError('Error: {0}'.format(err.response.status_code), err.response.text)
raise QuickbooksOnlineSDKError('Error: {0}'.format(err.response.status_code),
err.response.text) from err

def _query(self, url: str) -> List[Dict]:
"""
Expand Down Expand Up @@ -258,7 +259,7 @@ def _post_request(self, data, api_url):
logger.debug('Response for post request: %s', response.text)
result = json.loads(response.text)
return result

logger.debug('Payload for post request: %s', data)
logger.info('Response for post request: %s', response.text)

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
requests>=2.25.0
future==0.18.2
pylint==2.17.2
future==1.0.0
pylint==2.7.4
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name='qbosdk',
version='0.20.0',
version='0.21.0',
author='Shwetabh Kumar',
author_email='shwetabh.kumar@fyle.in',
description='Python SDK for accessing Quickbooks Online APIs',
Expand Down

0 comments on commit ab9f384

Please sign in to comment.