From 2b72c92b09b1c05555cce3bdff621d5c04b1aa70 Mon Sep 17 00:00:00 2001 From: appscisumup Date: Thu, 19 Feb 2026 10:45:41 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 205 ++++++--------------------------------------------- 1 file changed, 23 insertions(+), 182 deletions(-) diff --git a/openapi.json b/openapi.json index 6b693ad..d3c76e5 100755 --- a/openapi.json +++ b/openapi.json @@ -4933,26 +4933,11 @@ } }, "404": { - "description": "No user with the specified ID exists.\n", + "description": "The requested Merchant does not exist.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseError" - }, - { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/ErrorCategoryClient" - }, - "code": { - "$ref": "#/components/schemas/ErrorCodeNotFound" - } - } - } - ] + "$ref": "#/components/schemas/Problem" } } } @@ -5028,26 +5013,11 @@ } }, "404": { - "description": "No user with the specified ID exists.\n", + "description": "The requested Merchant does not exist.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseError" - }, - { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/ErrorCategoryClient" - }, - "code": { - "$ref": "#/components/schemas/ErrorCodeNotFound" - } - } - } - ] + "$ref": "#/components/schemas/Problem" } } } @@ -5055,24 +5025,9 @@ "500": { "description": "An internal server error occurred.\n", "content": { - "application/json": { + "application/problem+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseError" - }, - { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/ErrorCategoryServer" - }, - "code": { - "$ref": "#/components/schemas/ErrorCodeInternalServerError" - } - } - } - ] + "$ref": "#/components/schemas/Problem" } } } @@ -5162,26 +5117,11 @@ } }, "404": { - "description": "No user with the specified ID exists.\n", + "description": "The requested Person does not exist.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseError" - }, - { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/ErrorCategoryClient" - }, - "code": { - "$ref": "#/components/schemas/ErrorCodeNotFound" - } - } - } - ] + "$ref": "#/components/schemas/Problem" } } } @@ -5189,24 +5129,9 @@ "500": { "description": "An internal server error occurred.\n", "content": { - "application/json": { + "application/problem+json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseError" - }, - { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/ErrorCategoryServer" - }, - "code": { - "$ref": "#/components/schemas/ErrorCodeInternalServerError" - } - } - } - ] + "$ref": "#/components/schemas/Problem" } } } @@ -9533,25 +9458,26 @@ "name": { "description": "The customer-facing business name.", "type": "string", - "example": "Gin & Dougnuts", + "example": "Example Coffee", "maxLength": 512 }, "dynamic_descriptor": { "description": "The descriptor is the text that your customer sees on their bank account statement.\nThe more recognisable your descriptor is, the less risk you have of receiving disputes (e.g. chargebacks).\n", "type": "string", + "example": "Example Coffee", "maxLength": 30, "pattern": "^[a-zA-Z0-9 \\-+\\'_.]{0,30}$" }, "website": { "description": "The business's publicly available website.", "type": "string", - "example": "https://gindoughnuts.com", + "example": "https://example.com", "maxLength": 512 }, "email": { "description": "A publicly available email address.", "type": "string", - "example": "contact@gindoughnuts.com", + "example": "contact@example.com", "maxLength": 256 }, "phone_number": { @@ -9876,47 +9802,6 @@ "updated_at" ] }, - "BaseError": { - "type": "object", - "properties": { - "instance": { - "description": "A unique identifier for the error instance. This can be used to trace the error back to the server logs.\n", - "type": "string" - }, - "message": { - "description": "A human-readable message describing the error that occurred.\n", - "type": "string" - } - } - }, - "ErrorCategoryClient": { - "description": "The category of the error.\n", - "type": "string", - "enum": [ - "client_error" - ] - }, - "ErrorCodeNotFound": { - "description": "An error code specifying the exact error that occurred.\n", - "type": "string", - "enum": [ - "not_found" - ] - }, - "ErrorCategoryServer": { - "description": "The category of the error.\n", - "type": "string", - "enum": [ - "server_error" - ] - }, - "ErrorCodeInternalServerError": { - "description": "An error code specifying the exact error that occurred.\n", - "type": "string", - "enum": [ - "internal_error" - ] - }, "Reader": { "description": "A physical card reader device that can accept in-person payments.", "type": "object", @@ -9936,6 +9821,12 @@ "metadata": { "$ref": "#/components/schemas/Metadata" }, + "service_account_id": { + "description": "Identifier of the system-managed service account associated with this reader.\nPresent only for readers that are already paired.\nThis field is currently in beta and may change.", + "type": "string", + "format": "uuid", + "x-beta": true + }, "created_at": { "description": "The timestamp of when the reader was created.", "type": "string", @@ -11988,56 +11879,6 @@ } } } - }, - "404NotFound": { - "description": "No user with the specified ID exists.\n", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseError" - }, - { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/ErrorCategoryClient" - }, - "code": { - "$ref": "#/components/schemas/ErrorCodeNotFound" - } - } - } - ] - } - } - } - }, - "500InternalServerError": { - "description": "An internal server error occurred.\n", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseError" - }, - { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/ErrorCategoryServer" - }, - "code": { - "$ref": "#/components/schemas/ErrorCodeInternalServerError" - } - } - } - ] - } - } - } } }, "securitySchemes": { From b5f4644511898eabae73a0282121cadde0699461 Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:47:26 +0000 Subject: [PATCH 2/2] chore: generate code --- .../java/com/sumup/sdk/models/BaseError.java | 61 ------------------- .../sumup/sdk/models/ErrorCategoryClient.java | 39 ------------ .../sumup/sdk/models/ErrorCategoryServer.java | 39 ------------ .../models/ErrorCodeInternalServerError.java | 39 ------------ .../sumup/sdk/models/ErrorCodeNotFound.java | 39 ------------ .../java/com/sumup/sdk/models/Reader.java | 21 +++++++ 6 files changed, 21 insertions(+), 217 deletions(-) delete mode 100644 src/main/java/com/sumup/sdk/models/BaseError.java delete mode 100644 src/main/java/com/sumup/sdk/models/ErrorCategoryClient.java delete mode 100644 src/main/java/com/sumup/sdk/models/ErrorCategoryServer.java delete mode 100644 src/main/java/com/sumup/sdk/models/ErrorCodeInternalServerError.java delete mode 100644 src/main/java/com/sumup/sdk/models/ErrorCodeNotFound.java diff --git a/src/main/java/com/sumup/sdk/models/BaseError.java b/src/main/java/com/sumup/sdk/models/BaseError.java deleted file mode 100644 index 197951a..0000000 --- a/src/main/java/com/sumup/sdk/models/BaseError.java +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record BaseError( - /** - * A unique identifier for the error instance. This can be used to trace the error back to the - * server logs. - */ - String instance, - - /** A human-readable message describing the error that occurred. */ - String message) { - /** - * Creates a builder for BaseError. - * - * @return Builder that constructs immutable BaseError instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for BaseError instances. */ - public static final class Builder { - private String instance; - private String message; - - private Builder() {} - - /** - * Sets the value for {@code instance}. - * - * @param instance A unique identifier for the error instance. This can be used to trace the - * error back to the server logs. - * @return This builder instance. - */ - public Builder instance(String instance) { - this.instance = instance; - return this; - } - - /** - * Sets the value for {@code message}. - * - * @param message A human-readable message describing the error that occurred. - * @return This builder instance. - */ - public Builder message(String message) { - this.message = message; - return this; - } - - /** - * Builds an immutable BaseError instance. - * - * @return Immutable BaseError. - */ - public BaseError build() { - return new BaseError(instance, message); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/ErrorCategoryClient.java b/src/main/java/com/sumup/sdk/models/ErrorCategoryClient.java deleted file mode 100644 index f47b160..0000000 --- a/src/main/java/com/sumup/sdk/models/ErrorCategoryClient.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The category of the error. */ -public enum ErrorCategoryClient { - CLIENT_ERROR("client_error"); - - private final String value; - - ErrorCategoryClient(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ErrorCategoryClient fromValue(String value) { - if (value == null) { - return null; - } - for (ErrorCategoryClient entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown ErrorCategoryClient value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/ErrorCategoryServer.java b/src/main/java/com/sumup/sdk/models/ErrorCategoryServer.java deleted file mode 100644 index 1f6acc0..0000000 --- a/src/main/java/com/sumup/sdk/models/ErrorCategoryServer.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The category of the error. */ -public enum ErrorCategoryServer { - SERVER_ERROR("server_error"); - - private final String value; - - ErrorCategoryServer(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ErrorCategoryServer fromValue(String value) { - if (value == null) { - return null; - } - for (ErrorCategoryServer entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown ErrorCategoryServer value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/ErrorCodeInternalServerError.java b/src/main/java/com/sumup/sdk/models/ErrorCodeInternalServerError.java deleted file mode 100644 index 03f0d46..0000000 --- a/src/main/java/com/sumup/sdk/models/ErrorCodeInternalServerError.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** An error code specifying the exact error that occurred. */ -public enum ErrorCodeInternalServerError { - INTERNAL_ERROR("internal_error"); - - private final String value; - - ErrorCodeInternalServerError(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ErrorCodeInternalServerError fromValue(String value) { - if (value == null) { - return null; - } - for (ErrorCodeInternalServerError entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown ErrorCodeInternalServerError value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/ErrorCodeNotFound.java b/src/main/java/com/sumup/sdk/models/ErrorCodeNotFound.java deleted file mode 100644 index 7d04bf1..0000000 --- a/src/main/java/com/sumup/sdk/models/ErrorCodeNotFound.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** An error code specifying the exact error that occurred. */ -public enum ErrorCodeNotFound { - NOT_FOUND("not_found"); - - private final String value; - - ErrorCodeNotFound(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static ErrorCodeNotFound fromValue(String value) { - if (value == null) { - return null; - } - for (ErrorCodeNotFound entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown ErrorCodeNotFound value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/Reader.java b/src/main/java/com/sumup/sdk/models/Reader.java index a6f90d6..8c11639 100644 --- a/src/main/java/com/sumup/sdk/models/Reader.java +++ b/src/main/java/com/sumup/sdk/models/Reader.java @@ -29,6 +29,12 @@ public record Reader( /** Custom human-readable, user-defined name for easier identification of the reader. */ com.sumup.sdk.models.ReaderName name, + /** + * Identifier of the system-managed service account associated with this reader. Present only + * for readers that are already paired. This field is currently in beta and may change. + */ + java.util.UUID serviceAccountId, + /** * The status of the reader object gives information about the current state of the reader. * Possible values: - `unknown` - The reader status is unknown. - `processing` - The reader is @@ -56,6 +62,7 @@ public static final class Builder { private com.sumup.sdk.models.ReaderId id; private com.sumup.sdk.models.Metadata metadata; private com.sumup.sdk.models.ReaderName name; + private java.util.UUID serviceAccountId; private com.sumup.sdk.models.ReaderStatus status; private java.time.OffsetDateTime updatedAt; @@ -121,6 +128,19 @@ public Builder name(com.sumup.sdk.models.ReaderName name) { return this; } + /** + * Sets the value for {@code serviceAccountId}. + * + * @param serviceAccountId Identifier of the system-managed service account associated with this + * reader. Present only for readers that are already paired. This field is currently in beta + * and may change. + * @return This builder instance. + */ + public Builder serviceAccountId(java.util.UUID serviceAccountId) { + this.serviceAccountId = serviceAccountId; + return this; + } + /** * Sets the value for {@code status}. * @@ -160,6 +180,7 @@ public Reader build() { Objects.requireNonNull(id, "id"), metadata, Objects.requireNonNull(name, "name"), + serviceAccountId, Objects.requireNonNull(status, "status"), Objects.requireNonNull(updatedAt, "updatedAt")); }