From d7b148537316d53961f394e243fa2b2ca75792da Mon Sep 17 00:00:00 2001 From: "sumup-release-bot[bot]" <241716704+sumup-release-bot[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:29:44 +0000 Subject: [PATCH 1/3] chore: synced local 'openapi.json' with remote 'specs/openapi31.json' --- openapi.json | 424 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 317 insertions(+), 107 deletions(-) diff --git a/openapi.json b/openapi.json index 0711ccb..64d1f0a 100644 --- a/openapi.json +++ b/openapi.json @@ -106,13 +106,10 @@ }, { "name": "Sales", - "description": "Operations related to reading sales data.", + "description": "Read a merchant's fully-paid, closed sales, including item lines, taxes, discounts, and payments.\n\nList sales to retrieve full `Sale` objects, or search by date, payment status, and sales channel\nto retrieve summaries. Use a summary's `id` to get the full sale.\n\nAmounts are expressed in minor units according to each sale's `currency.scale`.", "x-core-objects": [ { "$ref": "#/components/schemas/Sale" - }, - { - "$ref": "#/components/schemas/PublicPaymentV10" } ], "x-displayName": "Sales" @@ -275,7 +272,11 @@ }, { "oauth2": [ - "payments", + "payments" + ] + }, + { + "oauth2": [ "checkouts.write" ] } @@ -616,7 +617,11 @@ }, { "oauth2": [ - "payments", + "payments" + ] + }, + { + "oauth2": [ "checkouts.read" ] } @@ -717,7 +722,11 @@ }, { "oauth2": [ - "payments", + "payments" + ] + }, + { + "oauth2": [ "checkouts.read" ] } @@ -856,7 +865,11 @@ }, { "oauth2": [ - "payments", + "payments" + ] + }, + { + "oauth2": [ "checkouts.write" ] } @@ -968,7 +981,11 @@ }, { "oauth2": [ - "payments", + "payments" + ] + }, + { + "oauth2": [ "checkouts.write" ] } @@ -1412,7 +1429,11 @@ }, { "oauth2": [ - "payments", + "payments" + ] + }, + { + "oauth2": [ "checkouts.write" ] } @@ -1657,7 +1678,11 @@ }, { "oauth2": [ - "payment_instruments", + "payment_instruments" + ] + }, + { + "oauth2": [ "customers.write" ] } @@ -1808,7 +1833,11 @@ }, { "oauth2": [ - "payment_instruments", + "payment_instruments" + ] + }, + { + "oauth2": [ "customers.read" ] } @@ -1907,7 +1936,11 @@ }, { "oauth2": [ - "payment_instruments", + "payment_instruments" + ] + }, + { + "oauth2": [ "customers.write" ] } @@ -2036,7 +2069,11 @@ }, { "oauth2": [ - "payment_instruments", + "payment_instruments" + ] + }, + { + "oauth2": [ "customers.read" ] } @@ -2162,7 +2199,11 @@ }, { "oauth2": [ - "payment_instruments", + "payment_instruments" + ] + }, + { + "oauth2": [ "customers.write" ] } @@ -2297,7 +2338,11 @@ }, { "oauth2": [ - "payments", + "payments" + ] + }, + { + "oauth2": [ "refunds.write" ] } @@ -2483,7 +2528,11 @@ }, { "oauth2": [ - "transactions.history", + "transactions.history" + ] + }, + { + "oauth2": [ "transactions.read" ] } @@ -2565,7 +2614,7 @@ "merchant_code": "MH4H92C7", "vat_amount": 6, "tip_amount": 3, - "entry_mode": "CUSTOMER_ENTRY", + "entry_mode": "customer entry", "auth_code": "053201" } } @@ -2629,7 +2678,11 @@ }, { "oauth2": [ - "transactions.history", + "transactions.history" + ] + }, + { + "oauth2": [ "transactions.read" ] } @@ -2750,8 +2803,8 @@ "schema": { "type": "array", "example": [ - "CUSTOMER_ENTRY", - "CHIP" + "customer entry", + "chip" ], "items": { "$ref": "#/components/schemas/EntryMode" @@ -2958,8 +3011,16 @@ }, { "oauth2": [ - "user.profile", - "user.profile_readonly", + "user.profile" + ] + }, + { + "oauth2": [ + "user.profile_readonly" + ] + }, + { + "oauth2": [ "payouts.read" ] } @@ -3157,7 +3218,11 @@ }, { "oauth2": [ - "receipts.read", + "receipts.read" + ] + }, + { + "oauth2": [ "transactions.history" ] } @@ -3437,7 +3502,11 @@ }, { "oauth2": [ - "payments", + "payments" + ] + }, + { + "oauth2": [ "readers.write" ] } @@ -3465,7 +3534,11 @@ }, { "oauth2": [ - "user.profile", + "user.profile" + ] + }, + { + "oauth2": [ "user.profile_readonly" ] } @@ -3764,7 +3837,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "members.read" ] } @@ -3826,7 +3903,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "members.write" ] } @@ -4007,7 +4088,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "members.read" ] } @@ -4090,7 +4175,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "members.write" ] } @@ -4278,7 +4367,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "members.write" ] } @@ -4372,7 +4465,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "roles.read" ] } @@ -4442,7 +4539,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "roles.write" ] } @@ -4590,7 +4691,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "roles.read" ] } @@ -4659,7 +4764,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "roles.write" ] } @@ -4751,7 +4860,11 @@ }, { "oauth2": [ - "user.subaccounts", + "user.subaccounts" + ] + }, + { + "oauth2": [ "roles.write" ] } @@ -4910,7 +5023,11 @@ }, { "oauth2": [ - "user.profile", + "user.profile" + ] + }, + { + "oauth2": [ "user.profile_readonly" ] } @@ -4979,7 +5096,11 @@ }, { "oauth2": [ - "user.profile", + "user.profile" + ] + }, + { + "oauth2": [ "user.profile_readonly" ] } @@ -5048,7 +5169,11 @@ }, { "oauth2": [ - "user.profile", + "user.profile" + ] + }, + { + "oauth2": [ "user.profile_readonly" ] } @@ -5127,7 +5252,11 @@ }, { "oauth2": [ - "readers.read", + "readers.read" + ] + }, + { + "oauth2": [ "terminals.read" ] } @@ -5211,7 +5340,11 @@ }, { "oauth2": [ - "readers.write", + "readers.write" + ] + }, + { + "oauth2": [ "terminals.write" ] } @@ -5382,7 +5515,11 @@ }, { "oauth2": [ - "readers.read", + "readers.read" + ] + }, + { + "oauth2": [ "terminals.read" ] } @@ -5489,7 +5626,11 @@ }, { "oauth2": [ - "readers.write", + "readers.write" + ] + }, + { + "oauth2": [ "terminals.write" ] } @@ -5568,7 +5709,11 @@ }, { "oauth2": [ - "readers.write", + "readers.write" + ] + }, + { + "oauth2": [ "terminals.write" ] } @@ -5670,9 +5815,18 @@ "tags": [ "Sales" ], - "summary": "Lists sales", + "summary": "List sales", "description": "Returns a paginated list of `Sale` objects. Results are sorted **newest first** by the\n**newest event** recorded for each sale. Pagination tokens follow that order.\n\nCovers the merchant’s **last two years** of sales. Non-finalised sales are never returned;\nonly fully-paid sales. Use `POST /sales/search` for filtered queries.", "operationId": "ListSalesV10", + "x-codegen": { + "method_name": "list" + }, + "x-scopes": [ + "sales.read" + ], + "x-permissions": [ + "merchant.read" + ], "security": [ { "apiKey": [] @@ -5683,12 +5837,6 @@ ] } ], - "x-scopes": [ - "sales.read" - ], - "x-permissions": [ - "merchant_read" - ], "parameters": [ { "name": "merchant_code", @@ -5705,11 +5853,10 @@ "name": "pagination_token", "in": "query", "required": false, - "description": "Pagination token for subsequent requests. Should only be set by clients if they have\nreceived a token in the previous response, and this request is an immediate follow-up\nrequest to that response to load the subsequent page. Clients should treat this as an\nopaque token and should not attempt to parse it in any way.", + "description": "Opaque token from the previous list response. Omit it on the first request. To load\nthe next page, pass the returned token unchanged. Not interchangeable with tokens\nfrom `POST /sales/search`.", "schema": { "type": "string" - }, - "example": "66bcbtzelrubzeuzruzgu76678trncH" + } }, { "name": "pagination_limit", @@ -5757,7 +5904,7 @@ } }, "403": { - "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant_read` permission.", + "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant.read` permission.", "content": { "application/problem+json": { "schema": { @@ -5784,9 +5931,18 @@ "tags": [ "Sales" ], - "summary": "Searches sales", + "summary": "Search sales", "description": "Returns a paginated list of `SaleSearchItem` rows matching filter criteria. Results are\nsorted **newest first** by **sale close date**.\n\nFilters from different categories stack with **logical AND**; multiple values in one array\nfield stack with **logical OR**. Results cover the merchant’s **last two years** of sales\n(narrow further with `start_date` / `end_date`). Pagination tokens are not interchangeable\nwith `GET /sales`.", "operationId": "SearchSalesV10", + "x-codegen": { + "method_name": "search" + }, + "x-scopes": [ + "sales.read" + ], + "x-permissions": [ + "merchant.read" + ], "security": [ { "apiKey": [] @@ -5797,12 +5953,6 @@ ] } ], - "x-scopes": [ - "sales.read" - ], - "x-permissions": [ - "merchant_read" - ], "parameters": [ { "name": "merchant_code", @@ -5822,6 +5972,19 @@ "application/json": { "schema": { "$ref": "#/components/schemas/SaleSearchRequest" + }, + "examples": { + "date_range": { + "summary": "Search point-of-sale sales in a date range", + "value": { + "start_date": "2026-06-01T00:00:00Z", + "end_date": "2026-06-02T23:59:59Z", + "sales_channels": [ + "POS" + ], + "pagination_limit": 10 + } + } } } } @@ -5858,7 +6021,7 @@ } }, "403": { - "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant_read` permission.", + "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant.read` permission.", "content": { "application/problem+json": { "schema": { @@ -5885,9 +6048,18 @@ "tags": [ "Sales" ], - "summary": "Gets a sale", + "summary": "Get a sale", "description": "Returns `Sale` for `sale_id`, including item lines and `payments[]`.\nNon-finalised sales are never returned; only fully-paid sales.", "operationId": "GetSaleV10", + "x-codegen": { + "method_name": "get" + }, + "x-scopes": [ + "sales.read" + ], + "x-permissions": [ + "merchant.read" + ], "security": [ { "apiKey": [] @@ -5898,12 +6070,6 @@ ] } ], - "x-scopes": [ - "sales.read" - ], - "x-permissions": [ - "merchant_read" - ], "parameters": [ { "name": "merchant_code", @@ -5944,14 +6110,14 @@ "tax_mode": "GROSS", "state": "CLOSED", "price": { - "net_amount": 777, - "gross_amount": 925, + "net_amount": 252, + "gross_amount": 300, "taxes": [ { "id": "tax-vat-19", - "net_amount": 777, - "gross_amount": 925, - "tax_amount": 148 + "net_amount": 252, + "gross_amount": 300, + "tax_amount": 48 } ] }, @@ -5966,6 +6132,11 @@ "type": "CATALOG", "name": "Cappuccino", "quantity": 1, + "unit_of_measure": { + "group_id": "quantity", + "unit_id": "quantity.piece", + "unit_ratio": 1 + }, "price": { "unit_amount": 300, "total_net_amount": 252, @@ -5996,7 +6167,7 @@ "method": "apple_pay", "reference": "TERTYFQ4G3", "type": "purchase", - "amount": 975, + "amount": 300, "status": "SUCCESSFUL", "processed_at": "2026-06-02T10:20:00Z" } @@ -6016,7 +6187,7 @@ } }, "403": { - "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant_read` permission.", + "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant.read` permission.", "content": { "application/problem+json": { "schema": { @@ -7401,6 +7572,14 @@ }, { "$ref": "#/components/schemas/TransactionCheckoutInfo" + }, + { + "type": "object", + "properties": { + "entry_mode": { + "$ref": "#/components/schemas/CheckoutEntryMode" + } + } } ] } @@ -8913,9 +9092,6 @@ "description": "Tip included in the total transaction amount, in major units of the transaction's currency.", "example": 3 }, - "entry_mode": { - "$ref": "#/components/schemas/EntryMode" - }, "auth_code": { "type": "string", "description": "Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments.", @@ -8928,6 +9104,9 @@ "description": "Additional transaction fields used by history and detailed views.", "type": "object", "properties": { + "entry_mode": { + "$ref": "#/components/schemas/EntryMode" + }, "product_summary": { "type": "string", "description": "Short description of the payment. The value is taken from the `description` property of the related checkout resource.", @@ -9042,13 +9221,16 @@ ], "example": "ECOM" }, - "EntryMode": { - "title": "Entry Mode", + "CheckoutEntryMode": { + "title": "Checkout Entry Mode", "type": "string", - "description": "How the payment details were captured, for example `CHIP` or `CONTACTLESS` for card-present payments and `CUSTOMER_ENTRY` for card details entered by the payer. For wallet and alternative payment methods, this can identify the method, such as `APPLE_PAY` or `BLIK`.", + "description": "How the payment details were captured for a checkout transaction, for example `CUSTOMER_ENTRY` for card details entered by the payer or `APPLE_PAY` for an Apple Pay payment. Checkout entry modes use uppercase values, unlike entry modes returned by the Transactions endpoints.", "enum": [ + "CUSTOMER_ENTRY", + "MOTO", + "CARD", "BOLETO", - "SOFORT", + "DIRECT_DEBIT", "IDEAL", "BANCONTACT", "EPS", @@ -9059,24 +9241,52 @@ "GIROPAY", "PIX", "QR_CODE_PIX", + "KLARNA", + "BANCOMATPAY", "APPLE_PAY", - "GOOGLE_PAY", "PAYPAL", - "TWINT", - "NONE", - "CHIP", - "MANUAL_ENTRY", - "CUSTOMER_ENTRY", - "MAGSTRIPE_FALLBACK", - "MAGSTRIPE", - "DIRECT_DEBIT", - "CONTACTLESS", - "MOTO", - "CONTACTLESS_MAGSTRIPE", - "N/A" + "GOOGLE_PAY" ], "example": "CUSTOMER_ENTRY" }, + "EntryMode": { + "title": "Entry Mode", + "type": "string", + "description": "How the payment details were captured, for example `chip` or `contactless` for card-present payments and `customer entry` for card details entered by the payer. For wallet and alternative payment methods, this can identify the method, such as `apple pay` or `blik`.", + "enum": [ + "none", + "magstripe", + "chip", + "manual entry", + "customer entry", + "magstripe fallback", + "contactless", + "moto", + "contactless magstripe", + "boleto", + "direct debit", + "sofort", + "ideal", + "bancontact", + "eps", + "mybank", + "satispay", + "blik", + "p24", + "giropay", + "pix", + "qr code pix", + "apple pay", + "google pay", + "sumup gift card", + "paypal", + "twint", + "iris", + "sumup pay", + "na" + ], + "example": "customer entry" + }, "CardType": { "title": "Card Type", "type": "string", @@ -12278,7 +12488,7 @@ "properties": { "method": { "type": "string", - "description": "Payment method on public sales read API v1.0.\nDigital wallets are first-class methods. Gift card payments use `gift_card`, not `apm`.\nInput is case-insensitive; the canonical form is lowercase snake_case.\n**VALUES**: [card, cash, apm, external, apple_pay, google_pay, whatsapp_pay, gift_card].", + "description": "Payment method on public sales read API v1.0.\nDigital wallets are first-class methods. Gift card payments use `gift_card`, not `apm`.\nValues use lowercase snake_case. Known values are `card`, `cash`, `apm`, `external`,\n`apple_pay`, `google_pay`, `whatsapp_pay`, and `gift_card`.\nAdditional values may be returned as new payment methods become available.", "example": "card", "maxLength": 20 }, @@ -12291,7 +12501,7 @@ "type": { "type": "string", "default": "purchase", - "description": "Payment operation type.\nThis is distinct from the payment instrument in `method`.\nInput is case-insensitive; the canonical form is lowercase snake_case.\n**VALUES**: [purchase, unreferenced_refund]\nDefaults to \"purchase\" if unspecified. Either a normal purchase or an unreferenced refund for negative\nsales like deposit returns.\n", + "description": "Payment operation type.\nThis is distinct from the payment instrument in `method`.\nValues use lowercase snake_case. Known values are `purchase` for a normal purchase\nand `unreferenced_refund` for negative sales such as deposit returns.\n", "example": "purchase" }, "amount": { @@ -12319,7 +12529,7 @@ }, "apm_type": { "type": "string", - "description": "Alternative payment method type when `method` is `apm`.\nGift card is not an APM on this API.\nInput is case-insensitive; the canonical form is lowercase snake_case.\n**VALUES**: [qr_code_pix, sepa_dd, paypal, sumup_pay, twint, iris].", + "description": "Alternative payment method type when `method` is `apm`.\nGift card is not an APM on this API.\nValues use lowercase snake_case. Known values are `qr_code_pix`, `sepa_dd`, `paypal`,\n`sumup_pay`, `twint`, and `iris`.\nAdditional values may be returned as new alternative payment methods become available.", "maxLength": 20 }, "card": { @@ -12332,7 +12542,7 @@ "type": "string", "format": "date-time", "description": "UTC date-time when SumUp recorded this payment’s exposed `status` (successful, failed,\nor canceled). Server processed time when available; otherwise the payment provider’s\ntransaction time. Not the device clock.", - "example": "2017-07-21T17:32:28+01:00" + "example": "2026-06-02T10:20:00Z" } } }, @@ -12443,7 +12653,7 @@ "SalePage": { "title": "SalePage", "type": "object", - "description": "Paginated list of `Sale` objects. Results are ordered **newest first** by the newest\nactivity recorded for each sale. See `ListSalesV10`.", + "description": "Paginated list of `Sale` objects. Results are ordered **newest first** by the newest\nactivity recorded for each sale.", "required": [ "items" ], @@ -12455,7 +12665,7 @@ } }, "pagination_token": { - "description": "Pagination token for subsequent requests. Should only be set by clients if they have\nreceived a token in the previous response, and this request is an immediate follow-up\nrequest to that response to load the subsequent page. Clients should treat this as an\nopaque token and should not attempt to parse it in any way.", + "description": "Opaque token for the next page. Pass it as the `pagination_token` query parameter\non the next list request. Omitted when no further page is available.", "type": "string", "example": "66bcbtzelrubzeuzruzgu76678trncH" } @@ -12573,7 +12783,7 @@ }, "pagination_token": { "type": "string", - "description": "Opaque pagination token from a previous search response. Not interchangeable with tokens\nfrom `GET /sales`.", + "description": "Opaque token from the previous search response. To load the next page, send it with\nthe same filters. Not interchangeable with tokens from `GET /sales`.", "example": "66bcbtzelrubzeuzruzgu76678trncH" }, "pagination_limit": { @@ -12686,7 +12896,7 @@ ] }, "pagination_token": { - "description": "Opaque token for the next page of search results.", + "description": "Opaque token for the next page. Pass it as `pagination_token` in the next search\nrequest body with the same filters. Omitted when no further page is available.", "type": "string", "example": "66bcbtzelrubzeuzruzgu76678trncH" } @@ -14087,8 +14297,8 @@ "schema": { "type": "array", "example": [ - "CUSTOMER_ENTRY", - "CHIP" + "customer entry", + "chip" ], "items": { "$ref": "#/components/schemas/EntryMode" From c130da4552b9eee65015f261d9b4715a68a3e292 Mon Sep 17 00:00:00 2001 From: "sumup-release-bot[bot]" <241716704+sumup-release-bot[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:31:18 +0000 Subject: [PATCH 2/3] chore: generate code --- src/Sales/Sales.php | 32 +++++++------- src/Types/PublicPaymentV10.php | 16 +++---- src/Types/SalePage.php | 8 ++-- src/Types/SaleSearchRequest.php | 4 +- src/Types/SaleSearchResponse.php | 3 +- src/Types/TransactionCheckoutInfo.php | 7 ---- .../TransactionCheckoutInfoEntryMode.php | 39 ----------------- src/Types/TransactionFull.php | 8 ++-- src/Types/TransactionHistory.php | 7 ++++ src/Types/TransactionMixinHistory.php | 7 ++++ .../TransactionMixinHistoryEntryMode.php | 42 +++++++++++++++++++ 11 files changed, 93 insertions(+), 80 deletions(-) delete mode 100644 src/Types/TransactionCheckoutInfoEntryMode.php create mode 100644 src/Types/TransactionMixinHistoryEntryMode.php diff --git a/src/Sales/Sales.php b/src/Sales/Sales.php index f53cede..0d63b9e 100644 --- a/src/Sales/Sales.php +++ b/src/Sales/Sales.php @@ -13,17 +13,16 @@ use SumUp\ResponseDecoder; /** - * Query parameters for SalesListSalesV10Params. + * Query parameters for SalesListParams. * * @package SumUp\Services */ -class SalesListSalesV10Params +class SalesListParams { /** - * Pagination token for subsequent requests. Should only be set by clients if they have - * received a token in the previous response, and this request is an immediate follow-up - * request to that response to load the subsequent page. Clients should treat this as an - * opaque token and should not attempt to parse it in any way. + * Opaque token from the previous list response. Omit it on the first request. To load + * the next page, pass the returned token unchanged. Not interchangeable with tokens + * from `POST /sales/search`. * * @var string|null */ @@ -41,7 +40,12 @@ class SalesListSalesV10Params /** * Class Sales * - * Operations related to reading sales data. + * Read a merchant's fully-paid, closed sales, including item lines, taxes, discounts, and payments. + * + * List sales to retrieve full `Sale` objects, or search by date, payment status, and sales channel + * to retrieve summaries. Use a summary's `id` to get the full sale. + * + * Amounts are expressed in minor units according to each sale's `currency.scale`. * * @package SumUp\Services */ @@ -74,7 +78,7 @@ public function __construct(HttpClientInterface $client, string $accessToken) } /** - * Gets a sale + * Get a sale * * @param string $merchantCode The merchant code. * @param string $saleId The sale ID. @@ -86,7 +90,7 @@ public function __construct(HttpClientInterface $client, string $accessToken) * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function getSaleV10(string $merchantCode, string $saleId, ?RequestOptions $requestOptions = null): \SumUp\Types\Sale + public function get(string $merchantCode, string $saleId, ?RequestOptions $requestOptions = null): \SumUp\Types\Sale { $path = sprintf('/v1.0/merchants/%s/sales/%s', rawurlencode((string) $merchantCode), rawurlencode((string) $saleId)); $payload = []; @@ -103,10 +107,10 @@ public function getSaleV10(string $merchantCode, string $saleId, ?RequestOptions } /** - * Lists sales + * List sales * * @param string $merchantCode The merchant code. - * @param SalesListSalesV10Params|null $queryParams Optional query string parameters + * @param SalesListParams|null $queryParams Optional query string parameters * @param RequestOptions|null $requestOptions Optional typed request options * * @return \SumUp\Types\SalePage @@ -115,7 +119,7 @@ public function getSaleV10(string $merchantCode, string $saleId, ?RequestOptions * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function listSalesV10(string $merchantCode, ?SalesListSalesV10Params $queryParams = null, ?RequestOptions $requestOptions = null): \SumUp\Types\SalePage + public function list(string $merchantCode, ?SalesListParams $queryParams = null, ?RequestOptions $requestOptions = null): \SumUp\Types\SalePage { $path = sprintf('/v1.0/merchants/%s/sales', rawurlencode((string) $merchantCode)); if ($queryParams !== null) { @@ -147,7 +151,7 @@ public function listSalesV10(string $merchantCode, ?SalesListSalesV10Params $que } /** - * Searches sales + * Search sales * * @param string $merchantCode The merchant code. * @param \SumUp\Types\SaleSearchRequest|array $body Required request payload @@ -159,7 +163,7 @@ public function listSalesV10(string $merchantCode, ?SalesListSalesV10Params $que * @throws \SumUp\Exception\ConnectionException * @throws \SumUp\Exception\SDKException */ - public function searchSalesV10(string $merchantCode, \SumUp\Types\SaleSearchRequest|array $body, ?RequestOptions $requestOptions = null): \SumUp\Types\SaleSearchResponse + public function search(string $merchantCode, \SumUp\Types\SaleSearchRequest|array $body, ?RequestOptions $requestOptions = null): \SumUp\Types\SaleSearchResponse { $path = sprintf('/v1.0/merchants/%s/sales/search', rawurlencode((string) $merchantCode)); $payload = []; diff --git a/src/Types/PublicPaymentV10.php b/src/Types/PublicPaymentV10.php index 016c478..44b80fb 100644 --- a/src/Types/PublicPaymentV10.php +++ b/src/Types/PublicPaymentV10.php @@ -15,8 +15,9 @@ class PublicPaymentV10 /** * Payment method on public sales read API v1.0. * Digital wallets are first-class methods. Gift card payments use `gift_card`, not `apm`. - * Input is case-insensitive; the canonical form is lowercase snake_case. - * **VALUES**: [card, cash, apm, external, apple_pay, google_pay, whatsapp_pay, gift_card]. + * Values use lowercase snake_case. Known values are `card`, `cash`, `apm`, `external`, + * `apple_pay`, `google_pay`, `whatsapp_pay`, and `gift_card`. + * Additional values may be returned as new payment methods become available. * * @var string */ @@ -32,10 +33,8 @@ class PublicPaymentV10 /** * Payment operation type. * This is distinct from the payment instrument in `method`. - * Input is case-insensitive; the canonical form is lowercase snake_case. - * **VALUES**: [purchase, unreferenced_refund] - * Defaults to "purchase" if unspecified. Either a normal purchase or an unreferenced refund for negative - * sales like deposit returns. + * Values use lowercase snake_case. Known values are `purchase` for a normal purchase + * and `unreferenced_refund` for negative sales such as deposit returns. * * @var string */ @@ -59,8 +58,9 @@ class PublicPaymentV10 /** * Alternative payment method type when `method` is `apm`. * Gift card is not an APM on this API. - * Input is case-insensitive; the canonical form is lowercase snake_case. - * **VALUES**: [qr_code_pix, sepa_dd, paypal, sumup_pay, twint, iris]. + * Values use lowercase snake_case. Known values are `qr_code_pix`, `sepa_dd`, `paypal`, + * `sumup_pay`, `twint`, and `iris`. + * Additional values may be returned as new alternative payment methods become available. * * @var string|null */ diff --git a/src/Types/SalePage.php b/src/Types/SalePage.php index 05f2d51..aeba7f2 100644 --- a/src/Types/SalePage.php +++ b/src/Types/SalePage.php @@ -6,7 +6,7 @@ /** * Paginated list of `Sale` objects. Results are ordered **newest first** by the newest - * activity recorded for each sale. See `ListSalesV10`. + * activity recorded for each sale. */ class SalePage { @@ -17,10 +17,8 @@ class SalePage public array $items; /** - * Pagination token for subsequent requests. Should only be set by clients if they have - * received a token in the previous response, and this request is an immediate follow-up - * request to that response to load the subsequent page. Clients should treat this as an - * opaque token and should not attempt to parse it in any way. + * Opaque token for the next page. Pass it as the `pagination_token` query parameter + * on the next list request. Omitted when no further page is available. * * @var string|null */ diff --git a/src/Types/SaleSearchRequest.php b/src/Types/SaleSearchRequest.php index 1b91165..ba2ba29 100644 --- a/src/Types/SaleSearchRequest.php +++ b/src/Types/SaleSearchRequest.php @@ -51,8 +51,8 @@ class SaleSearchRequest public ?array $salesChannels = null; /** - * Opaque pagination token from a previous search response. Not interchangeable with tokens - * from `GET /sales`. + * Opaque token from the previous search response. To load the next page, send it with + * the same filters. Not interchangeable with tokens from `GET /sales`. * * @var string|null */ diff --git a/src/Types/SaleSearchResponse.php b/src/Types/SaleSearchResponse.php index 134e0f5..ca16837 100644 --- a/src/Types/SaleSearchResponse.php +++ b/src/Types/SaleSearchResponse.php @@ -16,7 +16,8 @@ class SaleSearchResponse public array $items; /** - * Opaque token for the next page of search results. + * Opaque token for the next page. Pass it as `pagination_token` in the next search + * request body with the same filters. Omitted when no further page is available. * * @var string|null */ diff --git a/src/Types/TransactionCheckoutInfo.php b/src/Types/TransactionCheckoutInfo.php index 04934af..15fb797 100644 --- a/src/Types/TransactionCheckoutInfo.php +++ b/src/Types/TransactionCheckoutInfo.php @@ -30,13 +30,6 @@ class TransactionCheckoutInfo */ public ?float $tipAmount = null; - /** - * How the payment details were captured, for example `CHIP` or `CONTACTLESS` for card-present payments and `CUSTOMER_ENTRY` for card details entered by the payer. For wallet and alternative payment methods, this can identify the method, such as `APPLE_PAY` or `BLIK`. - * - * @var TransactionCheckoutInfoEntryMode|null - */ - public ?TransactionCheckoutInfoEntryMode $entryMode = null; - /** * Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments. * diff --git a/src/Types/TransactionCheckoutInfoEntryMode.php b/src/Types/TransactionCheckoutInfoEntryMode.php deleted file mode 100644 index eec1e41..0000000 --- a/src/Types/TransactionCheckoutInfoEntryMode.php +++ /dev/null @@ -1,39 +0,0 @@ - Date: Thu, 12 Nov 2026 17:37:55 +0100 Subject: [PATCH 3/3] fix: use renamed sales method in client test --- tests/SumUpTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SumUpTest.php b/tests/SumUpTest.php index 3091492..19cfeda 100644 --- a/tests/SumUpTest.php +++ b/tests/SumUpTest.php @@ -146,7 +146,7 @@ public function testSalesAndTokensUseTheConfiguredClientAndCurrentToken(): void $sumup = new SumUp(['client' => $http, 'api_key' => 'original-key']); $sumup->setDefaultAccessToken('updated-key'); - $sumup->sales()->getSaleV10('merchant', 'sale'); + $sumup->sales()->get('merchant', 'sale'); $sumup->tokens()->create('merchant', ['actions' => ['sales.read']]); $requests = $http->getRequests();