Skip to content
Open
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
43 changes: 17 additions & 26 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -1913,7 +1913,7 @@
}
},
{
"name": "id",
"name": "transaction_id",
"in": "path",
"description": "Unique ID of the transaction.",
"required": true,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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."
}
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -4677,7 +4677,7 @@
}
},
{
"name": "id",
"name": "reader_id",
"in": "path",
"description": "The unique identifier of the reader.",
"required": true,
Expand Down Expand Up @@ -4757,7 +4757,7 @@
}
},
{
"name": "id",
"name": "reader_id",
"in": "path",
"description": "The unique identifier of the reader.",
"required": true,
Expand Down Expand Up @@ -4830,7 +4830,7 @@
}
},
{
"name": "id",
"name": "reader_id",
"in": "path",
"description": "The unique identifier of the reader.",
"required": true,
Expand Down Expand Up @@ -5403,7 +5403,7 @@
}
},
"CheckoutID": {
"name": "id",
"name": "checkout_id",
"in": "path",
"required": true,
"description": "Unique ID of the checkout resource.",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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."
}
Expand Down
24 changes: 12 additions & 12 deletions src/Checkouts/Checkouts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, mixed>|null $body Optional request payload
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand All @@ -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;
Expand All @@ -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
Expand All @@ -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);

Expand All @@ -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
Expand All @@ -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);

Expand Down Expand Up @@ -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<string, mixed> $body Required request payload
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand All @@ -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)) {
Expand Down
18 changes: 9 additions & 9 deletions src/Readers/Readers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);

Expand All @@ -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
Expand All @@ -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);

Expand Down Expand Up @@ -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<string, mixed> $body Required request payload
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand All @@ -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)) {
Expand Down
6 changes: 3 additions & 3 deletions src/Receipts/Receipts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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)) {
Expand Down
6 changes: 3 additions & 3 deletions src/Transactions/Transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, mixed>|null $body Optional request payload
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand All @@ -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;
Expand Down
Loading