Package Avalara.SDK.api.EInvoicing.V1
Class DocumentsApi
- java.lang.Object
-
- Avalara.SDK.api.EInvoicing.V1.DocumentsApi
-
public class DocumentsApi extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classDocumentsApi.DownloadDocumentRequestRepresents the Request object for the DownloadDocument APIclassDocumentsApi.FetchDocumentsRequestRepresents the Request object for the FetchDocuments APIclassDocumentsApi.GetDocumentListRequestRepresents the Request object for the GetDocumentList APIclassDocumentsApi.GetDocumentStatusRequestRepresents the Request object for the GetDocumentStatus APIclassDocumentsApi.SubmitDocumentRequestRepresents the Request object for the SubmitDocument API
-
Constructor Summary
Constructors Constructor Description DocumentsApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FiledownloadDocument(DocumentsApi.DownloadDocumentRequest requestParameters)Returns a copy of the document When the document is available, use this endpoint to download it as text, XML, or PDF.okhttp3.CalldownloadDocumentAsync(DocumentsApi.DownloadDocumentRequest requestParameters, ApiCallback<File> _callback)Returns a copy of the document (asynchronously) When the document is available, use this endpoint to download it as text, XML, or PDF.okhttp3.CalldownloadDocumentCall(DocumentsApi.DownloadDocumentRequest requestParameters, ApiCallback _callback)Build call for downloadDocumentApiResponse<File>downloadDocumentWithHttpInfo(DocumentsApi.DownloadDocumentRequest requestParameters)Returns a copy of the document When the document is available, use this endpoint to download it as text, XML, or PDF.DocumentFetchfetchDocuments(DocumentsApi.FetchDocumentsRequest requestParameters)Fetch the inbound document from a tax authority This API allows you to retrieve an inbound document.okhttp3.CallfetchDocumentsAsync(DocumentsApi.FetchDocumentsRequest requestParameters, ApiCallback<DocumentFetch> _callback)Fetch the inbound document from a tax authority (asynchronously) This API allows you to retrieve an inbound document.okhttp3.CallfetchDocumentsCall(DocumentsApi.FetchDocumentsRequest requestParameters, ApiCallback _callback)Build call for fetchDocumentsApiResponse<DocumentFetch>fetchDocumentsWithHttpInfo(DocumentsApi.FetchDocumentsRequest requestParameters)Fetch the inbound document from a tax authority This API allows you to retrieve an inbound document.ApiClientgetApiClient()StringgetCustomBaseUrl()DocumentListResponsegetDocumentList(DocumentsApi.GetDocumentListRequest requestParameters)Returns a summary of documents for a date range Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.okhttp3.CallgetDocumentListAsync(DocumentsApi.GetDocumentListRequest requestParameters, ApiCallback<DocumentListResponse> _callback)Returns a summary of documents for a date range (asynchronously) Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.okhttp3.CallgetDocumentListCall(DocumentsApi.GetDocumentListRequest requestParameters, ApiCallback _callback)Build call for getDocumentListApiResponse<DocumentListResponse>getDocumentListWithHttpInfo(DocumentsApi.GetDocumentListRequest requestParameters)Returns a summary of documents for a date range Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.DocumentStatusResponsegetDocumentStatus(DocumentsApi.GetDocumentStatusRequest requestParameters)Checks the status of a document Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.okhttp3.CallgetDocumentStatusAsync(DocumentsApi.GetDocumentStatusRequest requestParameters, ApiCallback<DocumentStatusResponse> _callback)Checks the status of a document (asynchronously) Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.okhttp3.CallgetDocumentStatusCall(DocumentsApi.GetDocumentStatusRequest requestParameters, ApiCallback _callback)Build call for getDocumentStatusApiResponse<DocumentStatusResponse>getDocumentStatusWithHttpInfo(DocumentsApi.GetDocumentStatusRequest requestParameters)Checks the status of a document Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.DocumentsApi.DownloadDocumentRequestgetDownloadDocumentRequest()Getter function to instantiate Request classDocumentsApi.FetchDocumentsRequestgetFetchDocumentsRequest()Getter function to instantiate Request classDocumentsApi.GetDocumentListRequestgetGetDocumentListRequest()Getter function to instantiate Request classDocumentsApi.GetDocumentStatusRequestgetGetDocumentStatusRequest()Getter function to instantiate Request classintgetHostIndex()DocumentsApi.SubmitDocumentRequestgetSubmitDocumentRequest()Getter function to instantiate Request classvoidsetCustomBaseUrl(String customBaseUrl)voidsetHostIndex(int hostIndex)DocumentSubmitResponsesubmitDocument(DocumentsApi.SubmitDocumentRequest requestParameters)Submits a document to Avalara E-Invoicing API When a UBL document is sent to this endpoint, it generates a document in the required format as mandated by the specified country.okhttp3.CallsubmitDocumentAsync(DocumentsApi.SubmitDocumentRequest requestParameters, ApiCallback<DocumentSubmitResponse> _callback)Submits a document to Avalara E-Invoicing API (asynchronously) When a UBL document is sent to this endpoint, it generates a document in the required format as mandated by the specified country.okhttp3.CallsubmitDocumentCall(DocumentsApi.SubmitDocumentRequest requestParameters, ApiCallback _callback)Build call for submitDocumentApiResponse<DocumentSubmitResponse>submitDocumentWithHttpInfo(DocumentsApi.SubmitDocumentRequest requestParameters)Submits a document to Avalara E-Invoicing API When a UBL document is sent to this endpoint, it generates a document in the required format as mandated by the specified country.
-
-
-
Constructor Detail
-
DocumentsApi
public DocumentsApi(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
getHostIndex
public int getHostIndex()
-
setHostIndex
public void setHostIndex(int hostIndex)
-
getCustomBaseUrl
public String getCustomBaseUrl()
-
setCustomBaseUrl
public void setCustomBaseUrl(String customBaseUrl)
-
downloadDocumentCall
public okhttp3.Call downloadDocumentCall(DocumentsApi.DownloadDocumentRequest requestParameters, ApiCallback _callback) throws ApiException
Build call for downloadDocument- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 OK * Content-type -
401 Unauthorized - 403 Forbidden - 404 A document for the specified ID was not found. - 406 Unsupported document format was requested in the Accept header -
-
downloadDocument
public File downloadDocument(DocumentsApi.DownloadDocumentRequest requestParameters) throws ApiException
Returns a copy of the document When the document is available, use this endpoint to download it as text, XML, or PDF. The output format needs to be specified in the Accept header, and it will vary depending on the mandate. If the file has not yet been created, then status code 404 (not found) is returned.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- File
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 OK * Content-type -
401 Unauthorized - 403 Forbidden - 404 A document for the specified ID was not found. - 406 Unsupported document format was requested in the Accept header -
-
downloadDocumentWithHttpInfo
public ApiResponse<File> downloadDocumentWithHttpInfo(DocumentsApi.DownloadDocumentRequest requestParameters) throws ApiException
Returns a copy of the document When the document is available, use this endpoint to download it as text, XML, or PDF. The output format needs to be specified in the Accept header, and it will vary depending on the mandate. If the file has not yet been created, then status code 404 (not found) is returned.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- ApiResponse<File>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 OK * Content-type -
401 Unauthorized - 403 Forbidden - 404 A document for the specified ID was not found. - 406 Unsupported document format was requested in the Accept header -
-
downloadDocumentAsync
public okhttp3.Call downloadDocumentAsync(DocumentsApi.DownloadDocumentRequest requestParameters, ApiCallback<File> _callback) throws ApiException
Returns a copy of the document (asynchronously) When the document is available, use this endpoint to download it as text, XML, or PDF. The output format needs to be specified in the Accept header, and it will vary depending on the mandate. If the file has not yet been created, then status code 404 (not found) is returned.- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 OK * Content-type -
401 Unauthorized - 403 Forbidden - 404 A document for the specified ID was not found. - 406 Unsupported document format was requested in the Accept header -
-
getDownloadDocumentRequest
public DocumentsApi.DownloadDocumentRequest getDownloadDocumentRequest()
Getter function to instantiate Request class
-
fetchDocumentsCall
public okhttp3.Call fetchDocumentsCall(DocumentsApi.FetchDocumentsRequest requestParameters, ApiCallback _callback) throws ApiException
Build call for fetchDocuments- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 Accepted DocumentFetch Request - 401 Unauthorized - 403 Forbidden - 500 Internal Server Error -
-
fetchDocuments
public DocumentFetch fetchDocuments(DocumentsApi.FetchDocumentsRequest requestParameters) throws ApiException
Fetch the inbound document from a tax authority This API allows you to retrieve an inbound document. Pass key-value pairs as parameters in the request, such as the confirmation number, supplier number, and buyer VAT number.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- DocumentFetch
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Accepted DocumentFetch Request - 401 Unauthorized - 403 Forbidden - 500 Internal Server Error -
-
fetchDocumentsWithHttpInfo
public ApiResponse<DocumentFetch> fetchDocumentsWithHttpInfo(DocumentsApi.FetchDocumentsRequest requestParameters) throws ApiException
Fetch the inbound document from a tax authority This API allows you to retrieve an inbound document. Pass key-value pairs as parameters in the request, such as the confirmation number, supplier number, and buyer VAT number.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- ApiResponse<DocumentFetch>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Accepted DocumentFetch Request - 401 Unauthorized - 403 Forbidden - 500 Internal Server Error -
-
fetchDocumentsAsync
public okhttp3.Call fetchDocumentsAsync(DocumentsApi.FetchDocumentsRequest requestParameters, ApiCallback<DocumentFetch> _callback) throws ApiException
Fetch the inbound document from a tax authority (asynchronously) This API allows you to retrieve an inbound document. Pass key-value pairs as parameters in the request, such as the confirmation number, supplier number, and buyer VAT number.- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 Accepted DocumentFetch Request - 401 Unauthorized - 403 Forbidden - 500 Internal Server Error -
-
getFetchDocumentsRequest
public DocumentsApi.FetchDocumentsRequest getFetchDocumentsRequest()
Getter function to instantiate Request class
-
getDocumentListCall
public okhttp3.Call getDocumentListCall(DocumentsApi.GetDocumentListRequest requestParameters, ApiCallback _callback) throws ApiException
Build call for getDocumentList- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 OK - 400 Bad request - 401 Unauthorized - 403 Forbidden -
-
getDocumentList
public DocumentListResponse getDocumentList(DocumentsApi.GetDocumentListRequest requestParameters) throws ApiException
Returns a summary of documents for a date range Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- DocumentListResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 OK - 400 Bad request - 401 Unauthorized - 403 Forbidden -
-
getDocumentListWithHttpInfo
public ApiResponse<DocumentListResponse> getDocumentListWithHttpInfo(DocumentsApi.GetDocumentListRequest requestParameters) throws ApiException
Returns a summary of documents for a date range Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- ApiResponse<DocumentListResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 OK - 400 Bad request - 401 Unauthorized - 403 Forbidden -
-
getDocumentListAsync
public okhttp3.Call getDocumentListAsync(DocumentsApi.GetDocumentListRequest requestParameters, ApiCallback<DocumentListResponse> _callback) throws ApiException
Returns a summary of documents for a date range (asynchronously) Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 OK - 400 Bad request - 401 Unauthorized - 403 Forbidden -
-
getGetDocumentListRequest
public DocumentsApi.GetDocumentListRequest getGetDocumentListRequest()
Getter function to instantiate Request class
-
getDocumentStatusCall
public okhttp3.Call getDocumentStatusCall(DocumentsApi.GetDocumentStatusRequest requestParameters, ApiCallback _callback) throws ApiException
Build call for getDocumentStatus- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 OK - 401 Unauthorized - 403 Forbidden - 404 A document for the specified ID was not found. -
-
getDocumentStatus
public DocumentStatusResponse getDocumentStatus(DocumentsApi.GetDocumentStatusRequest requestParameters) throws ApiException
Checks the status of a document Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- DocumentStatusResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 OK - 401 Unauthorized - 403 Forbidden - 404 A document for the specified ID was not found. -
-
getDocumentStatusWithHttpInfo
public ApiResponse<DocumentStatusResponse> getDocumentStatusWithHttpInfo(DocumentsApi.GetDocumentStatusRequest requestParameters) throws ApiException
Checks the status of a document Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- ApiResponse<DocumentStatusResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 OK - 401 Unauthorized - 403 Forbidden - 404 A document for the specified ID was not found. -
-
getDocumentStatusAsync
public okhttp3.Call getDocumentStatusAsync(DocumentsApi.GetDocumentStatusRequest requestParameters, ApiCallback<DocumentStatusResponse> _callback) throws ApiException
Checks the status of a document (asynchronously) Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 OK - 401 Unauthorized - 403 Forbidden - 404 A document for the specified ID was not found. -
-
getGetDocumentStatusRequest
public DocumentsApi.GetDocumentStatusRequest getGetDocumentStatusRequest()
Getter function to instantiate Request class
-
submitDocumentCall
public okhttp3.Call submitDocumentCall(DocumentsApi.SubmitDocumentRequest requestParameters, ApiCallback _callback) throws ApiException
Build call for submitDocument- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad request - 401 Unauthorized - 403 Forbidden -
-
submitDocument
public DocumentSubmitResponse submitDocument(DocumentsApi.SubmitDocumentRequest requestParameters) throws ApiException
Submits a document to Avalara E-Invoicing API When a UBL document is sent to this endpoint, it generates a document in the required format as mandated by the specified country. Additionally, it initiates the workflow to transmit the generated document to the relevant tax authority, if necessary.<br><br>The response from the endpoint contains a unique document ID, which can be used to request the status of the document and verify if it was successfully accepted at the destination.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- DocumentSubmitResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad request - 401 Unauthorized - 403 Forbidden -
-
submitDocumentWithHttpInfo
public ApiResponse<DocumentSubmitResponse> submitDocumentWithHttpInfo(DocumentsApi.SubmitDocumentRequest requestParameters) throws ApiException
Submits a document to Avalara E-Invoicing API When a UBL document is sent to this endpoint, it generates a document in the required format as mandated by the specified country. Additionally, it initiates the workflow to transmit the generated document to the relevant tax authority, if necessary.<br><br>The response from the endpoint contains a unique document ID, which can be used to request the status of the document and verify if it was successfully accepted at the destination.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes.- Parameters:
requestOptions- Object which represents the options available for a given API/request- Returns:
- ApiResponse<DocumentSubmitResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad request - 401 Unauthorized - 403 Forbidden -
-
submitDocumentAsync
public okhttp3.Call submitDocumentAsync(DocumentsApi.SubmitDocumentRequest requestParameters, ApiCallback<DocumentSubmitResponse> _callback) throws ApiException
Submits a document to Avalara E-Invoicing API (asynchronously) When a UBL document is sent to this endpoint, it generates a document in the required format as mandated by the specified country. Additionally, it initiates the workflow to transmit the generated document to the relevant tax authority, if necessary.<br><br>The response from the endpoint contains a unique document ID, which can be used to request the status of the document and verify if it was successfully accepted at the destination.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes.- Parameters:
requestOptions- Object which represents the options available for a given API/request_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad request - 401 Unauthorized - 403 Forbidden -
-
getSubmitDocumentRequest
public DocumentsApi.SubmitDocumentRequest getSubmitDocumentRequest()
Getter function to instantiate Request class
-
-