Interface PaymentsAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in
some cases such as credentials retrieval and endpoint discovery as part of the async API call.
Amazon Web Services Payments manages how money moves between you and Amazon Web Services. It holds the payment instruments you use to pay Amazon Web Services and to receive money from Amazon Web Services, such as cards and bank accounts. It collects payment for your Amazon Web Services invoices, applies your payments and credit memos to them, and returns refunds.
A payment instrument is a channel that moves money between you and Amazon Web Services, and its payment method is the kind of instrument, such as a card or a bank account. A financial record is an invoice or credit memo. It shows how much of its amount is outstanding, processing, settled, and canceled as Amazon Web Services applies payments and credits.
With the Amazon Web Services Payments API, you can read your financial records and account balances, and read your payment instruments and their status.
The Amazon Web Services Payments API provides the following endpoint:
https://payments.us-east-1.api.aws
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionbatchGetFinancialRecord(Consumer<BatchGetFinancialRecordRequest.Builder> batchGetFinancialRecordRequest) Retrieves up to 100 financial records in one request, including the details that are specific to each record's type.batchGetFinancialRecord(BatchGetFinancialRecordRequest batchGetFinancialRecordRequest) Retrieves up to 100 financial records in one request, including the details that are specific to each record's type.static PaymentsAsyncClientBuilderbuilder()Create a builder that can be used to configure and create aPaymentsAsyncClient.static PaymentsAsyncClientcreate()Create aPaymentsAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.getAccountBalance(Consumer<GetAccountBalanceRequest.Builder> getAccountBalanceRequest) Retrieves one balance of your account, selected by balance type, as one amount for each merchant of record and currency.getAccountBalance(GetAccountBalanceRequest getAccountBalanceRequest) Retrieves one balance of your account, selected by balance type, as one amount for each merchant of record and currency.default GetAccountBalancePublishergetAccountBalancePaginator(Consumer<GetAccountBalanceRequest.Builder> getAccountBalanceRequest) This is a variant ofgetAccountBalance(software.amazon.awssdk.services.payments.model.GetAccountBalanceRequest)operation.default GetAccountBalancePublishergetAccountBalancePaginator(GetAccountBalanceRequest getAccountBalanceRequest) This is a variant ofgetAccountBalance(software.amazon.awssdk.services.payments.model.GetAccountBalanceRequest)operation.getFinancialRecord(Consumer<GetFinancialRecordRequest.Builder> getFinancialRecordRequest) Retrieves a single financial record, including the details that are specific to its type.getFinancialRecord(GetFinancialRecordRequest getFinancialRecordRequest) Retrieves a single financial record, including the details that are specific to its type.getPaymentInstrument(Consumer<GetPaymentInstrumentRequest.Builder> getPaymentInstrumentRequest) Retrieves a payment instrument on your account, including the details that are specific to its payment method, such as a card's last four digits.getPaymentInstrument(GetPaymentInstrumentRequest getPaymentInstrumentRequest) Retrieves a payment instrument on your account, including the details that are specific to its payment method, such as a card's last four digits.listFinancialRecords(Consumer<ListFinancialRecordsRequest.Builder> listFinancialRecordsRequest) Lists the financial records on your account, with the newest first by default.listFinancialRecords(ListFinancialRecordsRequest listFinancialRecordsRequest) Lists the financial records on your account, with the newest first by default.default ListFinancialRecordsPublisherlistFinancialRecordsPaginator(Consumer<ListFinancialRecordsRequest.Builder> listFinancialRecordsRequest) This is a variant oflistFinancialRecords(software.amazon.awssdk.services.payments.model.ListFinancialRecordsRequest)operation.default ListFinancialRecordsPublisherlistFinancialRecordsPaginator(ListFinancialRecordsRequest listFinancialRecordsRequest) This is a variant oflistFinancialRecords(software.amazon.awssdk.services.payments.model.ListFinancialRecordsRequest)operation.listPaymentInstruments(Consumer<ListPaymentInstrumentsRequest.Builder> listPaymentInstrumentsRequest) Lists the payment instruments on your account.listPaymentInstruments(ListPaymentInstrumentsRequest listPaymentInstrumentsRequest) Lists the payment instruments on your account.default ListPaymentInstrumentsPublisherlistPaymentInstrumentsPaginator(Consumer<ListPaymentInstrumentsRequest.Builder> listPaymentInstrumentsRequest) This is a variant oflistPaymentInstruments(software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsRequest)operation.default ListPaymentInstrumentsPublisherlistPaymentInstrumentsPaginator(ListPaymentInstrumentsRequest listPaymentInstrumentsRequest) This is a variant oflistPaymentInstruments(software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
batchGetFinancialRecord
default CompletableFuture<BatchGetFinancialRecordResponse> batchGetFinancialRecord(BatchGetFinancialRecordRequest batchGetFinancialRecordRequest) Retrieves up to 100 financial records in one request, including the details that are specific to each record's type. Identify each record by its ID or by its invoice ID. Results can be partial: each key that you request appears once in the response, either as a record in
financialRecordsor as an error inerrors. A key that matches no record on your account is returned inerrorsand doesn't fail the request. This operation provides strongly consistent reads.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both
payments:BatchGetFinancialRecordandpayments:GetPaymentStatus.- Parameters:
batchGetFinancialRecordRequest-- Returns:
- A Java Future containing the result of the BatchGetFinancialRecord operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
batchGetFinancialRecord
default CompletableFuture<BatchGetFinancialRecordResponse> batchGetFinancialRecord(Consumer<BatchGetFinancialRecordRequest.Builder> batchGetFinancialRecordRequest) Retrieves up to 100 financial records in one request, including the details that are specific to each record's type. Identify each record by its ID or by its invoice ID. Results can be partial: each key that you request appears once in the response, either as a record in
financialRecordsor as an error inerrors. A key that matches no record on your account is returned inerrorsand doesn't fail the request. This operation provides strongly consistent reads.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both
payments:BatchGetFinancialRecordandpayments:GetPaymentStatus.
This is a convenience which creates an instance of the
BatchGetFinancialRecordRequest.Builderavoiding the need to create one manually viaBatchGetFinancialRecordRequest.builder()- Parameters:
batchGetFinancialRecordRequest- AConsumerthat will call methods onBatchGetFinancialRecordRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the BatchGetFinancialRecord operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAccountBalance
default CompletableFuture<GetAccountBalanceResponse> getAccountBalance(GetAccountBalanceRequest getAccountBalanceRequest) Retrieves one balance of your account, selected by balance type, as one amount for each merchant of record and currency. Each amount is the sum of the outstanding balances of your invoices or credit memos that have the status
OUTSTANDING. Amounts are never added together across merchants of record or currencies. This operation is eventually consistent. Results are paginated. UsenextTokento retrieve more results.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both
payments:GetAccountBalanceandpayments:GetPaymentStatus.- Parameters:
getAccountBalanceRequest-- Returns:
- A Java Future containing the result of the GetAccountBalance operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAccountBalance
default CompletableFuture<GetAccountBalanceResponse> getAccountBalance(Consumer<GetAccountBalanceRequest.Builder> getAccountBalanceRequest) Retrieves one balance of your account, selected by balance type, as one amount for each merchant of record and currency. Each amount is the sum of the outstanding balances of your invoices or credit memos that have the status
OUTSTANDING. Amounts are never added together across merchants of record or currencies. This operation is eventually consistent. Results are paginated. UsenextTokento retrieve more results.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both
payments:GetAccountBalanceandpayments:GetPaymentStatus.
This is a convenience which creates an instance of the
GetAccountBalanceRequest.Builderavoiding the need to create one manually viaGetAccountBalanceRequest.builder()- Parameters:
getAccountBalanceRequest- AConsumerthat will call methods onGetAccountBalanceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetAccountBalance operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAccountBalancePaginator
default GetAccountBalancePublisher getAccountBalancePaginator(GetAccountBalanceRequest getAccountBalanceRequest) This is a variant of
getAccountBalance(software.amazon.awssdk.services.payments.model.GetAccountBalanceRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.payments.paginators.GetAccountBalancePublisher publisher = client.getAccountBalancePaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.payments.paginators.GetAccountBalancePublisher publisher = client.getAccountBalancePaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.payments.model.GetAccountBalanceResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.payments.model.GetAccountBalanceResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getAccountBalance(software.amazon.awssdk.services.payments.model.GetAccountBalanceRequest)operation.- Parameters:
getAccountBalanceRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAccountBalancePaginator
default GetAccountBalancePublisher getAccountBalancePaginator(Consumer<GetAccountBalanceRequest.Builder> getAccountBalanceRequest) This is a variant of
getAccountBalance(software.amazon.awssdk.services.payments.model.GetAccountBalanceRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.payments.paginators.GetAccountBalancePublisher publisher = client.getAccountBalancePaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.payments.paginators.GetAccountBalancePublisher publisher = client.getAccountBalancePaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.payments.model.GetAccountBalanceResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.payments.model.GetAccountBalanceResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getAccountBalance(software.amazon.awssdk.services.payments.model.GetAccountBalanceRequest)operation.
This is a convenience which creates an instance of the
GetAccountBalanceRequest.Builderavoiding the need to create one manually viaGetAccountBalanceRequest.builder()- Parameters:
getAccountBalanceRequest- AConsumerthat will call methods onGetAccountBalanceRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getFinancialRecord
default CompletableFuture<GetFinancialRecordResponse> getFinancialRecord(GetFinancialRecordRequest getFinancialRecordRequest) Retrieves a single financial record, including the details that are specific to its type. Specify exactly one of the following:
-
The ID that Amazon Web Services Payments issued for the record, in
identifier. -
The invoice ID that Amazon Web Services Invoicing issued for an invoice or a credit memo, in
invoiceIdentifier.
If you specify both or neither, the request fails with
ValidationException. If no record on your account matches, the request fails withResourceNotFoundException.This operation provides strongly consistent reads.
To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both
payments:GetFinancialRecordandpayments:GetPaymentStatus.- Parameters:
getFinancialRecordRequest-- Returns:
- A Java Future containing the result of the GetFinancialRecord operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ResourceNotFoundException The requested resource couldn't be found. Verify that the resource ID is correct. This error is returned only when you're authorized for the resource.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
getFinancialRecord
default CompletableFuture<GetFinancialRecordResponse> getFinancialRecord(Consumer<GetFinancialRecordRequest.Builder> getFinancialRecordRequest) Retrieves a single financial record, including the details that are specific to its type. Specify exactly one of the following:
-
The ID that Amazon Web Services Payments issued for the record, in
identifier. -
The invoice ID that Amazon Web Services Invoicing issued for an invoice or a credit memo, in
invoiceIdentifier.
If you specify both or neither, the request fails with
ValidationException. If no record on your account matches, the request fails withResourceNotFoundException.This operation provides strongly consistent reads.
To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both
payments:GetFinancialRecordandpayments:GetPaymentStatus.
This is a convenience which creates an instance of the
GetFinancialRecordRequest.Builderavoiding the need to create one manually viaGetFinancialRecordRequest.builder()- Parameters:
getFinancialRecordRequest- AConsumerthat will call methods onGetFinancialRecordRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetFinancialRecord operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ResourceNotFoundException The requested resource couldn't be found. Verify that the resource ID is correct. This error is returned only when you're authorized for the resource.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
getPaymentInstrument
default CompletableFuture<GetPaymentInstrumentResponse> getPaymentInstrument(GetPaymentInstrumentRequest getPaymentInstrumentRequest) Retrieves a payment instrument on your account, including the details that are specific to its payment method, such as a card's last four digits. Identify the instrument by its Amazon Resource Name (ARN) or by its ID.
ListPaymentInstrumentsreturns both.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for
payments:GetPaymentInstrument. You can scope this permission to the instrument's ARN.- Parameters:
getPaymentInstrumentRequest-- Returns:
- A Java Future containing the result of the GetPaymentInstrument operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ResourceNotFoundException The requested resource couldn't be found. Verify that the resource ID is correct. This error is returned only when you're authorized for the resource.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getPaymentInstrument
default CompletableFuture<GetPaymentInstrumentResponse> getPaymentInstrument(Consumer<GetPaymentInstrumentRequest.Builder> getPaymentInstrumentRequest) Retrieves a payment instrument on your account, including the details that are specific to its payment method, such as a card's last four digits. Identify the instrument by its Amazon Resource Name (ARN) or by its ID.
ListPaymentInstrumentsreturns both.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for
payments:GetPaymentInstrument. You can scope this permission to the instrument's ARN.
This is a convenience which creates an instance of the
GetPaymentInstrumentRequest.Builderavoiding the need to create one manually viaGetPaymentInstrumentRequest.builder()- Parameters:
getPaymentInstrumentRequest- AConsumerthat will call methods onGetPaymentInstrumentRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetPaymentInstrument operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ResourceNotFoundException The requested resource couldn't be found. Verify that the resource ID is correct. This error is returned only when you're authorized for the resource.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listFinancialRecords
default CompletableFuture<ListFinancialRecordsResponse> listFinancialRecords(ListFinancialRecordsRequest listFinancialRecordsRequest) Lists the financial records on your account, with the newest first by default. A financial record is an invoice or a credit memo. You must specify at least one record type in
types. You can narrow the results further by settlement status and issue date. This operation returns summaries. To get the details that are specific to a record's type, useGetFinancialRecordorBatchGetFinancialRecord. Results are paginated. UsenextTokento retrieve more results.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both
payments:ListFinancialRecordsandpayments:GetPaymentStatus.- Parameters:
listFinancialRecordsRequest-- Returns:
- A Java Future containing the result of the ListFinancialRecords operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listFinancialRecords
default CompletableFuture<ListFinancialRecordsResponse> listFinancialRecords(Consumer<ListFinancialRecordsRequest.Builder> listFinancialRecordsRequest) Lists the financial records on your account, with the newest first by default. A financial record is an invoice or a credit memo. You must specify at least one record type in
types. You can narrow the results further by settlement status and issue date. This operation returns summaries. To get the details that are specific to a record's type, useGetFinancialRecordorBatchGetFinancialRecord. Results are paginated. UsenextTokento retrieve more results.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both
payments:ListFinancialRecordsandpayments:GetPaymentStatus.
This is a convenience which creates an instance of the
ListFinancialRecordsRequest.Builderavoiding the need to create one manually viaListFinancialRecordsRequest.builder()- Parameters:
listFinancialRecordsRequest- AConsumerthat will call methods onListFinancialRecordsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListFinancialRecords operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listFinancialRecordsPaginator
default ListFinancialRecordsPublisher listFinancialRecordsPaginator(ListFinancialRecordsRequest listFinancialRecordsRequest) This is a variant of
listFinancialRecords(software.amazon.awssdk.services.payments.model.ListFinancialRecordsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.payments.paginators.ListFinancialRecordsPublisher publisher = client.listFinancialRecordsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.payments.paginators.ListFinancialRecordsPublisher publisher = client.listFinancialRecordsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.payments.model.ListFinancialRecordsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.payments.model.ListFinancialRecordsResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listFinancialRecords(software.amazon.awssdk.services.payments.model.ListFinancialRecordsRequest)operation.- Parameters:
listFinancialRecordsRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listFinancialRecordsPaginator
default ListFinancialRecordsPublisher listFinancialRecordsPaginator(Consumer<ListFinancialRecordsRequest.Builder> listFinancialRecordsRequest) This is a variant of
listFinancialRecords(software.amazon.awssdk.services.payments.model.ListFinancialRecordsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.payments.paginators.ListFinancialRecordsPublisher publisher = client.listFinancialRecordsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.payments.paginators.ListFinancialRecordsPublisher publisher = client.listFinancialRecordsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.payments.model.ListFinancialRecordsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.payments.model.ListFinancialRecordsResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listFinancialRecords(software.amazon.awssdk.services.payments.model.ListFinancialRecordsRequest)operation.
This is a convenience which creates an instance of the
ListFinancialRecordsRequest.Builderavoiding the need to create one manually viaListFinancialRecordsRequest.builder()- Parameters:
listFinancialRecordsRequest- AConsumerthat will call methods onListFinancialRecordsRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listPaymentInstruments
default CompletableFuture<ListPaymentInstrumentsResponse> listPaymentInstruments(ListPaymentInstrumentsRequest listPaymentInstrumentsRequest) Lists the payment instruments on your account. This operation returns summaries. To get the details that are specific to an instrument's payment method, use
GetPaymentInstrument. Results are paginated. UsenextTokento retrieve more results.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for
payments:ListPaymentInstruments.- Parameters:
listPaymentInstrumentsRequest-- Returns:
- A Java Future containing the result of the ListPaymentInstruments operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listPaymentInstruments
default CompletableFuture<ListPaymentInstrumentsResponse> listPaymentInstruments(Consumer<ListPaymentInstrumentsRequest.Builder> listPaymentInstrumentsRequest) Lists the payment instruments on your account. This operation returns summaries. To get the details that are specific to an instrument's payment method, use
GetPaymentInstrument. Results are paginated. UsenextTokento retrieve more results.To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for
payments:ListPaymentInstruments.
This is a convenience which creates an instance of the
ListPaymentInstrumentsRequest.Builderavoiding the need to create one manually viaListPaymentInstrumentsRequest.builder()- Parameters:
listPaymentInstrumentsRequest- AConsumerthat will call methods onListPaymentInstrumentsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListPaymentInstruments operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listPaymentInstrumentsPaginator
default ListPaymentInstrumentsPublisher listPaymentInstrumentsPaginator(ListPaymentInstrumentsRequest listPaymentInstrumentsRequest) This is a variant of
listPaymentInstruments(software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.payments.paginators.ListPaymentInstrumentsPublisher publisher = client.listPaymentInstrumentsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.payments.paginators.ListPaymentInstrumentsPublisher publisher = client.listPaymentInstrumentsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listPaymentInstruments(software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsRequest)operation.- Parameters:
listPaymentInstrumentsRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listPaymentInstrumentsPaginator
default ListPaymentInstrumentsPublisher listPaymentInstrumentsPaginator(Consumer<ListPaymentInstrumentsRequest.Builder> listPaymentInstrumentsRequest) This is a variant of
listPaymentInstruments(software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.payments.paginators.ListPaymentInstrumentsPublisher publisher = client.listPaymentInstrumentsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.payments.paginators.ListPaymentInstrumentsPublisher publisher = client.listPaymentInstrumentsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listPaymentInstruments(software.amazon.awssdk.services.payments.model.ListPaymentInstrumentsRequest)operation.
This is a convenience which creates an instance of the
ListPaymentInstrumentsRequest.Builderavoiding the need to create one manually viaListPaymentInstrumentsRequest.builder()- Parameters:
listPaymentInstrumentsRequest- AConsumerthat will call methods onListPaymentInstrumentsRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InternalServerException The request processing failed because of an unknown error, exception, or failure. Retry your request.
- ThrottlingException The request was denied due to request throttling. Reduce the frequency of your requests and try again.
- ValidationException The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. - AccessDeniedException The request is denied because you don't have sufficient access to perform this
operation. Verify that you have the required permissions and try again. This error is also returned,
instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- PaymentsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aPaymentsAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aPaymentsAsyncClient.
-