Package api

Class AuthorizationsApi


  • public class AuthorizationsApi
    extends Object
    • Constructor Detail

      • AuthorizationsApi

        public AuthorizationsApi()
      • AuthorizationsApi

        public AuthorizationsApi​(FinixClient finixClient)
    • Method Detail

      • setFinixClient

        public void setFinixClient​(FinixClient finixClient)
      • getHostIndex

        public int getHostIndex()
      • setHostIndex

        public void setHostIndex​(int hostIndex)
      • getCustomBaseUrl

        public String getCustomBaseUrl()
      • setCustomBaseUrl

        public void setCustomBaseUrl​(String customBaseUrl)
      • captureAuthorizationCall

        public okhttp3.Call captureAuthorizationCall​(String authorizationId,
                                                     UpdateAuthorizationRequest updateAuthorizationRequest,
                                                     ApiCallback _callback)
                                              throws ApiException
        Build call for captureAuthorization
        Parameters:
        authorizationId - ID of `Authorization` to fetch. (required)
        updateAuthorizationRequest - (optional)
        _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 Single captured Authorization object -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • update

        public AuthorizationCaptured update​(String authorizationId,
                                            UpdateAuthorizationRequest updateAuthorizationRequest)
                                     throws ApiException
        Capture an Authorization If successfully captured, the `transfer` field of the `Authorization` will contain the ID of the `Transfer` resource that'll move funds. By default, `Transfers` are in a **PENDING** state. The **PENDING** state means the request to capture funds hasn't been submitted yet. Capture requests get submitted via a batch request. Once the `Authorization` is updated with a `capture_amount` (i.e. *Captured*), the state of the `Transfer` will update to **SUCCEEDED**. > Voided `Authorizations` can't be captured.
        Parameters:
        authorizationId - ID of `Authorization` to fetch. (required)
        updateAuthorizationRequest - (optional)
        Returns:
        AuthorizationCaptured
        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 Single captured Authorization object -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • captureAuthorizationWithHttpInfo

        public ApiResponse<AuthorizationCaptured> captureAuthorizationWithHttpInfo​(String authorizationId,
                                                                                   UpdateAuthorizationRequest updateAuthorizationRequest)
                                                                            throws ApiException
        Capture an Authorization If successfully captured, the `transfer` field of the `Authorization` will contain the ID of the `Transfer` resource that'll move funds. By default, `Transfers` are in a **PENDING** state. The **PENDING** state means the request to capture funds hasn't been submitted yet. Capture requests get submitted via a batch request. Once the `Authorization` is updated with a `capture_amount` (i.e. *Captured*), the state of the `Transfer` will update to **SUCCEEDED**. > Voided `Authorizations` can't be captured.
        Parameters:
        authorizationId - ID of `Authorization` to fetch. (required)
        updateAuthorizationRequest - (optional)
        Returns:
        ApiResponse<AuthorizationCaptured>
        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 Single captured Authorization object -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • captureAuthorizationAsync

        public okhttp3.Call captureAuthorizationAsync​(String authorizationId,
                                                      UpdateAuthorizationRequest updateAuthorizationRequest,
                                                      ApiCallback<AuthorizationCaptured> _callback)
                                               throws ApiException
        Capture an Authorization (asynchronously) If successfully captured, the `transfer` field of the `Authorization` will contain the ID of the `Transfer` resource that'll move funds. By default, `Transfers` are in a **PENDING** state. The **PENDING** state means the request to capture funds hasn't been submitted yet. Capture requests get submitted via a batch request. Once the `Authorization` is updated with a `capture_amount` (i.e. *Captured*), the state of the `Transfer` will update to **SUCCEEDED**. > Voided `Authorizations` can't be captured.
        Parameters:
        authorizationId - ID of `Authorization` to fetch. (required)
        updateAuthorizationRequest - (optional)
        _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 Single captured Authorization object -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • createAuthorizationCall

        public okhttp3.Call createAuthorizationCall​(CreateAuthorizationRequest createAuthorizationRequest,
                                                    ApiCallback _callback)
                                             throws ApiException
        Build call for createAuthorization
        Parameters:
        createAuthorizationRequest - (optional)
        _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 Single Authorization object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        402 Payment Required * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • create

        public Authorization create​(CreateAuthorizationRequest createAuthorizationRequest)
                             throws ApiException
        Create an Authorization Create an `Authorization` to process a transaction. `Authorizations` can have six possible `states`, two of which are expected: - **SUCCEEDED** - **FAILED** If the `Authorization` has **SUCCEEDED** , it must be captured before `expires_at` passes or the funds will be released. If the `transfer` field of an `Authorization` is **null**, it hasn't been captured yet. Learn how to prevent duplicate authorizations by passing an [Idempotency ID](#section/Idempotency-Requests) in the payload. - `Authorizations` on debit cards place a hold on funds in the cardholder's bank account and can lead to lower than expected balances or issues with insufficient funds.
        Parameters:
        createAuthorizationRequest - (optional)
        Returns:
        Authorization
        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 Single Authorization object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        402 Payment Required * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • createAuthorizationWithHttpInfo

        public ApiResponse<Authorization> createAuthorizationWithHttpInfo​(CreateAuthorizationRequest createAuthorizationRequest)
                                                                   throws ApiException
        Create an Authorization Create an `Authorization` to process a transaction. `Authorizations` can have six possible `states`, two of which are expected: - **SUCCEEDED** - **FAILED** If the `Authorization` has **SUCCEEDED** , it must be captured before `expires_at` passes or the funds will be released. If the `transfer` field of an `Authorization` is **null**, it hasn't been captured yet. Learn how to prevent duplicate authorizations by passing an [Idempotency ID](#section/Idempotency-Requests) in the payload. - `Authorizations` on debit cards place a hold on funds in the cardholder's bank account and can lead to lower than expected balances or issues with insufficient funds.
        Parameters:
        createAuthorizationRequest - (optional)
        Returns:
        ApiResponse<Authorization>
        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 Single Authorization object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        402 Payment Required * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • createAuthorizationAsync

        public okhttp3.Call createAuthorizationAsync​(CreateAuthorizationRequest createAuthorizationRequest,
                                                     ApiCallback<Authorization> _callback)
                                              throws ApiException
        Create an Authorization (asynchronously) Create an `Authorization` to process a transaction. `Authorizations` can have six possible `states`, two of which are expected: - **SUCCEEDED** - **FAILED** If the `Authorization` has **SUCCEEDED** , it must be captured before `expires_at` passes or the funds will be released. If the `transfer` field of an `Authorization` is **null**, it hasn't been captured yet. Learn how to prevent duplicate authorizations by passing an [Idempotency ID](#section/Idempotency-Requests) in the payload. - `Authorizations` on debit cards place a hold on funds in the cardholder's bank account and can lead to lower than expected balances or issues with insufficient funds.
        Parameters:
        createAuthorizationRequest - (optional)
        _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 Single Authorization object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        402 Payment Required * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • getAuthorizationCall

        public okhttp3.Call getAuthorizationCall​(String authorizationId,
                                                 ApiCallback _callback)
                                          throws ApiException
        Build call for getAuthorization
        Parameters:
        authorizationId - ID of `Authorization` to fetch. (required)
        _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 Single Authorization object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • get

        public Authorization get​(String authorizationId)
                          throws ApiException
        Fetch an Authorization Retrieve the details of a previously created `Authorization`.
        Parameters:
        authorizationId - ID of `Authorization` to fetch. (required)
        Returns:
        Authorization
        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 Single Authorization object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • getAuthorizationWithHttpInfo

        public ApiResponse<Authorization> getAuthorizationWithHttpInfo​(String authorizationId)
                                                                throws ApiException
        Fetch an Authorization Retrieve the details of a previously created `Authorization`.
        Parameters:
        authorizationId - ID of `Authorization` to fetch. (required)
        Returns:
        ApiResponse<Authorization>
        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 Single Authorization object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • getAuthorizationAsync

        public okhttp3.Call getAuthorizationAsync​(String authorizationId,
                                                  ApiCallback<Authorization> _callback)
                                           throws ApiException
        Fetch an Authorization (asynchronously) Retrieve the details of a previously created `Authorization`.
        Parameters:
        authorizationId - ID of `Authorization` to fetch. (required)
        _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 Single Authorization object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • list

        public FinixList list​(ListAuthorizationsQueryParams listAuthorizationsQueryParams)
                       throws ApiException
        List Authorizations Retrieve a list of `Authorizations`.
        Returns:
        APIlistAuthorizationsRequest
        Throws:
        ApiException
        Http Response Details:
        Status Code Description Response Headers
        200 List of Authorization objects * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -