From a7802118e55088f9e196a932c946e5d01031497b Mon Sep 17 00:00:00 2001 From: ruuushhh <66899387+ruuushhh@users.noreply.github.com> Date: Fri, 5 Jan 2024 21:06:47 +0530 Subject: [PATCH] Fix: Set Company Id (#13) * Fix: Set Company Id * Update version --- dynamics/core/client.py | 5 ++--- setup.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dynamics/core/client.py b/dynamics/core/client.py index b640063..3808628 100644 --- a/dynamics/core/client.py +++ b/dynamics/core/client.py @@ -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): @@ -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. """ @@ -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): """ diff --git a/setup.py b/setup.py index 77a61aa..23445f0 100644 --- a/setup.py +++ b/setup.py @@ -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='shwetabh.kumar@fyle.in', description='Python SDK for accessing Dynamics APIs',