Skip to content

Commit 22b5a59

Browse files
authored
chore: synced file(s) with sumup/apis (#57)
1 parent 24fc9a4 commit 22b5a59

5 files changed

Lines changed: 5 additions & 146 deletions

File tree

openapi.json

Lines changed: 4 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,7 @@
162162
"currency": "EUR",
163163
"merchant_code": "MH4H92C7",
164164
"description": "Purchase",
165-
"id": "2b79757a-de87-4a2e-90e4-b17c947c730d",
166-
"status": "PAID",
167-
"date": "2020-02-29T10:56:56+00:00",
168-
"merchant_name": "John Doe LTD",
165+
"valid_until": "2020-02-29T10:56:56+00:00",
169166
"redirect_url": "https://sumup.com"
170167
}
171168
},
@@ -613,8 +610,7 @@
613610
"expiry_year": "2023",
614611
"expiry_month": "01",
615612
"cvv": "123",
616-
"zip_code": "12345",
617-
"last_4_digits": "3456"
613+
"zip_code": "12345"
618614
}
619615
}
620616
},
@@ -6157,14 +6153,6 @@
61576153
"minLength": 5,
61586154
"writeOnly": true
61596155
},
6160-
"last_4_digits": {
6161-
"description": "Last 4 digits of the payment card number.",
6162-
"type": "string",
6163-
"example": "3456",
6164-
"maxLength": 4,
6165-
"minLength": 4,
6166-
"readOnly": true
6167-
},
61686156
"type": {
61696157
"$ref": "#/components/schemas/CardType"
61706158
}
@@ -6175,7 +6163,6 @@
61756163
"expiry_month",
61766164
"expiry_year",
61776165
"cvv",
6178-
"last_4_digits",
61796166
"type"
61806167
],
61816168
"title": "Card"
@@ -6388,51 +6375,13 @@
63886375
"SETUP_RECURRING_PAYMENT"
63896376
]
63906377
},
6391-
"id": {
6392-
"description": "Unique ID of the checkout resource.",
6393-
"type": "string",
6394-
"readOnly": true
6395-
},
6396-
"status": {
6397-
"description": "Current status of the checkout.",
6398-
"type": "string",
6399-
"enum": [
6400-
"PENDING",
6401-
"FAILED",
6402-
"PAID"
6403-
],
6404-
"readOnly": true
6405-
},
6406-
"date": {
6407-
"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.",
6408-
"type": "string",
6409-
"format": "date-time",
6410-
"example": "2020-02-29T10:56:56+00:00",
6411-
"readOnly": true
6412-
},
64136378
"valid_until": {
64146379
"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.",
64156380
"type": "string",
64166381
"format": "date-time",
64176382
"example": "2020-02-29T10:56:56+00:00",
64186383
"nullable": true
64196384
},
6420-
"transactions": {
6421-
"description": "List of transactions related to the payment.",
6422-
"type": "array",
6423-
"items": {
6424-
"allOf": [
6425-
{
6426-
"$ref": "#/components/schemas/TransactionBase"
6427-
},
6428-
{
6429-
"$ref": "#/components/schemas/TransactionCheckoutInfo"
6430-
}
6431-
]
6432-
},
6433-
"readOnly": true,
6434-
"uniqueItems": true
6435-
},
64366385
"redirect_url": {
64376386
"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.",
64386387
"type": "string",
@@ -10275,17 +10224,6 @@
1027510224
"description": "Details of the payment card that is saved as a payment instrument.",
1027610225
"type": "object",
1027710226
"properties": {
10278-
"token": {
10279-
"description": "Unique token identifying the saved payment card for a customer.",
10280-
"type": "string",
10281-
"readOnly": true
10282-
},
10283-
"active": {
10284-
"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.",
10285-
"type": "boolean",
10286-
"default": true,
10287-
"readOnly": true
10288-
},
1028910227
"type": {
1029010228
"description": "Type of the payment instrument.",
1029110229
"type": "string",
@@ -10298,8 +10236,6 @@
1029810236
}
1029910237
},
1030010238
"required": [
10301-
"token",
10302-
"active",
1030310239
"type",
1030410240
"card"
1030510241
],
@@ -10521,10 +10457,7 @@
1052110457
"currency": "EUR",
1052210458
"merchant_code": "MH4H92C7",
1052310459
"description": "Purchase",
10524-
"id": "2b79757a-de87-4a2e-90e4-b17c947c730d",
10525-
"status": "PAID",
10526-
"date": "2020-02-29T10:56:56+00:00",
10527-
"merchant_name": "John Doe LTD",
10460+
"valid_until": "2020-02-29T10:56:56+00:00",
1052810461
"redirect_url": "https://sumup.com"
1052910462
}
1053010463
},
@@ -10581,8 +10514,7 @@
1058110514
"expiry_year": "2023",
1058210515
"expiry_month": "01",
1058310516
"cvv": "123",
10584-
"zip_code": "12345",
10585-
"last_4_digits": "3456"
10517+
"zip_code": "12345"
1058610518
}
1058710519
}
1058810520
},

