Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
897 changes: 805 additions & 92 deletions openapi.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/main/java/com/sumup/sdk/SumUpAsyncClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.sumup.sdk.clients.ReadersAsyncClient;
import com.sumup.sdk.clients.ReceiptsAsyncClient;
import com.sumup.sdk.clients.RolesAsyncClient;
import com.sumup.sdk.clients.TokensAsyncClient;
import com.sumup.sdk.clients.TransactionsAsyncClient;
import com.sumup.sdk.core.ApiClient;
import java.net.http.HttpClient;
Expand All @@ -31,6 +32,7 @@ public final class SumUpAsyncClient {
private final ReadersAsyncClient readers;
private final ReceiptsAsyncClient receipts;
private final RolesAsyncClient roles;
private final TokensAsyncClient tokens;
private final TransactionsAsyncClient transactions;

/** Creates a SumUpAsyncClient using the API key from the SUMUP_API_KEY environment variable. */
Expand Down Expand Up @@ -71,6 +73,7 @@ private SumUpAsyncClient(ApiClient apiClient) {
this.readers = new ReadersAsyncClient(this.apiClient);
this.receipts = new ReceiptsAsyncClient(this.apiClient);
this.roles = new RolesAsyncClient(this.apiClient);
this.tokens = new TokensAsyncClient(this.apiClient);
this.transactions = new TransactionsAsyncClient(this.apiClient);
}

Expand Down Expand Up @@ -214,6 +217,15 @@ public RolesAsyncClient roles() {
return roles;
}

/**
* Returns the TokensAsyncClient client for the "Tokens" API group.
*
* @return Client for the associated API group.
*/
public TokensAsyncClient tokens() {
return tokens;
}

/**
* Returns the TransactionsAsyncClient client for the "Transactions" API group.
*
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/sumup/sdk/SumUpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.sumup.sdk.clients.ReadersClient;
import com.sumup.sdk.clients.ReceiptsClient;
import com.sumup.sdk.clients.RolesClient;
import com.sumup.sdk.clients.TokensClient;
import com.sumup.sdk.clients.TransactionsClient;
import com.sumup.sdk.core.ApiClient;
import java.net.http.HttpClient;
Expand All @@ -31,6 +32,7 @@ public final class SumUpClient {
private final ReadersClient readers;
private final ReceiptsClient receipts;
private final RolesClient roles;
private final TokensClient tokens;
private final TransactionsClient transactions;

/** Creates a SumUpClient using the API key from the SUMUP_API_KEY environment variable. */
Expand Down Expand Up @@ -71,6 +73,7 @@ private SumUpClient(ApiClient apiClient) {
this.readers = new ReadersClient(this.apiClient);
this.receipts = new ReceiptsClient(this.apiClient);
this.roles = new RolesClient(this.apiClient);
this.tokens = new TokensClient(this.apiClient);
this.transactions = new TransactionsClient(this.apiClient);
}

Expand Down Expand Up @@ -214,6 +217,15 @@ public RolesClient roles() {
return roles;
}

/**
* Returns the TokensClient client for the "Tokens" API group.
*
* @return Client for the associated API group.
*/
public TokensClient tokens() {
return tokens;
}

/**
* Returns the TransactionsClient client for the "Transactions" API group.
*
Expand Down
142 changes: 140 additions & 2 deletions src/main/java/com/sumup/sdk/clients/ReadersAsyncClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public CompletableFuture<com.sumup.sdk.models.Reader> create(
* The target device must be online, otherwise checkout won't be accepted * After the checkout is
* accepted, the system has 60 seconds to start the payment on the target device. During this
* time, any other checkout for the same device will be rejected. **Note**: If the target device
* is a Solo, it must be in version 3.3.24.3 or higher.
* is a Solo, it must be in version 3.3.24.3 or higher. Optionally include an `affiliate` object
* to attach integrator metadata to the payment. Provide both `app_id` and `key` when including
* this object.
*
* <p>Operation ID: CreateReaderCheckout
*
Expand Down Expand Up @@ -121,7 +123,9 @@ public CompletableFuture<com.sumup.sdk.models.CreateReaderCheckoutResponse> crea
* The target device must be online, otherwise checkout won't be accepted * After the checkout is
* accepted, the system has 60 seconds to start the payment on the target device. During this
* time, any other checkout for the same device will be rejected. **Note**: If the target device
* is a Solo, it must be in version 3.3.24.3 or higher.
* is a Solo, it must be in version 3.3.24.3 or higher. Optionally include an `affiliate` object
* to attach integrator metadata to the payment. Provide both `app_id` and `key` when including
* this object.
*
* <p>Operation ID: CreateReaderCheckout
*
Expand Down Expand Up @@ -414,6 +418,67 @@ public CompletableFuture<com.sumup.sdk.models.GetReaderCheckoutResponse> getChec
requestOptions);
}

/**
* Get Reader Settings
*
* <p>Returns the menu lock settings for a Solo reader. For an online reader, returns the current
* settings. For an offline reader, returns the last saved settings, which may differ from its
* current configuration. Returns `404` if the reader is offline and no saved settings are
* available. The response may include the menu lock PIN.
*
* <p>Operation ID: GetReaderSettings
*
* @param merchantCode The merchant code of the account that owns the reader.
* @param readerId The unique identifier of the reader.
* <p>Call the overload that accepts RequestOptions to customize headers, authorization, or
* request timeout.
* @return CompletableFuture resolved with com.sumup.sdk.models.GetReaderSettingsResponse parsed
* response.
* @throws ApiException if the SumUp API returns an error.
*/
public CompletableFuture<com.sumup.sdk.models.GetReaderSettingsResponse> getReaderSettings(
String merchantCode, String readerId) throws ApiException {
return getReaderSettings(merchantCode, readerId, null);
}

/**
* Get Reader Settings
*
* <p>Returns the menu lock settings for a Solo reader. For an online reader, returns the current
* settings. For an offline reader, returns the last saved settings, which may differ from its
* current configuration. Returns `404` if the reader is offline and no saved settings are
* available. The response may include the menu lock PIN.
*
* <p>Operation ID: GetReaderSettings
*
* @param merchantCode The merchant code of the account that owns the reader.
* @param readerId The unique identifier of the reader.
* @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
* {@code null} to use client defaults.
* @return CompletableFuture resolved with com.sumup.sdk.models.GetReaderSettingsResponse parsed
* response.
* @throws ApiException if the SumUp API returns an error.
*/
public CompletableFuture<com.sumup.sdk.models.GetReaderSettingsResponse> getReaderSettings(
String merchantCode, String readerId, RequestOptions requestOptions) throws ApiException {
Objects.requireNonNull(merchantCode, "merchantCode");
Objects.requireNonNull(readerId, "readerId");
String path = "/v0.1/merchants/{merchant_code}/readers/{reader_id}/settings";
path =
path.replace(
"{merchant_code}", ApiClient.urlEncode(ApiClient.parameterValue(merchantCode)));
path = path.replace("{reader_id}", ApiClient.urlEncode(ApiClient.parameterValue(readerId)));

return this.apiClient.sendAsync(
HttpMethod.GET,
path,
null,
null,
null,
new TypeReference<com.sumup.sdk.models.GetReaderSettingsResponse>() {},
requestOptions);
}

/**
* Get a Reader Status
*
Expand Down Expand Up @@ -667,6 +732,79 @@ public CompletableFuture<com.sumup.sdk.models.Reader> update(
requestOptions);
}

/**
* Update Reader Settings
*
* <p>Updates the menu lock settings for a Solo reader. The reader must be online. A successful
* response confirms that the reader applied the update. Include at least one of
* `menu_lock.enabled` or `menu_lock.passcode`. Omitted settings keep their current values. The
* response contains only the settings included in the request. When enabling menu lock for a
* reader without a PIN, include a four-digit PIN in `menu_lock.passcode` in the same request.
*
* <p>Operation ID: UpdateReaderSettings
*
* @param merchantCode The merchant code of the account that owns the reader.
* @param readerId The unique identifier of the reader.
* @param request Menu lock settings to update.
* <p>Call the overload that accepts RequestOptions to customize headers, authorization, or
* request timeout.
* @return CompletableFuture resolved with com.sumup.sdk.models.UpdateReaderSettingsResponse
* parsed response.
* @throws ApiException if the SumUp API returns an error.
*/
public CompletableFuture<com.sumup.sdk.models.UpdateReaderSettingsResponse> updateReaderSettings(
String merchantCode,
String readerId,
com.sumup.sdk.models.UpdateReaderSettingsRequest request)
throws ApiException {
return updateReaderSettings(merchantCode, readerId, request, null);
}

/**
* Update Reader Settings
*
* <p>Updates the menu lock settings for a Solo reader. The reader must be online. A successful
* response confirms that the reader applied the update. Include at least one of
* `menu_lock.enabled` or `menu_lock.passcode`. Omitted settings keep their current values. The
* response contains only the settings included in the request. When enabling menu lock for a
* reader without a PIN, include a four-digit PIN in `menu_lock.passcode` in the same request.
*
* <p>Operation ID: UpdateReaderSettings
*
* @param merchantCode The merchant code of the account that owns the reader.
* @param readerId The unique identifier of the reader.
* @param request Menu lock settings to update.
* @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
* {@code null} to use client defaults.
* @return CompletableFuture resolved with com.sumup.sdk.models.UpdateReaderSettingsResponse
* parsed response.
* @throws ApiException if the SumUp API returns an error.
*/
public CompletableFuture<com.sumup.sdk.models.UpdateReaderSettingsResponse> updateReaderSettings(
String merchantCode,
String readerId,
com.sumup.sdk.models.UpdateReaderSettingsRequest request,
RequestOptions requestOptions)
throws ApiException {
Objects.requireNonNull(merchantCode, "merchantCode");
Objects.requireNonNull(readerId, "readerId");
Objects.requireNonNull(request, "request");
String path = "/v0.1/merchants/{merchant_code}/readers/{reader_id}/settings";
path =
path.replace(
"{merchant_code}", ApiClient.urlEncode(ApiClient.parameterValue(merchantCode)));
path = path.replace("{reader_id}", ApiClient.urlEncode(ApiClient.parameterValue(readerId)));

return this.apiClient.sendAsync(
HttpMethod.PATCH,
path,
null,
null,
request,
new TypeReference<com.sumup.sdk.models.UpdateReaderSettingsResponse>() {},
requestOptions);
}

/** Optional header overrides for this request. */
public static final class GetReaderHeaders {
private final Map<String, String> values = new LinkedHashMap<>();
Expand Down
Loading
Loading