@@ -31,7 +31,7 @@ class IdentityType(Enum):
3131 federatedID = 3
3232
3333
34- class IfAlreadyExistsOptions (Enum ):
34+ class IfAlreadyExistsOption (Enum ):
3535 ignoreIfAlreadyExists = 1
3636 updateIfAlreadyExists = 2
3737 errorIfAlreadyExists = 3
@@ -79,7 +79,7 @@ def __repr__(self):
7979
8080 def create (self , email , first_name = None ,
8181 last_name = None , country = None , id_type = IdentityType .federatedID ,
82- on_conflict = IfAlreadyExistsOptions .ignoreIfAlreadyExists ):
82+ on_conflict = IfAlreadyExistsOption .ignoreIfAlreadyExists ):
8383 """
8484 Create the user on the Adobe back end.
8585 See [Issue 32](https://github.com/adobe-apiplatform/umapi-client.py/issues/32): because
@@ -99,11 +99,11 @@ def create(self, email, first_name=None,
9999 # first validate the params: email, on_conflict, first_name, last_name, country
100100 create_params = {}
101101 create_params ["email" ] = email
102- if on_conflict in IfAlreadyExistsOptions .__members__ :
103- on_conflict = IfAlreadyExistsOptions [on_conflict ]
104- if on_conflict not in IfAlreadyExistsOptions :
105- raise ArgumentError ("on_conflict must be one of {}" .format ([o .name for o in IfAlreadyExistsOptions ]))
106- if on_conflict != IfAlreadyExistsOptions .errorIfAlreadyExists :
102+ if on_conflict in IfAlreadyExistsOption .__members__ :
103+ on_conflict = IfAlreadyExistsOption [on_conflict ]
104+ if on_conflict not in IfAlreadyExistsOption :
105+ raise ArgumentError ("on_conflict must be one of {}" .format ([o .name for o in IfAlreadyExistsOption ]))
106+ if on_conflict != IfAlreadyExistsOption .errorIfAlreadyExists :
107107 create_params ["option" ] = on_conflict .name
108108 if first_name : create_params ["firstname" ] = first_name
109109 if last_name : create_params ["lastname" ] = last_name
@@ -306,7 +306,7 @@ def remove_users(self, users=None):
306306 ulist = {"user" : [user for user in users ]}
307307 return self .append (remove = ulist )
308308
309- def create (self , option = IfAlreadyExistsOptions .ignoreIfAlreadyExists , description = None ):
309+ def create (self , option = IfAlreadyExistsOption .ignoreIfAlreadyExists , description = None ):
310310 # only validate name on create/update so we can allow profiles and users to be managed for
311311 # system groups
312312 self ._validate (self .frame ['usergroup' ])
0 commit comments