Skip to content

Latest commit

 

History

History
384 lines (288 loc) · 55.4 KB

README.md

File metadata and controls

384 lines (288 loc) · 55.4 KB

CardIssuing

(cardIssuing())

Overview

Available Operations

  • request - Request a virtual card be issued.

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

  • list - List Moov issued cards existing for the account.

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

  • get - Retrieve a single issued card associated with a Moov account.

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

  • update - Update a Moov issued card.

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

  • getFull - Get issued card with PAN, CVV, and expiration.

Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.

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

request

Request a virtual card be issued.

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

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.BirthDate;
import io.moov.sdk.models.components.CardExpiration;
import io.moov.sdk.models.components.CreateAuthorizedUser;
import io.moov.sdk.models.components.IssuedCardFormFactor;
import io.moov.sdk.models.components.IssuingControls;
import io.moov.sdk.models.components.IssuingIntervalLimit;
import io.moov.sdk.models.components.IssuingVelocityLimit;
import io.moov.sdk.models.components.RequestCard;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.RequestCardError;
import io.moov.sdk.models.operations.RequestCardResponse;
import java.lang.Exception;
import java.util.List;

public class Application {

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

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

        RequestCardResponse res = sdk.cardIssuing().request()
                .xMoovVersion("v2024.01.00")
                .accountID("9c0ff49b-9aaf-4815-b4a4-3e412558f6bc")
                .requestCard(RequestCard.builder()
                    .fundingWalletID("df7610a6-b14e-4eee-9a55-1890b6b3207c")
                    .authorizedUser(CreateAuthorizedUser.builder()
                        .firstName("Tanya")
                        .lastName("Flatley")
                        .birthDate(BirthDate.builder()
                            .day(9L)
                            .month(11L)
                            .year(1989L)
                            .build())
                        .build())
                    .formFactor(IssuedCardFormFactor.VIRTUAL)
                    .expiration(CardExpiration.builder()
                        .month("01")
                        .year("21")
                        .build())
                    .controls(IssuingControls.builder()
                        .velocityLimits(List.of(
                            IssuingVelocityLimit.builder()
                                .amount(10000L)
                                .interval(IssuingIntervalLimit.PER_TRANSACTION)
                                .build(),
                            IssuingVelocityLimit.builder()
                                .amount(10000L)
                                .interval(IssuingIntervalLimit.PER_TRANSACTION)
                                .build()))
                        .build())
                    .build())
                .call();

        if (res.issuedCard().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 ✔️ The Moov business account for which the card is to be issued.
requestCard RequestCard ✔️ N/A

Response

RequestCardResponse

Errors

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

list

List Moov issued cards existing for the account.

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

        ListIssuedCardsRequest req = ListIssuedCardsRequest.builder()
                .accountID("33bbd03b-931d-4e6d-b831-8698f4aee791")
                .skip(60L)
                .count(20L)
                .build();

        ListIssuedCardsResponse res = sdk.cardIssuing().list()
                .request(req)
                .call();

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

Parameters

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

Response

ListIssuedCardsResponse

Errors

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

get

Retrieve a single issued card associated with a Moov account.

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

        GetIssuedCardResponse res = sdk.cardIssuing().get()
                .xMoovVersion("v2024.01.00")
                .accountID("c63d9bae-2097-4bfa-8ac7-e9e8dff6e9ae")
                .issuedCardID("aa0c86df-7f7d-4200-9ee4-24ba8870a7d4")
                .call();

        if (res.issuedCard().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 ✔️ The Moov business account for which the card was issued.
issuedCardID String ✔️ N/A

Response

GetIssuedCardResponse

Errors

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

update

Update a Moov issued card.

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

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.BirthDateUpdate;
import io.moov.sdk.models.components.CreateAuthorizedUserUpdate;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.components.UpdateIssuedCard;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.UpdateIssuedCardError;
import io.moov.sdk.models.operations.UpdateIssuedCardResponse;
import java.lang.Exception;

public class Application {

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

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

        UpdateIssuedCardResponse res = sdk.cardIssuing().update()
                .xMoovVersion("v2024.01.00")
                .accountID("fc445a8c-5b64-4ab9-ba30-5bdb0ffc02b0")
                .issuedCardID("064f9e03-fc5f-4a7d-83d2-2ec946f77ff2")
                .updateIssuedCard(UpdateIssuedCard.builder()
                    .authorizedUser(CreateAuthorizedUserUpdate.builder()
                        .birthDate(BirthDateUpdate.builder()
                            .day(9L)
                            .month(11L)
                            .year(1989L)
                            .build())
                        .build())
                    .build())
                .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 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 ✔️ The Moov business account for which the card was issued.
issuedCardID String ✔️ N/A
updateIssuedCard UpdateIssuedCard ✔️ N/A

Response

UpdateIssuedCardResponse

Errors

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

getFull

Get issued card with PAN, CVV, and expiration.

Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.

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

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.GetFullIssuedCardResponse;
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();

        GetFullIssuedCardResponse res = sdk.cardIssuing().getFull()
                .xMoovVersion("v2024.01.00")
                .accountID("f03c4c3e-2685-44e6-8d4b-0d5bd082a301")
                .issuedCardID("1da6b593-679e-44ab-a9e4-6db6db4b8f46")
                .call();

        if (res.fullIssuedCard().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 ✔️ The Moov business account for which the card was issued.
issuedCardID String ✔️ N/A

Response

GetFullIssuedCardResponse

Errors

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