@@ -161,7 +161,12 @@ def create_key(token, product_id, period = 0,\
161161 add_or_use_existing_customer = False ,\
162162 trial_activation = False ,\
163163 max_no_of_machines = 0 ,\
164- no_of_keys = 1 ):
164+ no_of_keys = 1 ,\
165+ name = None ,\
166+ email = None ,\
167+ company_name = None ,\
168+ enable_customer_association = False ,\
169+ allow_activation_management = False ):
165170 """
166171 This method allows you to create a new license key. The license can
167172 either be standalone or associated to a specific customer. It is also
@@ -170,6 +175,12 @@ def create_key(token, product_id, period = 0,\
170175 duplicates based on the email, you can use the AddOrUseExistingCustomer
171176 parameter.
172177
178+ The parameters "name", "email", "company_name", "enable_customer_association"
179+ and "allow_activation_management" are used to create a new customer (or update an existing one)
180+ and automatically associate it with the newly created license. Please note that you need to use an
181+ access token with both "CreateKey" and "AddCustomer" permissions. Moreover, either
182+ the parameter "new_customer" or "add_or_use_existing_customer" need to be set to True.
183+
173184 More docs: https://app.cryptolens.io/docs/api/v3/CreateKey/
174185 """
175186
@@ -194,7 +205,12 @@ def create_key(token, product_id, period = 0,\
194205 "AddOrUseExistingCustomer" : add_or_use_existing_customer ,\
195206 "TrialActivation" : trial_activation ,\
196207 "MaxNoOfMachines" : max_no_of_machines ,\
197- "NoOfKeys" :no_of_keys })
208+ "NoOfKeys" :no_of_keys ,\
209+ "Name" : name ,\
210+ "Email" : email ,\
211+ "CompanyName" : company_name ,\
212+ "EnableCustomerAssociation" : enable_customer_association ,\
213+ "AllowActivationManagement" : allow_activation_management })
198214 except HTTPError as e :
199215 response = e .read ()
200216 except URLError as e :
0 commit comments