public final class DefaultV1TransactionsApi extends BaseApi implements V1TransactionsApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>
authManagers, config, httpCallback, userAgent
Constructor and Description |
---|
DefaultV1TransactionsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultV1TransactionsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
Modifier and Type | Method and Description |
---|---|
V1Refund |
createRefund(String locationId,
V1CreateRefundRequest body)
Issues a refund for a previously processed payment.
|
CompletableFuture<V1Refund> |
createRefundAsync(String locationId,
V1CreateRefundRequest body)
Issues a refund for a previously processed payment.
|
List<V1BankAccount> |
listBankAccounts(String locationId)
Deprecated.
|
CompletableFuture<List<V1BankAccount>> |
listBankAccountsAsync(String locationId)
Deprecated.
|
List<V1Order> |
listOrders(String locationId,
String order,
Integer limit,
String batchToken)
Provides summary information for a merchant's online store orders.
|
CompletableFuture<List<V1Order>> |
listOrdersAsync(String locationId,
String order,
Integer limit,
String batchToken)
Provides summary information for a merchant's online store orders.
|
List<V1Payment> |
listPayments(String locationId,
String order,
String beginTime,
String endTime,
Integer limit,
String batchToken,
Boolean includePartial)
Provides summary information for all payments taken for a given
Square account during a date range.
|
CompletableFuture<List<V1Payment>> |
listPaymentsAsync(String locationId,
String order,
String beginTime,
String endTime,
Integer limit,
String batchToken,
Boolean includePartial)
Provides summary information for all payments taken for a given
Square account during a date range.
|
List<V1Refund> |
listRefunds(String locationId,
String order,
String beginTime,
String endTime,
Integer limit,
String batchToken)
Provides the details for all refunds initiated by a merchant or any of the merchant's mobile staff during a date range.
|
CompletableFuture<List<V1Refund>> |
listRefundsAsync(String locationId,
String order,
String beginTime,
String endTime,
Integer limit,
String batchToken)
Provides the details for all refunds initiated by a merchant or any of the merchant's mobile staff during a date range.
|
List<V1Settlement> |
listSettlements(String locationId,
String order,
String beginTime,
String endTime,
Integer limit,
String status,
String batchToken)
Provides summary information for all deposits and withdrawals
initiated by Square to a linked bank account during a date range.
|
CompletableFuture<List<V1Settlement>> |
listSettlementsAsync(String locationId,
String order,
String beginTime,
String endTime,
Integer limit,
String status,
String batchToken)
Provides summary information for all deposits and withdrawals
initiated by Square to a linked bank account during a date range.
|
V1BankAccount |
retrieveBankAccount(String locationId,
String bankAccountId)
Deprecated.
|
CompletableFuture<V1BankAccount> |
retrieveBankAccountAsync(String locationId,
String bankAccountId)
Deprecated.
|
V1Order |
retrieveOrder(String locationId,
String orderId)
Provides comprehensive information for a single online store order, including the order's history.
|
CompletableFuture<V1Order> |
retrieveOrderAsync(String locationId,
String orderId)
Provides comprehensive information for a single online store order, including the order's history.
|
V1Payment |
retrievePayment(String locationId,
String paymentId)
Provides comprehensive information for a single payment.
|
CompletableFuture<V1Payment> |
retrievePaymentAsync(String locationId,
String paymentId)
Provides comprehensive information for a single payment.
|
V1Settlement |
retrieveSettlement(String locationId,
String settlementId)
Provides comprehensive information for a single settlement.
|
CompletableFuture<V1Settlement> |
retrieveSettlementAsync(String locationId,
String settlementId)
Provides comprehensive information for a single settlement.
|
V1Order |
updateOrder(String locationId,
String orderId,
V1UpdateOrderRequest body)
Updates the details of an online store order.
|
CompletableFuture<V1Order> |
updateOrderAsync(String locationId,
String orderId,
V1UpdateOrderRequest body)
Updates the details of an online store order.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponse
public DefaultV1TransactionsApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers)
config
- httpClient
- authManagers
- public DefaultV1TransactionsApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
config
- httpClient
- authManagers
- httpCallback
- @Deprecated public List<V1BankAccount> listBankAccounts(String locationId) throws ApiException, IOException
listBankAccounts
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list bank accounts for.ApiException
IOException
@Deprecated public CompletableFuture<List<V1BankAccount>> listBankAccountsAsync(String locationId)
listBankAccountsAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list bank accounts for.@Deprecated public V1BankAccount retrieveBankAccount(String locationId, String bankAccountId) throws ApiException, IOException
retrieveBankAccount
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the bank account's associated location.bankAccountId
- Required parameter: The bank account's Square-issued ID. You obtain this value from Settlement objects returned.ApiException
IOException
@Deprecated public CompletableFuture<V1BankAccount> retrieveBankAccountAsync(String locationId, String bankAccountId)
retrieveBankAccountAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the bank account's associated location.bankAccountId
- Required parameter: The bank account's Square-issued ID. You obtain this value from Settlement objects returned.public List<V1Order> listOrders(String locationId, String order, Integer limit, String batchToken) throws ApiException, IOException
listOrders
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list online store orders for.order
- Optional parameter: TThe order in which payments are listed in the response.limit
- Optional parameter: The maximum number of payments to return in a single response. This value cannot exceed 200.batchToken
- Optional parameter: A pagination cursor to retrieve the next set of results for your original query to the endpoint.ApiException
IOException
public CompletableFuture<List<V1Order>> listOrdersAsync(String locationId, String order, Integer limit, String batchToken)
listOrdersAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list online store orders for.order
- Optional parameter: TThe order in which payments are listed in the response.limit
- Optional parameter: The maximum number of payments to return in a single response. This value cannot exceed 200.batchToken
- Optional parameter: A pagination cursor to retrieve the next set of results for your original query to the endpoint.public V1Order retrieveOrder(String locationId, String orderId) throws ApiException, IOException
retrieveOrder
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the order's associated location.orderId
- Required parameter: The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpointApiException
IOException
public CompletableFuture<V1Order> retrieveOrderAsync(String locationId, String orderId)
retrieveOrderAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the order's associated location.orderId
- Required parameter: The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpointpublic V1Order updateOrder(String locationId, String orderId, V1UpdateOrderRequest body) throws ApiException, IOException
updateOrder
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the order's associated location.orderId
- Required parameter: The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpointbody
- Required parameter: An object containing the fields to POST for the request. See the corresponding object definition for field details.ApiException
IOException
public CompletableFuture<V1Order> updateOrderAsync(String locationId, String orderId, V1UpdateOrderRequest body)
updateOrderAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the order's associated location.orderId
- Required parameter: The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpointbody
- Required parameter: An object containing the fields to POST for the request. See the corresponding object definition for field details.public List<V1Payment> listPayments(String locationId, String order, String beginTime, String endTime, Integer limit, String batchToken, Boolean includePartial) throws ApiException, IOException
listPayments
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business's locations.order
- Optional parameter: The order in which payments are listed in the response.beginTime
- Optional parameter: The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.endTime
- Optional parameter: The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.limit
- Optional parameter: The maximum number of payments to return in a single response. This value cannot exceed 200.batchToken
- Optional parameter: A pagination cursor to retrieve the next set of results for your original query to the endpoint.includePartial
- Optional parameter: Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed.ApiException
IOException
public CompletableFuture<List<V1Payment>> listPaymentsAsync(String locationId, String order, String beginTime, String endTime, Integer limit, String batchToken, Boolean includePartial)
listPaymentsAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business's locations.order
- Optional parameter: The order in which payments are listed in the response.beginTime
- Optional parameter: The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.endTime
- Optional parameter: The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.limit
- Optional parameter: The maximum number of payments to return in a single response. This value cannot exceed 200.batchToken
- Optional parameter: A pagination cursor to retrieve the next set of results for your original query to the endpoint.includePartial
- Optional parameter: Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed.public V1Payment retrievePayment(String locationId, String paymentId) throws ApiException, IOException
retrievePayment
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the payment's associated location.paymentId
- Required parameter: The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint.ApiException
IOException
public CompletableFuture<V1Payment> retrievePaymentAsync(String locationId, String paymentId)
retrievePaymentAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the payment's associated location.paymentId
- Required parameter: The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint.public List<V1Refund> listRefunds(String locationId, String order, String beginTime, String endTime, Integer limit, String batchToken) throws ApiException, IOException
listRefunds
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list refunds for.order
- Optional parameter: TThe order in which payments are listed in the response.beginTime
- Optional parameter: The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.endTime
- Optional parameter: The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.limit
- Optional parameter: The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods.batchToken
- Optional parameter: A pagination cursor to retrieve the next set of results for your original query to the endpoint.ApiException
IOException
public CompletableFuture<List<V1Refund>> listRefundsAsync(String locationId, String order, String beginTime, String endTime, Integer limit, String batchToken)
listRefundsAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list refunds for.order
- Optional parameter: TThe order in which payments are listed in the response.beginTime
- Optional parameter: The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.endTime
- Optional parameter: The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.limit
- Optional parameter: The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods.batchToken
- Optional parameter: A pagination cursor to retrieve the next set of results for your original query to the endpoint.public V1Refund createRefund(String locationId, V1CreateRefundRequest body) throws ApiException, IOException
createRefund
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the original payment's associated location.body
- Required parameter: An object containing the fields to POST for the request. See the corresponding object definition for field details.ApiException
IOException
public CompletableFuture<V1Refund> createRefundAsync(String locationId, V1CreateRefundRequest body)
createRefundAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the original payment's associated location.body
- Required parameter: An object containing the fields to POST for the request. See the corresponding object definition for field details.public List<V1Settlement> listSettlements(String locationId, String order, String beginTime, String endTime, Integer limit, String status, String batchToken) throws ApiException, IOException
listSettlements
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list settlements for. If you specify me, this endpoint returns settlements aggregated from all of the business's locations.order
- Optional parameter: The order in which settlements are listed in the response.beginTime
- Optional parameter: The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.endTime
- Optional parameter: The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.limit
- Optional parameter: The maximum number of settlements to return in a single response. This value cannot exceed 200.status
- Optional parameter: Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED).batchToken
- Optional parameter: A pagination cursor to retrieve the next set of results for your original query to the endpoint.ApiException
IOException
public CompletableFuture<List<V1Settlement>> listSettlementsAsync(String locationId, String order, String beginTime, String endTime, Integer limit, String status, String batchToken)
listSettlementsAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the location to list settlements for. If you specify me, this endpoint returns settlements aggregated from all of the business's locations.order
- Optional parameter: The order in which settlements are listed in the response.beginTime
- Optional parameter: The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.endTime
- Optional parameter: The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.limit
- Optional parameter: The maximum number of settlements to return in a single response. This value cannot exceed 200.status
- Optional parameter: Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED).batchToken
- Optional parameter: A pagination cursor to retrieve the next set of results for your original query to the endpoint.public V1Settlement retrieveSettlement(String locationId, String settlementId) throws ApiException, IOException
retrieveSettlement
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the settlements's associated location.settlementId
- Required parameter: The settlement's Square-issued ID. You obtain this value from Settlement objects returned by the List Settlements endpoint.ApiException
IOException
public CompletableFuture<V1Settlement> retrieveSettlementAsync(String locationId, String settlementId)
retrieveSettlementAsync
in interface V1TransactionsApi
locationId
- Required parameter: The ID of the settlements's associated location.settlementId
- Required parameter: The settlement's Square-issued ID. You obtain this value from Settlement objects returned by the List Settlements endpoint.Copyright © 2020. All rights reserved.