public final class DefaultCheckoutApi extends BaseApi implements CheckoutApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultCheckoutApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultCheckoutApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
| Modifier and Type | Method and Description |
|---|---|
CreateCheckoutResponse |
createCheckout(String locationId,
CreateCheckoutRequest body)
Links a `checkoutId` to a `checkout_page_url` that customers are directed to in order to
provide their payment information using a payment processing workflow hosted on
connect.squareup.com.
|
CompletableFuture<CreateCheckoutResponse> |
createCheckoutAsync(String locationId,
CreateCheckoutRequest body)
Links a `checkoutId` to a `checkout_page_url` that customers are directed to in order to
provide their payment information using a payment processing workflow hosted on
connect.squareup.com.
|
CreatePaymentLinkResponse |
createPaymentLink(CreatePaymentLinkRequest body)
Creates a Square-hosted checkout page.
|
CompletableFuture<CreatePaymentLinkResponse> |
createPaymentLinkAsync(CreatePaymentLinkRequest body)
Creates a Square-hosted checkout page.
|
DeletePaymentLinkResponse |
deletePaymentLink(String id)
Deletes a payment link.
|
CompletableFuture<DeletePaymentLinkResponse> |
deletePaymentLinkAsync(String id)
Deletes a payment link.
|
ListPaymentLinksResponse |
listPaymentLinks(String cursor,
Integer limit)
Lists all payment links.
|
CompletableFuture<ListPaymentLinksResponse> |
listPaymentLinksAsync(String cursor,
Integer limit)
Lists all payment links.
|
RetrievePaymentLinkResponse |
retrievePaymentLink(String id)
Retrieves a payment link.
|
CompletableFuture<RetrievePaymentLinkResponse> |
retrievePaymentLinkAsync(String id)
Retrieves a payment link.
|
UpdatePaymentLinkResponse |
updatePaymentLink(String id,
UpdatePaymentLinkRequest body)
Updates a payment link.
|
CompletableFuture<UpdatePaymentLinkResponse> |
updatePaymentLinkAsync(String id,
UpdatePaymentLinkRequest body)
Updates a payment link.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultCheckoutApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.public DefaultCheckoutApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.httpCallback - Callback to be called before and after the HTTP call.public CreateCheckoutResponse createCheckout(String locationId, CreateCheckoutRequest body) throws ApiException, IOException
createCheckout in interface CheckoutApilocationId - Required parameter: The ID of the business location to associate the
checkout with.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<CreateCheckoutResponse> createCheckoutAsync(String locationId, CreateCheckoutRequest body)
createCheckoutAsync in interface CheckoutApilocationId - Required parameter: The ID of the business location to associate the
checkout with.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public ListPaymentLinksResponse listPaymentLinks(String cursor, Integer limit) throws ApiException, IOException
listPaymentLinks in interface CheckoutApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for the original
query. If a cursor is not provided, the endpoint returns the first page of the
results. For more information, see
[Pagination](https://developer.squareup.com/docs/basics/api101/pagination).limit - Optional parameter: A limit on the number of results to return per page. The
limit is advisory and the implementation might return more or less results. If the
supplied limit is negative, zero, or greater than the maximum limit of 1000, it is
ignored. Default value: `100`ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListPaymentLinksResponse> listPaymentLinksAsync(String cursor, Integer limit)
listPaymentLinksAsync in interface CheckoutApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this cursor to retrieve the next set of results for the original
query. If a cursor is not provided, the endpoint returns the first page of the
results. For more information, see
[Pagination](https://developer.squareup.com/docs/basics/api101/pagination).limit - Optional parameter: A limit on the number of results to return per page. The
limit is advisory and the implementation might return more or less results. If the
supplied limit is negative, zero, or greater than the maximum limit of 1000, it is
ignored. Default value: `100`public CreatePaymentLinkResponse createPaymentLink(CreatePaymentLinkRequest body) throws ApiException, IOException
createPaymentLink in interface CheckoutApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<CreatePaymentLinkResponse> createPaymentLinkAsync(CreatePaymentLinkRequest body)
createPaymentLinkAsync in interface CheckoutApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public DeletePaymentLinkResponse deletePaymentLink(String id) throws ApiException, IOException
deletePaymentLink in interface CheckoutApiid - Required parameter: The ID of the payment link to delete.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<DeletePaymentLinkResponse> deletePaymentLinkAsync(String id)
deletePaymentLinkAsync in interface CheckoutApiid - Required parameter: The ID of the payment link to delete.public RetrievePaymentLinkResponse retrievePaymentLink(String id) throws ApiException, IOException
retrievePaymentLink in interface CheckoutApiid - Required parameter: The ID of link to retrieve.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrievePaymentLinkResponse> retrievePaymentLinkAsync(String id)
retrievePaymentLinkAsync in interface CheckoutApiid - Required parameter: The ID of link to retrieve.public UpdatePaymentLinkResponse updatePaymentLink(String id, UpdatePaymentLinkRequest body) throws ApiException, IOException
updatePaymentLink in interface CheckoutApiid - Required parameter: The ID of the payment link to update.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<UpdatePaymentLinkResponse> updatePaymentLinkAsync(String id, UpdatePaymentLinkRequest body)
updatePaymentLinkAsync in interface CheckoutApiid - Required parameter: The ID of the payment link to update.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.Copyright © 2022. All rights reserved.