Skip to content

Commit

Permalink
Fix: Set Company Id (#13)
Browse files Browse the repository at this point in the history
* Fix: Set Company Id

* Update version
  • Loading branch information
ruuushhh authored Jan 5, 2024
1 parent 465faab commit a780211
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions dynamics/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def __init__(
access_token = self.__refresh_access_token()
self.set_server_url()
self.set_batch_url()
self.set_company_id()
self.update_access_token(access_token)

def update_access_token(self, access_token: str):
Expand All @@ -76,7 +75,7 @@ def update_access_token(self, access_token: str):
for api in api_instances:
api.change_access_token(token)

def set_company_id(self):
def set_company_id(self, company_id: str):
"""
Set the Company ID in all API objects.
"""
Expand All @@ -87,7 +86,7 @@ def set_company_id(self):

# Set company ID for all API instances
for api in api_instances:
api.set_company_id(self.__company_id)
api.set_company_id(company_id)

def set_batch_url(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='ms-dynamics-business-central-sdk',
version='1.3.1',
version='1.3.2',
author='Shwetabh Kumar',
author_email='[email protected]',
description='Python SDK for accessing Dynamics APIs',
Expand Down

0 comments on commit a780211

Please sign in to comment.