Skip to content

Latest commit

 

History

History
401 lines (289 loc) · 64.9 KB

README.md

File metadata and controls

401 lines (289 loc) · 64.9 KB

Sweeps

(sweeps())

Overview

Available Operations

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

  • listConfigs - List sweep configs associated with an account.

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

  • getConfig - Get a sweep config associated with a wallet.

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

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

  • list - List sweeps associated with a wallet.

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

  • get - Get details on a specific sweep.

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

createConfig

Create a sweep config for a wallet.

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

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.CreateSweepConfigError;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CreateSweepConfigResponse;
import java.lang.Exception;

public class Application {

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

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

        CreateSweepConfigResponse res = sdk.sweeps().createConfig()
                .accountID("2c0dfb65-d7ef-4c8e-8c74-e6c7773550bc")
                .createSweepConfig(CreateSweepConfig.builder()
                    .walletID("01234567-89ab-cdef-0123-456789abcdef")
                    .status(SweepConfigStatus.ENABLED)
                    .pushPaymentMethodID("01234567-89ab-cdef-0123-456789abcdef")
                    .pullPaymentMethodID("01234567-89ab-cdef-0123-456789abcdef")
                    .build())
                .call();

        if (res.sweepConfig().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 the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

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
createSweepConfig CreateSweepConfig ✔️ N/A

Response

CreateSweepConfigResponse

Errors

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

listConfigs

List sweep configs associated with an account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.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.ListSweepConfigsResponse;
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();

        ListSweepConfigsResponse res = sdk.sweeps().listConfigs()
                .accountID("5d9d568d-fb5d-478b-a301-d495422f1c35")
                .call();

        if (res.sweepConfigs().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 the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

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

ListSweepConfigsResponse

Errors

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

getConfig

Get a sweep config associated with a wallet.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.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.GetSweepConfigResponse;
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();

        GetSweepConfigResponse res = sdk.sweeps().getConfig()
                .accountID("12f68c4e-1e8d-483b-9f62-b5d6458d538c")
                .sweepConfigID("ce92235d-dd84-4e14-9895-3b98a0003522")
                .call();

        if (res.sweepConfig().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 the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

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
sweepConfigID String ✔️ N/A

Response

GetSweepConfigResponse

Errors

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

updateConfig

Update settings on a sweep config.

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

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.PatchSweepConfigError;
import io.moov.sdk.models.operations.UpdateSweepConfigResponse;
import java.lang.Exception;

public class Application {

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

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

        UpdateSweepConfigResponse res = sdk.sweeps().updateConfig()
                .accountID("7573cb48-6325-4d3d-841d-81108fcfe6f2")
                .sweepConfigID("49e8f3b1-259f-458e-9367-adb3b938f8c8")
                .patchSweepConfig(PatchSweepConfig.builder()
                    .status(Status.DISABLED)
                    .build())
                .call();

        if (res.sweepConfig().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 the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

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
sweepConfigID String ✔️ N/A
patchSweepConfig PatchSweepConfig ✔️ N/A

Response

UpdateSweepConfigResponse

Errors

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

list

List sweeps associated with a wallet.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.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.ListSweepsRequest;
import io.moov.sdk.models.operations.ListSweepsResponse;
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();

        ListSweepsRequest req = ListSweepsRequest.builder()
                .accountID("c8a232aa-0b11-4b8a-b005-71e9e705d0e6")
                .walletID("21e27667-18d6-4d46-812e-0aee1b9ddf12")
                .skip(60L)
                .count(20L)
                .build();

        ListSweepsResponse res = sdk.sweeps().list()
                .request(req)
                .call();

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

Parameters

Parameter Type Required Description
request ListSweepsRequest ✔️ The request object to use for the request.

Response

ListSweepsResponse

Errors

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

get

Get details on a specific sweep.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.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.GetSweepResponse;
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();

        GetSweepResponse res = sdk.sweeps().get()
                .accountID("b888f774-3e7c-4135-a18c-6b985523c4bc")
                .walletID("e50f7622-81da-484b-9c66-1c8a99c6b71b")
                .sweepID("ecd62b8f-7112-4aaf-90ab-4e43b4cca371")
                .call();

        if (res.sweep().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 the build number, starting at .01, for subsequent builds in the same quarter.
- For example, v2024.01.00 is the initial release of the first quarter of 2024.

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
walletID String ✔️ N/A
sweepID String ✔️ N/A

Response

GetSweepResponse

Errors

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