Skip to content

Commit

Permalink
account service retrieve method modified to fix issue xalien10#73
Browse files Browse the repository at this point in the history
  • Loading branch information
badiuzzaman committed Oct 28, 2021
1 parent b2cf077 commit 3dd5ecd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fortnox/services/account_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,21 @@ def list(self, **params):
_, _, accounts = self.http_client.get(url, params=params)
return accounts

def retrieve(self, id):
def retrieve(self, id, **params):
"""
Retrieve a single Accounts
Returns a single Account according to the unique Account ID provided
If the specified Account does not exist, this query returns an error
:calls: ``get /accounts/{id}``
:param int id: Unique identifier of a Account.
:param int id: Unique identifier of an Account.
:param dict params: (optional) Search options.
:return: Dictionary that support attriubte-style access and represent Accounts resource.
:rtype: dict
"""
_, _, account = self.http_client.get("/accounts/{id}".format(id=id))
url = f'/accounts/{id}'
_, _, account = self.http_client.get(url, params=params)
return account

def create(self, *args, **kwargs):
Expand Down

0 comments on commit 3dd5ecd

Please sign in to comment.