Interface DocumentsApiFixed
public interface DocumentsApiFixed
-
Method Summary
Modifier and TypeMethodDescriptionretrofit2.Call<PostEntityTypeEntityIdDocumentsResponse> createDocument(String entityType, Long entityId, okhttp3.MultipartBody.Part file, String name, String description) Create a Document Note: A document is created using a Multi-part form upload Body Parts name : Name or summary of the document description : Description of the document file : The file to be uploaded Mandatory Fields : file and descriptionretrofit2.Call<DeleteEntityTypeEntityIdDocumentsResponse> deleteDocument(String entityType, Long entityId, Long documentId) Remove a Documentretrofit2.Call<okhttp3.ResponseBody> downloadFile(String entityType, Long entityId, Long documentId) Retrieve Binary File associated with Document Request used to download the file associated with the document Example Requests: clients/1/documents/1/attachment loans/1/documents/1/attachmentretrofit2.Call<DocumentData> getDocument(String entityType, Long entityId, Long documentId) Retrieve a Document Example Requests: clients/1/documents/1 loans/1/documents/1 client_identifiers/1/documents/1?fields=name,descriptionretrofit2.Call<List<DocumentData>> retrieveAllDocuments(String entityType, Long entityId) List documents Example Requests: clients/1/documents client_identifiers/1/documents loans/1/documents?fields=name,descriptionretrofit2.Call<PutEntityTypeEntityIdDocumentsResponse> updateDocument(String entityType, Long entityId, Long documentId, okhttp3.MultipartBody.Part file, String name, String description) Update a Document Note: A document is updated using a Multi-part form upload Body Parts name Name or summary of the document description Description of the document file The file to be uploaded
-
Method Details
-
createDocument
@Multipart @POST("v1/{entityType}/{entityId}/documents") retrofit2.Call<PostEntityTypeEntityIdDocumentsResponse> createDocument(@Path("entityType") String entityType, @Path("entityId") Long entityId, @Part okhttp3.MultipartBody.Part file, @Part("name") String name, @Part("description") String description) Create a Document Note: A document is created using a Multi-part form upload Body Parts name : Name or summary of the document description : Description of the document file : The file to be uploaded Mandatory Fields : file and description- Parameters:
entityType- entityType (required)entityId- entityId (required)file- (required)name- name (optional)description- description (optional)- Returns:
- Call<PostEntityTypeEntityIdDocumentsResponse>
-
deleteDocument
@DELETE("v1/{entityType}/{entityId}/documents/{documentId}") retrofit2.Call<DeleteEntityTypeEntityIdDocumentsResponse> deleteDocument(@Path("entityType") String entityType, @Path("entityId") Long entityId, @Path("documentId") Long documentId) Remove a Document- Parameters:
entityType- entityType (required)entityId- entityId (required)documentId- documentId (required)- Returns:
- Call<DeleteEntityTypeEntityIdDocumentsResponse>
-
downloadFile
@GET("v1/{entityType}/{entityId}/documents/{documentId}/attachment") retrofit2.Call<okhttp3.ResponseBody> downloadFile(@Path("entityType") String entityType, @Path("entityId") Long entityId, @Path("documentId") Long documentId) Retrieve Binary File associated with Document Request used to download the file associated with the document Example Requests: clients/1/documents/1/attachment loans/1/documents/1/attachment- Parameters:
entityType- entityType (required)entityId- entityId (required)documentId- documentId (required)- Returns:
- Call<Void>
-
getDocument
@GET("v1/{entityType}/{entityId}/documents/{documentId}") retrofit2.Call<DocumentData> getDocument(@Path("entityType") String entityType, @Path("entityId") Long entityId, @Path("documentId") Long documentId) Retrieve a Document Example Requests: clients/1/documents/1 loans/1/documents/1 client_identifiers/1/documents/1?fields=name,description- Parameters:
entityType- entityType (required)entityId- entityId (required)documentId- documentId (required)- Returns:
- Call<GetEntityTypeEntityIdDocumentsResponse>
-
retrieveAllDocuments
@GET("v1/{entityType}/{entityId}/documents") retrofit2.Call<List<DocumentData>> retrieveAllDocuments(@Path("entityType") String entityType, @Path("entityId") Long entityId) List documents Example Requests: clients/1/documents client_identifiers/1/documents loans/1/documents?fields=name,description- Parameters:
entityType- entityType (required)entityId- entityId (required)- Returns:
- Call<List<GetEntityTypeEntityIdDocumentsResponse>>
-
updateDocument
@Multipart @PUT("v1/{entityType}/{entityId}/documents/{documentId}") retrofit2.Call<PutEntityTypeEntityIdDocumentsResponse> updateDocument(@Path("entityType") String entityType, @Path("entityId") Long entityId, @Path("documentId") Long documentId, @Part okhttp3.MultipartBody.Part file, @Part("name") String name, @Part("description") String description) Update a Document Note: A document is updated using a Multi-part form upload Body Parts name Name or summary of the document description Description of the document file The file to be uploaded- Parameters:
entityType- entityType (required)entityId- entityId (required)documentId- documentId (required)file- (optional)name- name (optional)description- description (optional)- Returns:
- Call<PutEntityTypeEntityIdDocumentsResponse>
-