public Template addTemplateUser ( String templateId , String idOrEmail ) throws HelloSignException { String url = BASE_URI + TEMPLATE_ADD_USER_URI + "/" + templateId ; String key = ( idOrEmail != null && idOrEmail . contains ( "@" ) ) ? Account . ACCOUNT_EMAIL_ADDRESS : Account . ACCOUNT_ID ; return new Template ( httpClient . withAuth ( auth ) . withPostField ( key , idOrEmail ) . post ( url ) . asJson ( ) ) ; }
Adds the provided user to the template indicated by the provided template ID . The new user can be designated using their account ID or email address .