From da728f31b1c6d83be8298bc419e8905c42bccd0a Mon Sep 17 00:00:00 2001 From: appscisumup Date: Fri, 22 May 2026 14:34:12 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/openapi.json b/openapi.json index 3217c6b..412977f 100755 --- a/openapi.json +++ b/openapi.json @@ -543,10 +543,10 @@ ] } }, - "/v0.1/checkouts/{id}": { + "/v0.1/checkouts/{checkout_id}": { "parameters": [ { - "name": "id", + "name": "checkout_id", "in": "path", "description": "Unique ID of the checkout resource.", "required": true, @@ -1150,14 +1150,14 @@ ] } }, - "/v0.2/checkouts/{id}/apple-pay-session": { + "/v0.2/checkouts/{checkout_id}/apple-pay-session": { "put": { "operationId": "CreateApplePaySession", "summary": "Create an Apple Pay session", "description": "Creates an Apple Pay merchant session for the specified checkout.\n\nUse this endpoint after the customer selects Apple Pay and before calling\n`ApplePaySession.completeMerchantValidation(...)` in the browser.\nSumUp validates the merchant session request and returns the Apple Pay\nsession object that your frontend should pass to Apple's JavaScript API.\n", "parameters": [ { - "name": "id", + "name": "checkout_id", "in": "path", "description": "Unique ID of the checkout resource.", "required": true, @@ -1900,7 +1900,7 @@ ] } }, - "/v1.0/merchants/{merchant_code}/payments/{id}/refunds": { + "/v1.0/merchants/{merchant_code}/payments/{transaction_id}/refunds": { "parameters": [ { "name": "merchant_code", @@ -1913,7 +1913,7 @@ } }, { - "name": "id", + "name": "transaction_id", "in": "path", "description": "Unique ID of the transaction.", "required": true, @@ -2658,14 +2658,14 @@ ] } }, - "/v1.1/receipts/{id}": { + "/v1.1/receipts/{transaction_id}": { "get": { "operationId": "GetReceipt", "summary": "Retrieve receipt details", "description": "Retrieves receipt specific data for a transaction.", "parameters": [ { - "name": "id", + "name": "transaction_id", "in": "path", "description": "SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD.", "required": true, @@ -4549,14 +4549,14 @@ "UpdateReaderByID": { "operationId": "UpdateReader", "parameters": { - "id": "$response.body#/id" + "reader_id": "$response.body#/id" }, "description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code." }, "DeleteReaderByID": { "operationId": "DeleteReader", "parameters": { - "id": "$response.body#/id" + "reader_id": "$response.body#/id" }, "description": "Delete the reader." } @@ -4639,7 +4639,7 @@ ] } }, - "/v0.1/merchants/{merchant_code}/readers/{id}": { + "/v0.1/merchants/{merchant_code}/readers/{reader_id}": { "get": { "operationId": "GetReader", "summary": "Retrieve a Reader", @@ -4677,7 +4677,7 @@ } }, { - "name": "id", + "name": "reader_id", "in": "path", "description": "The unique identifier of the reader.", "required": true, @@ -4757,7 +4757,7 @@ } }, { - "name": "id", + "name": "reader_id", "in": "path", "description": "The unique identifier of the reader.", "required": true, @@ -4830,7 +4830,7 @@ } }, { - "name": "id", + "name": "reader_id", "in": "path", "description": "The unique identifier of the reader.", "required": true, @@ -5403,7 +5403,7 @@ } }, "CheckoutID": { - "name": "id", + "name": "checkout_id", "in": "path", "required": true, "description": "Unique ID of the checkout resource.", @@ -5539,15 +5539,6 @@ "type": "string" } }, - "TxnID": { - "in": "path", - "name": "txn_id", - "required": true, - "description": "Unique ID of the transaction.", - "schema": { - "type": "string" - } - }, "TypesFilter": { "name": "types", "in": "query", @@ -9595,14 +9586,14 @@ "UpdateReaderByID": { "operationId": "UpdateReader", "parameters": { - "id": "$response.body#/id" + "reader_id": "$response.body#/id" }, "description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code." }, "DeleteReaderByID": { "operationId": "DeleteReader", "parameters": { - "id": "$response.body#/id" + "reader_id": "$response.body#/id" }, "description": "Delete the reader." } From adbcc6fdfe40d574a26fa63c755238a342b22bab Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 14:35:37 +0000 Subject: [PATCH 2/2] chore: generate code --- src/Checkouts/Checkouts.php | 24 ++++++++++++------------ src/Readers/Readers.php | 18 +++++++++--------- src/Receipts/Receipts.php | 6 +++--- src/Transactions/Transactions.php | 6 +++--- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/Checkouts/Checkouts.php b/src/Checkouts/Checkouts.php index 7948fde..7491cd4 100644 --- a/src/Checkouts/Checkouts.php +++ b/src/Checkouts/Checkouts.php @@ -223,7 +223,7 @@ public function create(\SumUp\Types\CheckoutCreateRequest|array $body, ?RequestO /** * Create an Apple Pay session * - * @param string $id Unique ID of the checkout resource. + * @param string $checkoutId Unique ID of the checkout resource. * @param CheckoutsCreateApplePaySessionRequest|array|null $body Optional request payload * @param RequestOptions|null $requestOptions Optional typed request options * @@ -233,9 +233,9 @@ public function create(\SumUp\Types\CheckoutCreateRequest|array $body, ?RequestO * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function createApplePaySession(string $id, CheckoutsCreateApplePaySessionRequest|array|null $body = null, ?RequestOptions $requestOptions = null): array + public function createApplePaySession(string $checkoutId, CheckoutsCreateApplePaySessionRequest|array|null $body = null, ?RequestOptions $requestOptions = null): array { - $path = sprintf('/v0.2/checkouts/%s/apple-pay-session', rawurlencode((string) $id)); + $path = sprintf('/v0.2/checkouts/%s/apple-pay-session', rawurlencode((string) $checkoutId)); $payload = []; if ($body !== null) { $requestBody = $body; @@ -259,7 +259,7 @@ public function createApplePaySession(string $id, CheckoutsCreateApplePaySession /** * Deactivate a checkout * - * @param string $id Unique ID of the checkout resource. + * @param string $checkoutId Unique ID of the checkout resource. * @param RequestOptions|null $requestOptions Optional typed request options * * @return \SumUp\Types\Checkout @@ -268,9 +268,9 @@ public function createApplePaySession(string $id, CheckoutsCreateApplePaySession * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function deactivate(string $id, ?RequestOptions $requestOptions = null): \SumUp\Types\Checkout + public function deactivate(string $checkoutId, ?RequestOptions $requestOptions = null): \SumUp\Types\Checkout { - $path = sprintf('/v0.1/checkouts/%s', rawurlencode((string) $id)); + $path = sprintf('/v0.1/checkouts/%s', rawurlencode((string) $checkoutId)); $payload = []; $headers = RequestHeaders::build($this->accessToken, $requestOptions); @@ -286,7 +286,7 @@ public function deactivate(string $id, ?RequestOptions $requestOptions = null): /** * Retrieve a checkout * - * @param string $id Unique ID of the checkout resource. + * @param string $checkoutId Unique ID of the checkout resource. * @param RequestOptions|null $requestOptions Optional typed request options * * @return \SumUp\Types\CheckoutSuccess @@ -295,9 +295,9 @@ public function deactivate(string $id, ?RequestOptions $requestOptions = null): * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function get(string $id, ?RequestOptions $requestOptions = null): \SumUp\Types\CheckoutSuccess + public function get(string $checkoutId, ?RequestOptions $requestOptions = null): \SumUp\Types\CheckoutSuccess { - $path = sprintf('/v0.1/checkouts/%s', rawurlencode((string) $id)); + $path = sprintf('/v0.1/checkouts/%s', rawurlencode((string) $checkoutId)); $payload = []; $headers = RequestHeaders::build($this->accessToken, $requestOptions); @@ -392,7 +392,7 @@ public function listAvailablePaymentMethods(string $merchantCode, ?CheckoutsList /** * Process a checkout * - * @param string $id Unique ID of the checkout resource. + * @param string $checkoutId Unique ID of the checkout resource. * @param \SumUp\Types\ProcessCheckout|array $body Required request payload * @param RequestOptions|null $requestOptions Optional typed request options * @@ -402,9 +402,9 @@ public function listAvailablePaymentMethods(string $merchantCode, ?CheckoutsList * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function process(string $id, \SumUp\Types\ProcessCheckout|array $body, ?RequestOptions $requestOptions = null): \SumUp\Types\CheckoutSuccess|\SumUp\Types\CheckoutAccepted + public function process(string $checkoutId, \SumUp\Types\ProcessCheckout|array $body, ?RequestOptions $requestOptions = null): \SumUp\Types\CheckoutSuccess|\SumUp\Types\CheckoutAccepted { - $path = sprintf('/v0.1/checkouts/%s', rawurlencode((string) $id)); + $path = sprintf('/v0.1/checkouts/%s', rawurlencode((string) $checkoutId)); $payload = []; $requestBody = $body; if (is_array($requestBody)) { diff --git a/src/Readers/Readers.php b/src/Readers/Readers.php index 8cb839f..8f7f568 100644 --- a/src/Readers/Readers.php +++ b/src/Readers/Readers.php @@ -273,7 +273,7 @@ public function createCheckout(string $merchantCode, string $readerId, \SumUp\Ty * Delete a reader * * @param string $merchantCode Short unique identifier for the merchant. - * @param string $id The unique identifier of the reader. + * @param string $readerId The unique identifier of the reader. * @param RequestOptions|null $requestOptions Optional typed request options * * @return null @@ -282,9 +282,9 @@ public function createCheckout(string $merchantCode, string $readerId, \SumUp\Ty * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function delete(string $merchantCode, string $id, ?RequestOptions $requestOptions = null): null + public function delete(string $merchantCode, string $readerId, ?RequestOptions $requestOptions = null): null { - $path = sprintf('/v0.1/merchants/%s/readers/%s', rawurlencode((string) $merchantCode), rawurlencode((string) $id)); + $path = sprintf('/v0.1/merchants/%s/readers/%s', rawurlencode((string) $merchantCode), rawurlencode((string) $readerId)); $payload = []; $headers = RequestHeaders::build($this->accessToken, $requestOptions); @@ -301,7 +301,7 @@ public function delete(string $merchantCode, string $id, ?RequestOptions $reques * Retrieve a Reader * * @param string $merchantCode Short unique identifier for the merchant. - * @param string $id The unique identifier of the reader. + * @param string $readerId The unique identifier of the reader. * @param RequestOptions|null $requestOptions Optional typed request options * * @return \SumUp\Types\Reader @@ -310,9 +310,9 @@ public function delete(string $merchantCode, string $id, ?RequestOptions $reques * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function get(string $merchantCode, string $id, ?RequestOptions $requestOptions = null): \SumUp\Types\Reader + public function get(string $merchantCode, string $readerId, ?RequestOptions $requestOptions = null): \SumUp\Types\Reader { - $path = sprintf('/v0.1/merchants/%s/readers/%s', rawurlencode((string) $merchantCode), rawurlencode((string) $id)); + $path = sprintf('/v0.1/merchants/%s/readers/%s', rawurlencode((string) $merchantCode), rawurlencode((string) $readerId)); $payload = []; $headers = RequestHeaders::build($this->accessToken, $requestOptions); @@ -419,7 +419,7 @@ public function terminateCheckout(string $merchantCode, string $readerId, Reader * Update a Reader * * @param string $merchantCode Short unique identifier for the merchant. - * @param string $id The unique identifier of the reader. + * @param string $readerId The unique identifier of the reader. * @param ReadersUpdateRequest|array $body Required request payload * @param RequestOptions|null $requestOptions Optional typed request options * @@ -429,9 +429,9 @@ public function terminateCheckout(string $merchantCode, string $readerId, Reader * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function update(string $merchantCode, string $id, ReadersUpdateRequest|array $body, ?RequestOptions $requestOptions = null): \SumUp\Types\Reader + public function update(string $merchantCode, string $readerId, ReadersUpdateRequest|array $body, ?RequestOptions $requestOptions = null): \SumUp\Types\Reader { - $path = sprintf('/v0.1/merchants/%s/readers/%s', rawurlencode((string) $merchantCode), rawurlencode((string) $id)); + $path = sprintf('/v0.1/merchants/%s/readers/%s', rawurlencode((string) $merchantCode), rawurlencode((string) $readerId)); $payload = []; $requestBody = $body; if (is_array($requestBody)) { diff --git a/src/Receipts/Receipts.php b/src/Receipts/Receipts.php index bf4dde8..06c7188 100644 --- a/src/Receipts/Receipts.php +++ b/src/Receipts/Receipts.php @@ -72,7 +72,7 @@ public function __construct(HttpClientInterface $client, string $accessToken) /** * Retrieve receipt details * - * @param string $id SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD. + * @param string $transactionId SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD. * @param ReceiptsGetParams|null $queryParams Optional query string parameters * @param RequestOptions|null $requestOptions Optional typed request options * @@ -82,9 +82,9 @@ public function __construct(HttpClientInterface $client, string $accessToken) * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function get(string $id, ?ReceiptsGetParams $queryParams = null, ?RequestOptions $requestOptions = null): \SumUp\Types\Receipt + public function get(string $transactionId, ?ReceiptsGetParams $queryParams = null, ?RequestOptions $requestOptions = null): \SumUp\Types\Receipt { - $path = sprintf('/v1.1/receipts/%s', rawurlencode((string) $id)); + $path = sprintf('/v1.1/receipts/%s', rawurlencode((string) $transactionId)); if ($queryParams !== null) { $queryParamsData = []; if (isset($queryParams->mid)) { diff --git a/src/Transactions/Transactions.php b/src/Transactions/Transactions.php index 01a57d1..ccc3a98 100644 --- a/src/Transactions/Transactions.php +++ b/src/Transactions/Transactions.php @@ -384,7 +384,7 @@ public function list(string $merchantCode, ?TransactionsListParams $queryParams * Refund a transaction * * @param string $merchantCode Merchant code of the account that owns the payment to refund. - * @param string $id Unique ID of the transaction. + * @param string $transactionId Unique ID of the transaction. * @param TransactionsRefundRequest|array|null $body Optional request payload * @param RequestOptions|null $requestOptions Optional typed request options * @@ -394,9 +394,9 @@ public function list(string $merchantCode, ?TransactionsListParams $queryParams * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function refund(string $merchantCode, string $id, TransactionsRefundRequest|array|null $body = null, ?RequestOptions $requestOptions = null): null + public function refund(string $merchantCode, string $transactionId, TransactionsRefundRequest|array|null $body = null, ?RequestOptions $requestOptions = null): null { - $path = sprintf('/v1.0/merchants/%s/payments/%s/refunds', rawurlencode((string) $merchantCode), rawurlencode((string) $id)); + $path = sprintf('/v1.0/merchants/%s/payments/%s/refunds', rawurlencode((string) $merchantCode), rawurlencode((string) $transactionId)); $payload = []; if ($body !== null) { $requestBody = $body;