src/main/java/com/sumup/sdk/models/Card.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ public record Card(
1414
/** Year from the expiration time of the payment card. Accepted formats are `YY` and `YYYY`. */
1515
String expiryYear,
1616

17-
/** Last 4 digits of the payment card number. */
18-
String last4Digits,
19-
2017
/** Name of the cardholder as it appears on the payment card. */
2118
String name,
2219

@@ -138,7 +135,6 @@ public Card build() {
138135
Objects.requireNonNull(cvv, "cvv"),
139136
Objects.requireNonNull(expiryMonth, "expiryMonth"),
140137
Objects.requireNonNull(expiryYear, "expiryYear"),
141-
null,
142138
Objects.requireNonNull(name, "name"),
143139
Objects.requireNonNull(number, "number"),
144140
Objects.requireNonNull(type, "type"),

src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,12 @@ public record CheckoutCreateRequest(
2626
*/
2727
String customerId,
2828

29-
/**
30-
* Date and time of the creation of the payment checkout. Response format expressed according to
31-
* [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.
32-
*/
33-
java.time.OffsetDateTime date,
34-
3529
/**
3630
* Short description of the checkout visible in the SumUp dashboard. The description can
3731
* contribute to reporting, allowing easier identification of a checkout.
3832
*/
3933
String description,
4034

41-
/** Unique ID of the checkout resource. */
42-
String id,
43-
4435
/** Unique identifying code of the merchant profile. */
4536
String merchantCode,
4637

@@ -60,12 +51,6 @@ public record CheckoutCreateRequest(
6051
/** URL to which the SumUp platform sends the processing status of the payment checkout. */
6152
String returnUrl,
6253

63-
/** Current status of the checkout. */
64-
com.sumup.sdk.models.CheckoutCreateRequestStatus status,
65-
66-
/** List of transactions related to the payment. */
67-
java.util.List<com.sumup.sdk.models.TransactionBase> transactions,
68-
6954
/**
7055
* Date and time of the checkout expiration before which the client application needs to send a
7156
* processing request. If no value is present, the checkout does not have an expiration time.
@@ -229,15 +214,11 @@ public CheckoutCreateRequest build() {
229214
Objects.requireNonNull(checkoutReference, "checkoutReference"),
230215
Objects.requireNonNull(currency, "currency"),
231216
customerId,
232-
null,
233217
description,
234-
null,
235218
Objects.requireNonNull(merchantCode, "merchantCode"),
236219
purpose,
237220
redirectUrl,
238221
returnUrl,
239-
null,
240-
null,
241222
validUntil);
242223
}
243224
}

src/main/java/com/sumup/sdk/models/CheckoutCreateRequestStatus.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,9 @@
55

66
/** Details of the payment card that is saved as a payment instrument. */
77
public record PaymentInstrumentCard(
8-
/**
9-
* Indicates whether the payment instrument is active and can be used for payments. To
10-
* deactivate it, send a `DELETE` request to the resource endpoint.
11-
*/
12-
Boolean active,
13-
148
/** __Required when payment type is `card`.__ Details of the payment card. */
159
com.sumup.sdk.models.Card card,
1610

17-
/** Unique token identifying the saved payment card for a customer. */
18-
String token,
19-
2011
/** Type of the payment instrument. */
2112
com.sumup.sdk.models.PaymentInstrumentCardType type) {
2213
/**
@@ -64,7 +55,7 @@ public Builder type(com.sumup.sdk.models.PaymentInstrumentCardType type) {
6455
*/
6556
public PaymentInstrumentCard build() {
6657
return new PaymentInstrumentCard(
67-
null, Objects.requireNonNull(card, "card"), null, Objects.requireNonNull(type, "type"));
58+
Objects.requireNonNull(card, "card"), Objects.requireNonNull(type, "type"));
6859
}
6960
}
7061
}

0 commit comments

Comments
 (0)