tmp/src/things/things.py
def updateDraftThingType(self, thingTypeId, name, description, schemaId, metadata = None):
        """
        Updates a thing type.
        It accepts thingTypeId (string), name (string), description (string), schemaId (string) and metadata(JSON) as the parameters
        In case of failure it throws APIException
        """
        draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.host, thingTypeId)
        draftThingTypeUpdate = {'name' : name, 'description' : description, 'schemaId' : schemaId, 'metadata' : metadata}
        r = requests.put(draftThingTypeUrl, auth=self.credentials, data=json.dumps(draftThingTypeUpdate), headers = {'content-type': 'application/json'}, verify=self.verify)
        status = r.status_code
        if status == 200:
            self.logger.debug("Thing type was successfully modified")
            return r.json()
        elif status == 401:
            raise ibmiotf.APIException(401, "The authentication token is empty or invalid", None)
        elif status == 403:
            raise ibmiotf.APIException(403, "The authentication method is invalid or the api key used does not exist", None)
        elif status == 404:
            raise ibmiotf.APIException(404, "The Thing type does not exist", None)
        elif status == 409:
            raise ibmiotf.APIException(409, "The update could not be completed due to a conflict", r.json())
        elif status == 500:
            raise ibmiotf.APIException(500, "Unexpected error", None)
        else:
            raise ibmiotf.APIException(None, "Unexpected error", None)
def updateDraftThingType(self, thingTypeId, name, description, schemaId, metadata = None):
        """
        Updates a thing type.
        It accepts thingTypeId (string), name (string), description (string), schemaId (string) and metadata(JSON) as the parameters
        In case of failure it throws APIException
        """
        draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.host, thingTypeId)
        draftThingTypeUpdate = {'name' : name, 'description' : description, 'schemaId' : schemaId, 'metadata' : metadata}
        r = requests.put(draftThingTypeUrl, auth=self.credentials, data=json.dumps(draftThingTypeUpdate), headers = {'content-type': 'application/json'}, verify=self.verify)
        status = r.status_code
        if status == 200:
            self.logger.debug("Thing type was successfully modified")
            return r.json()
        elif status == 401:
            raise ibmiotf.APIException(401, "The authentication token is empty or invalid", None)
        elif status == 403:
            raise ibmiotf.APIException(403, "The authentication method is invalid or the api key used does not exist", None)
        elif status == 404:
            raise ibmiotf.APIException(404, "The Thing type does not exist", None)
        elif status == 409:
            raise ibmiotf.APIException(409, "The update could not be completed due to a conflict", r.json())
        elif status == 500:
            raise ibmiotf.APIException(500, "Unexpected error", None)
        else:
            raise ibmiotf.APIException(None, "Unexpected error", None)
Updates a thing type.
        It accepts thingTypeId (string), name (string), description (string), schemaId (string) and metadata(JSON) as the parameters
        In case of failure it throws APIException