def generate_qbc_file(app_name="Quickbooks Integrator", app_id=0, app_url="http://localhost:8000/quickbooks/", app_description="Localhost Quickbooks ", app_support="http://localhost:8000/", username="******", owner_id="{%s}" % (unique()), file_id="{%s}" % (unique()), qb_type="QBFS", run_every="RunEveryNMinutes", run_time=1, read_only=False): """ Generates a quickbooks webconnector xml :param app_name: :param app_id: :param app_url: :param app_description: :param app_support: :param username: :param owner_id: :param file_id: :param qb_type: :param run_every: :param run_time: :param read_only: :return: xml string """ c = { "QBWCXML": { "AppName": app_name, "AppID": app_id, "AppURL": app_url, "AppDescription": app_description, "AppSupport": app_support, "UserName": username, "OwnerID": owner_id, "FileID": file_id, "QBType": qb_type, "Scheduler": { run_every: run_time }, "IsReadOnly": "false" if read_only == False else "true" } } return xmltodict.unparse(c)
def generate_qbc_file(app_name = "Quickbooks Integrator", app_id = 0, app_url = "http://localhost:8000/quickbooks/", app_description="Localhost Quickbooks ", app_support = "http://localhost:8000/", username="******", owner_id="{%s}" %(unique()), file_id="{%s}" %(unique()), qb_type="QBFS", run_every="RunEveryNMinutes", run_time = 1, read_only=False): """ Generates a quickbooks webconnector xml :param app_name: :param app_id: :param app_url: :param app_description: :param app_support: :param username: :param owner_id: :param file_id: :param qb_type: :param run_every: :param run_time: :param read_only: :return: xml string """ c = { "QBWCXML" : { "AppName" : app_name, "AppID" : app_id, "AppURL" : app_url, "AppDescription" : app_description, "AppSupport" : app_support, "UserName" : username, "OwnerID" : owner_id, "FileID" : file_id, "QBType" : qb_type, "Scheduler" : { run_every : run_time }, "IsReadOnly" : "false" if read_only == False else "true" } } return xmltodict.unparse(c)
def __init__(self, name, agent, configuration): unique_string = name + "_" + str(unique()) self.process_name = 'ape_consumer_' + unique_string self.easy_registration = True self._transform_pid = None super(DataProductConsumer,self).__init__(name, agent, configuration)