Interface PaymentsAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @SdkPublicApi @ThreadSafe public interface PaymentsAsyncClient extends AwsClient
Service client for accessing AWS Payments asynchronously. This can be created using the static 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 Details

  • 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 financialRecords or as an error in errors. A key that matches no record on your account is returned in errors and 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:BatchGetFinancialRecord and payments: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 invoke Throwable.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 reason and fieldList for 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 financialRecords or as an error in errors. A key that matches no record on your account is returned in errors and 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:BatchGetFinancialRecord and payments:GetPaymentStatus.


      This is a convenience which creates an instance of the BatchGetFinancialRecordRequest.Builder avoiding the need to create one manually via BatchGetFinancialRecordRequest.builder()

      Parameters:
      batchGetFinancialRecordRequest - A Consumer that will call methods on BatchGetFinancialRecordRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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. Use nextToken to retrieve more results.

      To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both payments:GetAccountBalance and payments: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 invoke Throwable.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 reason and fieldList for 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. Use nextToken to retrieve more results.

      To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both payments:GetAccountBalance and payments:GetPaymentStatus.


      This is a convenience which creates an instance of the GetAccountBalanceRequest.Builder avoiding the need to create one manually via GetAccountBalanceRequest.builder()

      Parameters:
      getAccountBalanceRequest - A Consumer that will call methods on GetAccountBalanceRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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 new Subscription i.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
       
       software.amazon.awssdk.services.payments.paginators.GetAccountBalancePublisher publisher = client.getAccountBalancePaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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 invoke Throwable.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 reason and fieldList for 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 new Subscription i.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
       
       software.amazon.awssdk.services.payments.paginators.GetAccountBalancePublisher publisher = client.getAccountBalancePaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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.Builder avoiding the need to create one manually via GetAccountBalanceRequest.builder()

      Parameters:
      getAccountBalanceRequest - A Consumer that will call methods on GetAccountBalanceRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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 with ResourceNotFoundException.

      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:GetFinancialRecord and payments: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 invoke Throwable.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 reason and fieldList for 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 with ResourceNotFoundException.

      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:GetFinancialRecord and payments:GetPaymentStatus.


      This is a convenience which creates an instance of the GetFinancialRecordRequest.Builder avoiding the need to create one manually via GetFinancialRecordRequest.builder()

      Parameters:
      getFinancialRecordRequest - A Consumer that will call methods on GetFinancialRecordRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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. ListPaymentInstruments returns 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 invoke Throwable.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 reason and fieldList for 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. ListPaymentInstruments returns 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.Builder avoiding the need to create one manually via GetPaymentInstrumentRequest.builder()

      Parameters:
      getPaymentInstrumentRequest - A Consumer that will call methods on GetPaymentInstrumentRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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, use GetFinancialRecord or BatchGetFinancialRecord. Results are paginated. Use nextToken to retrieve more results.

      To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both payments:ListFinancialRecords and payments: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 invoke Throwable.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 reason and fieldList for 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, use GetFinancialRecord or BatchGetFinancialRecord. Results are paginated. Use nextToken to retrieve more results.

      To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both payments:ListFinancialRecords and payments:GetPaymentStatus.


      This is a convenience which creates an instance of the ListFinancialRecordsRequest.Builder avoiding the need to create one manually via ListFinancialRecordsRequest.builder()

      Parameters:
      listFinancialRecordsRequest - A Consumer that will call methods on ListFinancialRecordsRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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 new Subscription i.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
       
       software.amazon.awssdk.services.payments.paginators.ListFinancialRecordsPublisher publisher = client.listFinancialRecordsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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 invoke Throwable.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 reason and fieldList for 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 new Subscription i.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
       
       software.amazon.awssdk.services.payments.paginators.ListFinancialRecordsPublisher publisher = client.listFinancialRecordsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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.Builder avoiding the need to create one manually via ListFinancialRecordsRequest.builder()

      Parameters:
      listFinancialRecordsRequest - A Consumer that will call methods on ListFinancialRecordsRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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. Use nextToken to 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 invoke Throwable.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 reason and fieldList for 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. Use nextToken to 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.Builder avoiding the need to create one manually via ListPaymentInstrumentsRequest.builder()

      Parameters:
      listPaymentInstrumentsRequest - A Consumer that will call methods on ListPaymentInstrumentsRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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 new Subscription i.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
       
       software.amazon.awssdk.services.payments.paginators.ListPaymentInstrumentsPublisher publisher = client.listPaymentInstrumentsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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 invoke Throwable.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 reason and fieldList for 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 new Subscription i.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
       
       software.amazon.awssdk.services.payments.paginators.ListPaymentInstrumentsPublisher publisher = client.listPaymentInstrumentsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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.Builder avoiding the need to create one manually via ListPaymentInstrumentsRequest.builder()

      Parameters:
      listPaymentInstrumentsRequest - A Consumer that will call methods on ListPaymentInstrumentsRequest.Builder to 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 invoke Throwable.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 reason and fieldList for 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

      default PaymentsServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static PaymentsAsyncClient create()
      Create a PaymentsAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      static PaymentsAsyncClientBuilder builder()
      Create a builder that can be used to configure and create a PaymentsAsyncClient.