Skip to content

Latest commit

 

History

History
273 lines (196 loc) · 48.6 KB

README.md

File metadata and controls

273 lines (196 loc) · 48.6 KB

Capabilities

(capabilities())

Overview

Available Operations

  • list - Retrieve all the capabilities an account has requested.

Read our capabilities guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.read scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.write scope.

  • get - Retrieve a specific capability that an account has requested. Read our capabilities guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.read scope.

  • disable - Disable a specific capability that an account has requested. Read our capabilities guide to learn more.

    To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.write scope.

list

Retrieve all the capabilities an account has requested.

Read our capabilities guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.read scope.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.ListCapabilitiesResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

        ListCapabilitiesResponse res = sdk.capabilities().list()
                .xMoovVersion("v2024.01")
                .accountID("c236a258-0a99-455d-9fbb-2312bc028cd2")
                .call();

        if (res.capabilities().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is an optional build number starting at .01 for subsequent builds in the same quarter.
- If no build number is specified, the version refers to the initial release of the quarter.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A

Response

ListCapabilitiesResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

request

Request capabilities for a specific account. Read our capabilities guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.write scope.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.AddCapabilities;
import io.moov.sdk.models.components.CapabilityID;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.AddCapabilitiesError;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.RequestCapabilitiesResponse;
import java.lang.Exception;
import java.util.List;

public class Application {

    public static void main(String[] args) throws GenericError, AddCapabilitiesError, Exception {

        Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

        RequestCapabilitiesResponse res = sdk.capabilities().request()
                .xMoovVersion("v2024.01")
                .accountID("32613610-de25-446e-8662-ec2709ffea9d")
                .addCapabilities(AddCapabilities.builder()
                    .capabilities(List.of(
                        CapabilityID.COLLECT_FUNDS))
                    .build())
                .call();

        if (res.capabilities().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is an optional build number starting at .01 for subsequent builds in the same quarter.
- If no build number is specified, the version refers to the initial release of the quarter.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
addCapabilities AddCapabilities ✔️ N/A

Response

RequestCapabilitiesResponse

Errors

Error Type Status Code Content Type
models/errors/GenericError 400, 409 application/json
models/errors/AddCapabilitiesError 422 application/json
models/errors/APIException 4XX, 5XX */*

get

Retrieve a specific capability that an account has requested. Read our capabilities guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.read scope.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.CapabilityID;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.GetCapabilityResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

        GetCapabilityResponse res = sdk.capabilities().get()
                .xMoovVersion("v2024.01")
                .accountID("15fbc94d-721f-44a3-b5fb-77f58657305f")
                .capabilityID(CapabilityID.TRANSFERS)
                .call();

        if (res.capability().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is an optional build number starting at .01 for subsequent builds in the same quarter.
- If no build number is specified, the version refers to the initial release of the quarter.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
capabilityID CapabilityID ✔️ Moov account capabilities.

The production-app capability might appear in your list. This is a read-only capability that Moov requests and uses for account verification purposes. The capability remains active with your account and requires no additional action.

Response

GetCapabilityResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

disable

Disable a specific capability that an account has requested. Read our capabilities guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/capabilities.write scope.

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.CapabilityID;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.DisableCapabilityResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws GenericError, Exception {

        Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

        DisableCapabilityResponse res = sdk.capabilities().disable()
                .xMoovVersion("v2024.01")
                .accountID("c57b48d7-4182-4632-a345-eeed5a742b0d")
                .capabilityID(CapabilityID.CARD_ISSUING)
                .call();

        // handle response
    }
}

Parameters

Parameter Type Required Description
xMoovVersion Optional<String> Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where
- YYYY is the year
- QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
- BB is an optional build number starting at .01 for subsequent builds in the same quarter.
- If no build number is specified, the version refers to the initial release of the quarter.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
accountID String ✔️ N/A
capabilityID CapabilityID ✔️ Moov account capabilities.

The production-app capability might appear in your list. This is a read-only capability that Moov requests and uses for account verification purposes. The capability remains active with your account and requires no additional action.

Response

DisableCapabilityResponse

Errors

Error Type Status Code Content Type
models/errors/GenericError 400, 409 application/json
models/errors/APIException 4XX, 5XX */*