SageIntacctSDK(sender_id, sender_password, user_id, company_id, user_password, entity_id=None)
Sage Intacct SDK
Initialize connection to Sage Intacct
:param sender_id: Sage Intacct sender id
:param sender_password: Sage Intacct sener password
:param user_id: Sage Intacct user id
:param company_id: Sage Intacct company id
:param user_password: Sage Intacct user password
:param (optional) entity_id: Sage Intacct entity ID
Source code in hypha/apply/projects/services/sageintacct/sageintacctsdk.py
| def __init__(
self,
sender_id: str,
sender_password: str,
user_id: str,
company_id: str,
user_password: str,
entity_id: str = None,
):
"""
Initialize connection to Sage Intacct
:param sender_id: Sage Intacct sender id
:param sender_password: Sage Intacct sener password
:param user_id: Sage Intacct user id
:param company_id: Sage Intacct company id
:param user_password: Sage Intacct user password
:param (optional) entity_id: Sage Intacct entity ID
"""
# Initializing variables
self.__sender_id = sender_id
self.__sender_password = sender_password
self.__user_id = user_id
self.__company_id = company_id
self.__user_password = user_password
self.__entity_id = entity_id
self.api_base = ApiBase()
self.purchasing = Purchasing()
self.project = Project()
self.invoice = Invoice()
self.update_sender_id()
self.update_sender_password()
self.update_session_id()
|
api_base
instance-attribute
purchasing
instance-attribute
project
instance-attribute
invoice
instance-attribute
update_sender_id
Update the sender id in all API objects.
Source code in hypha/apply/projects/services/sageintacct/sageintacctsdk.py
| def update_sender_id(self):
"""
Update the sender id in all API objects.
"""
self.api_base.set_sender_id(self.__sender_id)
self.purchasing.set_sender_id(self.__sender_id)
self.project.set_sender_id(self.__sender_id)
self.invoice.set_sender_id(self.__sender_id)
|
update_sender_password
Update the sender password in all API objects.
Source code in hypha/apply/projects/services/sageintacct/sageintacctsdk.py
| def update_sender_password(self):
"""
Update the sender password in all API objects.
"""
self.api_base.set_sender_password(self.__sender_password)
self.purchasing.set_sender_password(self.__sender_password)
self.project.set_sender_password(self.__sender_password)
self.invoice.set_sender_password(self.__sender_password)
|
update_session_id
Update the session id and change it in all API objects.
Source code in hypha/apply/projects/services/sageintacct/sageintacctsdk.py
| def update_session_id(self):
"""
Update the session id and change it in all API objects.
"""
self.__session_id = self.api_base.get_session_id(
self.__user_id, self.__company_id, self.__user_password, self.__entity_id
)
self.api_base.set_session_id(self.__session_id)
self.purchasing.set_session_id(self.__session_id)
self.project.set_session_id(self.__session_id)
self.invoice.set_session_id(self.__session_id)
|