public String updateTemplateFiles ( String existingTemplateId , TemplateDraft newTemplate , String clientId ) throws HelloSignException { String url = BASE_URI + TEMPLATE_UPDATE_FILES_URI + "/" + existingTemplateId ; HttpClient client = httpClient . withAuth ( auth ) . withPostFields ( newTemplate . getPostFields ( ) ) ; if ( clientId != null ) { client = client . withPostField ( EmbeddedRequest . EMBEDDED_CLIENT_ID , clientId ) ; } Template t = new Template ( client . post ( url ) . asJson ( ) ) ; return t . getId ( ) ; }
Replaces the backing documents for the given template with the given files .