From 01007facb292b68efc6fa68ac50da5de830bfc51 Mon Sep 17 00:00:00 2001 From: appscisumup Date: Sun, 22 Mar 2026 12:13:00 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 76 +++------------------------------------------------- 1 file changed, 4 insertions(+), 72 deletions(-) diff --git a/openapi.json b/openapi.json index 03378dd..8eee23e 100755 --- a/openapi.json +++ b/openapi.json @@ -162,10 +162,7 @@ "currency": "EUR", "merchant_code": "MH4H92C7", "description": "Purchase", - "id": "2b79757a-de87-4a2e-90e4-b17c947c730d", - "status": "PAID", - "date": "2020-02-29T10:56:56+00:00", - "merchant_name": "John Doe LTD", + "valid_until": "2020-02-29T10:56:56+00:00", "redirect_url": "https://sumup.com" } }, @@ -613,8 +610,7 @@ "expiry_year": "2023", "expiry_month": "01", "cvv": "123", - "zip_code": "12345", - "last_4_digits": "3456" + "zip_code": "12345" } } }, @@ -6157,14 +6153,6 @@ "minLength": 5, "writeOnly": true }, - "last_4_digits": { - "description": "Last 4 digits of the payment card number.", - "type": "string", - "example": "3456", - "maxLength": 4, - "minLength": 4, - "readOnly": true - }, "type": { "$ref": "#/components/schemas/CardType" } @@ -6175,7 +6163,6 @@ "expiry_month", "expiry_year", "cvv", - "last_4_digits", "type" ], "title": "Card" @@ -6388,28 +6375,6 @@ "SETUP_RECURRING_PAYMENT" ] }, - "id": { - "description": "Unique ID of the checkout resource.", - "type": "string", - "readOnly": true - }, - "status": { - "description": "Current status of the checkout.", - "type": "string", - "enum": [ - "PENDING", - "FAILED", - "PAID" - ], - "readOnly": true - }, - "date": { - "description": "Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.", - "type": "string", - "format": "date-time", - "example": "2020-02-29T10:56:56+00:00", - "readOnly": true - }, "valid_until": { "description": "Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration time.", "type": "string", @@ -6417,22 +6382,6 @@ "example": "2020-02-29T10:56:56+00:00", "nullable": true }, - "transactions": { - "description": "List of transactions related to the payment.", - "type": "array", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/TransactionBase" - }, - { - "$ref": "#/components/schemas/TransactionCheckoutInfo" - } - ] - }, - "readOnly": true, - "uniqueItems": true - }, "redirect_url": { "description": "__Required__ for [APMs](https://developer.sumup.com/online-payments/apm/introduction) and __recommended__ for card payments. Refers to a url where the end user is redirected once the payment processing completes. If not specified, the [Payment Widget](https://developer.sumup.com/online-payments/tools/card-widget) renders [3DS challenge](https://developer.sumup.com/online-payments/features/3ds) within an iframe instead of performing a full-page redirect.", "type": "string", @@ -10275,17 +10224,6 @@ "description": "Details of the payment card that is saved as a payment instrument.", "type": "object", "properties": { - "token": { - "description": "Unique token identifying the saved payment card for a customer.", - "type": "string", - "readOnly": true - }, - "active": { - "description": "Indicates whether the payment instrument is active and can be used for payments. To deactivate it, send a `DELETE` request to the resource endpoint.", - "type": "boolean", - "default": true, - "readOnly": true - }, "type": { "description": "Type of the payment instrument.", "type": "string", @@ -10298,8 +10236,6 @@ } }, "required": [ - "token", - "active", "type", "card" ], @@ -10521,10 +10457,7 @@ "currency": "EUR", "merchant_code": "MH4H92C7", "description": "Purchase", - "id": "2b79757a-de87-4a2e-90e4-b17c947c730d", - "status": "PAID", - "date": "2020-02-29T10:56:56+00:00", - "merchant_name": "John Doe LTD", + "valid_until": "2020-02-29T10:56:56+00:00", "redirect_url": "https://sumup.com" } }, @@ -10581,8 +10514,7 @@ "expiry_year": "2023", "expiry_month": "01", "cvv": "123", - "zip_code": "12345", - "last_4_digits": "3456" + "zip_code": "12345" } } }, From 5a5e457e0bb0ffee152aa886ac38d4d8402b04d9 Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Sun, 22 Mar 2026 12:14:46 +0000 Subject: [PATCH 2/2] chore: generate code --- src/main/java/com/sumup/sdk/models/Card.java | 4 -- .../sdk/models/CheckoutCreateRequest.java | 19 --------- .../models/CheckoutCreateRequestStatus.java | 41 ------------------- .../sdk/models/PaymentInstrumentCard.java | 11 +---- 4 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 src/main/java/com/sumup/sdk/models/CheckoutCreateRequestStatus.java diff --git a/src/main/java/com/sumup/sdk/models/Card.java b/src/main/java/com/sumup/sdk/models/Card.java index b4c7787..ab06495 100644 --- a/src/main/java/com/sumup/sdk/models/Card.java +++ b/src/main/java/com/sumup/sdk/models/Card.java @@ -14,9 +14,6 @@ public record Card( /** Year from the expiration time of the payment card. Accepted formats are `YY` and `YYYY`. */ String expiryYear, - /** Last 4 digits of the payment card number. */ - String last4Digits, - /** Name of the cardholder as it appears on the payment card. */ String name, @@ -138,7 +135,6 @@ public Card build() { Objects.requireNonNull(cvv, "cvv"), Objects.requireNonNull(expiryMonth, "expiryMonth"), Objects.requireNonNull(expiryYear, "expiryYear"), - null, Objects.requireNonNull(name, "name"), Objects.requireNonNull(number, "number"), Objects.requireNonNull(type, "type"), diff --git a/src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java b/src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java index eea8522..9d5fbc3 100644 --- a/src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java +++ b/src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java @@ -26,21 +26,12 @@ public record CheckoutCreateRequest( */ String customerId, - /** - * Date and time of the creation of the payment checkout. Response format expressed according to - * [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code. - */ - java.time.OffsetDateTime date, - /** * Short description of the checkout visible in the SumUp dashboard. The description can * contribute to reporting, allowing easier identification of a checkout. */ String description, - /** Unique ID of the checkout resource. */ - String id, - /** Unique identifying code of the merchant profile. */ String merchantCode, @@ -60,12 +51,6 @@ public record CheckoutCreateRequest( /** URL to which the SumUp platform sends the processing status of the payment checkout. */ String returnUrl, - /** Current status of the checkout. */ - com.sumup.sdk.models.CheckoutCreateRequestStatus status, - - /** List of transactions related to the payment. */ - java.util.List transactions, - /** * Date and time of the checkout expiration before which the client application needs to send a * processing request. If no value is present, the checkout does not have an expiration time. @@ -229,15 +214,11 @@ public CheckoutCreateRequest build() { Objects.requireNonNull(checkoutReference, "checkoutReference"), Objects.requireNonNull(currency, "currency"), customerId, - null, description, - null, Objects.requireNonNull(merchantCode, "merchantCode"), purpose, redirectUrl, returnUrl, - null, - null, validUntil); } } diff --git a/src/main/java/com/sumup/sdk/models/CheckoutCreateRequestStatus.java b/src/main/java/com/sumup/sdk/models/CheckoutCreateRequestStatus.java deleted file mode 100644 index d5e3229..0000000 --- a/src/main/java/com/sumup/sdk/models/CheckoutCreateRequestStatus.java +++ /dev/null @@ -1,41 +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; - -/** Current status of the checkout. */ -public enum CheckoutCreateRequestStatus { - PENDING("PENDING"), - FAILED("FAILED"), - PAID("PAID"); - - private final String value; - - CheckoutCreateRequestStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static CheckoutCreateRequestStatus fromValue(String value) { - if (value == null) { - return null; - } - for (CheckoutCreateRequestStatus entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown CheckoutCreateRequestStatus value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java b/src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java index e45fb74..31299da 100644 --- a/src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java +++ b/src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java @@ -5,18 +5,9 @@ /** Details of the payment card that is saved as a payment instrument. */ public record PaymentInstrumentCard( - /** - * Indicates whether the payment instrument is active and can be used for payments. To - * deactivate it, send a `DELETE` request to the resource endpoint. - */ - Boolean active, - /** __Required when payment type is `card`.__ Details of the payment card. */ com.sumup.sdk.models.Card card, - /** Unique token identifying the saved payment card for a customer. */ - String token, - /** Type of the payment instrument. */ com.sumup.sdk.models.PaymentInstrumentCardType type) { /** @@ -64,7 +55,7 @@ public Builder type(com.sumup.sdk.models.PaymentInstrumentCardType type) { */ public PaymentInstrumentCard build() { return new PaymentInstrumentCard( - null, Objects.requireNonNull(card, "card"), null, Objects.requireNonNull(type, "type")); + Objects.requireNonNull(card, "card"), Objects.requireNonNull(type, "type")); } } }