Skip to content

Latest commit

 

History

History
132 lines (92 loc) · 5.17 KB

File metadata and controls

132 lines (92 loc) · 5.17 KB

Receipts

Overview

Available Operations

  • create - Create receipts for transfers and scheduled transfers.

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

  • list - List receipts by transferID, scheduleID, or occurrenceID.

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

create

Create receipts for transfers and scheduled transfers.

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

Example Usage

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.ReceiptRequest;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CreateReceiptsResponse;
import java.lang.Exception;
import java.util.List;

public class Application {

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

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

        List<ReceiptRequest> req = List.of();

        CreateReceiptsResponse res = sdk.receipts().create()
                .request(req)
                .call();

        if (res.receiptResponses().isPresent()) {
            System.out.println(res.receiptResponses().get());
        }
    }
}

Parameters

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

Response

CreateReceiptsResponse

Errors

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

list

List receipts by transferID, scheduleID, or occurrenceID.

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

        ListReceiptsResponse res = sdk.receipts().list()
                .id("8508cf6c-9ce4-4e35-84c1-4b77320a620b")
                .call();

        if (res.receiptResponses().isPresent()) {
            System.out.println(res.receiptResponses().get());
        }
    }
}

Parameters

Parameter Type Required Description
id String ✔️ The transfer, schedule, or transfer occurrence ID to filter receipts by.

Response

ListReceiptsResponse

Errors

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