Class BankFeedsApi


  • public class BankFeedsApi
    extends Object
    BankFeedsApi has methods for interacting with all endpoints in the API set
    • Constructor Detail

      • BankFeedsApi

        public BankFeedsApi()
        BankFeedsApi
      • BankFeedsApi

        public BankFeedsApi​(ApiClient apiClient)
        BankFeedsApi
        Parameters:
        apiClient - ApiClient pass into the new instance of this class
    • Method Detail

      • getInstance

        public static BankFeedsApi getInstance​(ApiClient apiClient)
        BankFeedsApi getInstance
        Parameters:
        apiClient - ApiClient pass into the new instance of this class
        Returns:
        instance of this class
      • getApiClient

        public ApiClient getApiClient()
        get ApiClient
        Returns:
        apiClient the current ApiClient
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
        set ApiClient
        Parameters:
        apiClient - ApiClient pass into the new instance of this class
      • setUserAgent

        public void setUserAgent​(String userAgent)
        set user agent
        Parameters:
        userAgent - string to override the user agent
      • getUserAgent

        public String getUserAgent()
        get user agent
        Returns:
        String of user agent
      • createFeedConnections

        public FeedConnections createFeedConnections​(String accessToken,
                                                     String xeroTenantId,
                                                     FeedConnections feedConnections)
                                              throws IOException
        Create one or more new feed connection By passing in the FeedConnections array object in the body, you can create one or more new feed connections

        202 - success new feed connection(s)response

        400 - failed to create new feed connection(s)response

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        feedConnections - Feed Connection(s) array object in the body
        accessToken - Authorization token for user set in header of each request
        Returns:
        FeedConnections
        Throws:
        IOException - if an error occurs while attempting to invoke the API *
      • createFeedConnectionsForHttpResponse

        public com.google.api.client.http.HttpResponse createFeedConnectionsForHttpResponse​(String accessToken,
                                                                                            String xeroTenantId,
                                                                                            FeedConnections feedConnections)
                                                                                     throws IOException
        Create one or more new feed connection By passing in the FeedConnections array object in the body, you can create one or more new feed connections

        202 - success new feed connection(s)response

        400 - failed to create new feed connection(s)response

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        feedConnections - Feed Connection(s) array object in the body
        accessToken - Authorization token for user set in header of each request
        Returns:
        HttpResponse
        Throws:
        IOException - if an error occurs while attempting to invoke the API
      • createStatements

        public Statements createStatements​(String accessToken,
                                           String xeroTenantId,
                                           Statements statements)
                                    throws IOException
        Creates one or more new statements

        202 - Success returns Statements array of objects in response

        400 - Statement failed validation

        403 - Invalid application or feed connection

        409 - Duplicate statement received

        413 - Statement exceeds size limit

        422 - Unprocessable Entity

        500 - Intermittent Xero Error

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        statements - Statements array of objects in the body
        accessToken - Authorization token for user set in header of each request
        Returns:
        Statements
        Throws:
        IOException - if an error occurs while attempting to invoke the API *
      • createStatementsForHttpResponse

        public com.google.api.client.http.HttpResponse createStatementsForHttpResponse​(String accessToken,
                                                                                       String xeroTenantId,
                                                                                       Statements statements)
                                                                                throws IOException
        Creates one or more new statements

        202 - Success returns Statements array of objects in response

        400 - Statement failed validation

        403 - Invalid application or feed connection

        409 - Duplicate statement received

        413 - Statement exceeds size limit

        422 - Unprocessable Entity

        500 - Intermittent Xero Error

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        statements - Statements array of objects in the body
        accessToken - Authorization token for user set in header of each request
        Returns:
        HttpResponse
        Throws:
        IOException - if an error occurs while attempting to invoke the API
      • deleteFeedConnections

        public FeedConnections deleteFeedConnections​(String accessToken,
                                                     String xeroTenantId,
                                                     FeedConnections feedConnections)
                                              throws IOException
        Delete an existing feed connection By passing in FeedConnections array object in the body, you can delete a feed connection.

        202 - Success response for deleted feed connection

        400 - bad input parameter

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        feedConnections - Feed Connections array object in the body
        accessToken - Authorization token for user set in header of each request
        Returns:
        FeedConnections
        Throws:
        IOException - if an error occurs while attempting to invoke the API *
      • deleteFeedConnectionsForHttpResponse

        public com.google.api.client.http.HttpResponse deleteFeedConnectionsForHttpResponse​(String accessToken,
                                                                                            String xeroTenantId,
                                                                                            FeedConnections feedConnections)
                                                                                     throws IOException
        Delete an existing feed connection By passing in FeedConnections array object in the body, you can delete a feed connection.

        202 - Success response for deleted feed connection

        400 - bad input parameter

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        feedConnections - Feed Connections array object in the body
        accessToken - Authorization token for user set in header of each request
        Returns:
        HttpResponse
        Throws:
        IOException - if an error occurs while attempting to invoke the API
      • getFeedConnection

        public FeedConnection getFeedConnection​(String accessToken,
                                                String xeroTenantId,
                                                UUID id)
                                         throws IOException
        Retrieve single feed connection based on a unique id provided By passing in a FeedConnection Id options, you can search for matching feed connections

        200 - success returns a FeedConnection object matching the id in response

        400 - bad input parameter

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        id - Unique identifier for retrieving single object
        accessToken - Authorization token for user set in header of each request
        Returns:
        FeedConnection
        Throws:
        IOException - if an error occurs while attempting to invoke the API *
      • getFeedConnectionForHttpResponse

        public com.google.api.client.http.HttpResponse getFeedConnectionForHttpResponse​(String accessToken,
                                                                                        String xeroTenantId,
                                                                                        UUID id)
                                                                                 throws IOException
        Retrieve single feed connection based on a unique id provided By passing in a FeedConnection Id options, you can search for matching feed connections

        200 - success returns a FeedConnection object matching the id in response

        400 - bad input parameter

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        id - Unique identifier for retrieving single object
        accessToken - Authorization token for user set in header of each request
        Returns:
        HttpResponse
        Throws:
        IOException - if an error occurs while attempting to invoke the API
      • getFeedConnections

        public FeedConnections getFeedConnections​(String accessToken,
                                                  String xeroTenantId,
                                                  Integer page,
                                                  Integer pageSize)
                                           throws IOException
        Searches for feed connections By passing in the appropriate options, you can search for available feed connections in the system.

        202 - search results matching criteria returned with pagination and items array

        400 - validation error response

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        page - Page number which specifies the set of records to retrieve. By default the number of the records per set is 10. Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?page=1 to get the second set of the records. When page value is not a number or a negative number, by default, the first set of records is returned.
        pageSize - Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?pageSize=100 to specify page size of 100.
        accessToken - Authorization token for user set in header of each request
        Returns:
        FeedConnections
        Throws:
        IOException - if an error occurs while attempting to invoke the API *
      • getFeedConnectionsForHttpResponse

        public com.google.api.client.http.HttpResponse getFeedConnectionsForHttpResponse​(String accessToken,
                                                                                         String xeroTenantId,
                                                                                         Integer page,
                                                                                         Integer pageSize)
                                                                                  throws IOException
        Searches for feed connections By passing in the appropriate options, you can search for available feed connections in the system.

        202 - search results matching criteria returned with pagination and items array

        400 - validation error response

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        page - Page number which specifies the set of records to retrieve. By default the number of the records per set is 10. Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?page=1 to get the second set of the records. When page value is not a number or a negative number, by default, the first set of records is returned.
        pageSize - Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?pageSize=100 to specify page size of 100.
        accessToken - Authorization token for user set in header of each request
        Returns:
        HttpResponse
        Throws:
        IOException - if an error occurs while attempting to invoke the API
      • getStatement

        public Statement getStatement​(String accessToken,
                                      String xeroTenantId,
                                      UUID statementId)
                               throws IOException
        Retrieve single statement based on unique id provided By passing in a statement id, you can search for matching statements

        200 - search results matching id for single statement

        404 - Statement not found

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        statementId - statement id for single object
        accessToken - Authorization token for user set in header of each request
        Returns:
        Statement
        Throws:
        IOException - if an error occurs while attempting to invoke the API *
      • getStatementForHttpResponse

        public com.google.api.client.http.HttpResponse getStatementForHttpResponse​(String accessToken,
                                                                                   String xeroTenantId,
                                                                                   UUID statementId)
                                                                            throws IOException
        Retrieve single statement based on unique id provided By passing in a statement id, you can search for matching statements

        200 - search results matching id for single statement

        404 - Statement not found

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        statementId - statement id for single object
        accessToken - Authorization token for user set in header of each request
        Returns:
        HttpResponse
        Throws:
        IOException - if an error occurs while attempting to invoke the API
      • getStatements

        public Statements getStatements​(String accessToken,
                                        String xeroTenantId,
                                        Integer page,
                                        Integer pageSize,
                                        String xeroApplicationId,
                                        String xeroUserId)
                                 throws IOException
        Retrieve all statements By passing in parameters, you can search for matching statements

        200 - success returns Statements array of objects response

        400 - bad input parameter

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        page - unique id for single object
        pageSize - Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to specify page size of 100.
        xeroApplicationId - The xeroApplicationId parameter
        xeroUserId - The xeroUserId parameter
        accessToken - Authorization token for user set in header of each request
        Returns:
        Statements
        Throws:
        IOException - if an error occurs while attempting to invoke the API *
      • getStatementsForHttpResponse

        public com.google.api.client.http.HttpResponse getStatementsForHttpResponse​(String accessToken,
                                                                                    String xeroTenantId,
                                                                                    Integer page,
                                                                                    Integer pageSize,
                                                                                    String xeroApplicationId,
                                                                                    String xeroUserId)
                                                                             throws IOException
        Retrieve all statements By passing in parameters, you can search for matching statements

        200 - success returns Statements array of objects response

        400 - bad input parameter

        Parameters:
        xeroTenantId - Xero identifier for Tenant
        page - unique id for single object
        pageSize - Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to specify page size of 100.
        xeroApplicationId - The xeroApplicationId parameter
        xeroUserId - The xeroUserId parameter
        accessToken - Authorization token for user set in header of each request
        Returns:
        HttpResponse
        Throws:
        IOException - if an error occurs while attempting to invoke the API
      • convertInputToByteArray

        public ByteArrayInputStream convertInputToByteArray​(InputStream is)
                                                     throws IOException
        convert intput to byte array
        Parameters:
        is - InputStream the server status code returned
        Returns:
        byteArrayInputStream a ByteArrayInputStream
        Throws:
        IOException - for failed or interrupted I/O operations