Class DocumentsApi


  • public class DocumentsApi
    extends Object
    • 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 -
      • 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 -
      • 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 -
      • 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. -
      • 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 -