code: public static BoxRetentionPolicyAssignment.Info createAssignmentToFolder(BoxAPIConnection api, String policyID,
                                                                               String folderID) {
          return createAssignment(api, policyID, new JsonObject().add("type", TYPE_FOLDER).add("id", folderID), null);
      }
docs: Assigns retention policy with givenID to the folder.
  @param api the API connection to be used by the created assignment.
  @param policyID id of the assigned retention policy.
  @param folderID id of the folder to assign policy to.
  @return info about created assignment.