mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-25 16:41:35 +00:00
Merge branch 'main' of https://github.com/jay0lee/GAM into main
This commit is contained in:
@@ -13,10 +13,7 @@ from gam.gapi import cloudidentity as gapi_cloudidentity
|
||||
|
||||
def _get_customerid():
|
||||
''' returns customer in format needed for this API'''
|
||||
customer = GC_Values[GC_CUSTOMER_ID]
|
||||
if customer.startswith('C'):
|
||||
customer = customer[1:]
|
||||
return f'customers/{customer}'
|
||||
return f'customers/{GC_Values[GC_CUSTOMER_ID]}'
|
||||
|
||||
def _reduce_name(name):
|
||||
''' converts long name into email address'''
|
||||
@@ -33,12 +30,9 @@ def _generic_action(action):
|
||||
'send': 'Sending'
|
||||
}
|
||||
print_action = action_map[action]
|
||||
kwargs = {}
|
||||
if action != 'get':
|
||||
kwargs['body'] = {}
|
||||
print(f'{print_action} user invite...')
|
||||
result = gapi.call(svc.customers().userinvitations(), action,
|
||||
name=name, **kwargs)
|
||||
name=name)
|
||||
name = result.get('response', {}).get('name')
|
||||
if name:
|
||||
result['response']['name'] = _reduce_name(name)
|
||||
|
||||
Reference in New Issue
Block a user