Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to send additional arguments in retrieve method of AccountService class. #73

Open
prantoamt opened this issue Oct 28, 2021 · 0 comments

Comments

@prantoamt
Copy link
Contributor

Users perhaps needs to submit the financialyear value while retrieving an account.
An example of such account retrieving end-point is provided: https://api.fortnox.se/3/accounts/1010?financialyear=4

However, the retrieve() method of AccountService does not accept additional arguments like list() methods. It only accepts id.

def retrieve(self, id):
        """
        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.
        :return: Dictionary that support attriubte-style access and represent Accounts resource.
        :rtype: dict
        """
        _, _, account = self.http_client.get("/accounts/{id}".format(id=id))
        return account
prantoamt pushed a commit to prantoamt/pyfortnox that referenced this issue Oct 28, 2021
xalien10 pushed a commit that referenced this issue Aug 12, 2022
* helper function added to collect all items of paginated response

* account services list method modified to get all paginated items

* account service retrieve method modified to fix issue #73

* param name changed to kwargs

Co-authored-by: badiuzzaman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant