@@ -341,3 +341,39 @@ def upload_plugin(self, plugin_path):
341
341
upm_token = self .request (method = 'GET' , path = 'rest/plugins/1.0/' , headers = headers ).headers ['upm-token' ]
342
342
url = 'rest/plugins/1.0/?token={upm_token}' .format (upm_token = upm_token )
343
343
return self .post (url , files = files , headers = headers )
344
+
345
+ """
346
+ #######################################################################
347
+ # Tempo Account Rest Api implements #
348
+ #######################################################################
349
+ """
350
+
351
+ def tempo_account_get_accounts (self , skip_archived = None , expand = None ):
352
+ """
353
+ Get all Accounts that the logged in user has permission to browse.
354
+ :param skip_archived: bool OPTIONAL: skip archived Accounts, either true or false, default value true.
355
+ :param expand: bool OPTIONAL: With expanded data or not
356
+ :return:
357
+ """
358
+ params = {}
359
+ if skip_archived is not None :
360
+ params ['skipArchived' ] = skip_archived
361
+ if expand is not None :
362
+ params ['expand' ] = expand
363
+ url = 'rest/tempo-accounts/1/account'
364
+ return self .get (url , params = params )
365
+
366
+ def tempo_account_get_customers (self , query = None , count_accounts = None ):
367
+ """
368
+ Gets all or some Attribute whose key or name contain a specific substring. Attributes can be a Category or Customer.
369
+ :param query: OPTIONAL: query for search
370
+ :param count_accounts: bool OPTIONAL: provide how many associated Accounts with Customer
371
+ :return: list of customers
372
+ """
373
+ params = {}
374
+ if query is not None :
375
+ params ['query' ] = query
376
+ if count_accounts is not None :
377
+ params ['countAccounts' ] = count_accounts
378
+ url = 'rest/tempo-accounts/1/customer'
379
+ return self .get (url , params = params )
0 commit comments