code: public Metadata createMetadata(String templateName, String scope, Metadata metadata) {
          URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, templateName);
          BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "POST");
          request.addHeader("Content-Type", "application/json");
          request.setBody(metadata.toString());
          BoxJSONResponse response = (BoxJSONResponse) request.send();
          return new Metadata(JsonObject.readFrom(response.getJSON()));
      }
docs: Creates metadata on this folder using a specified scope and template.
  
  @param templateName the name of the metadata template.
  @param scope        the scope of the template (usually "global" or "enterprise").
  @param metadata     the new metadata values.
  @return the metadata returned from the server.