From 5158a092f5c51d8ee643ceadf87ba620a1371eba Mon Sep 17 00:00:00 2001 From: appscisumup Date: Tue, 6 Jan 2026 08:10:56 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 108 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 82 insertions(+), 26 deletions(-) diff --git a/openapi.json b/openapi.json index bc78785..63e6101 100755 --- a/openapi.json +++ b/openapi.json @@ -2249,6 +2249,18 @@ } } }, + { + "name": "entry_modes[]", + "in": "query", + "description": "Filters the returned results by the specified list of entry modes.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntryModeFilter" + } + } + }, { "name": "types", "in": "query", @@ -6197,6 +6209,18 @@ "type": "string" } }, + "EntryModesFilter": { + "name": "entry_modes[]", + "in": "query", + "description": "Filters the returned results by the specified list of entry modes.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntryModeFilter" + } + } + }, "GeoCoordinatesFilter": { "name": "geo_coordinates", "in": "query", @@ -8266,32 +8290,32 @@ "description": "Entry mode of the payment details.", "type": "string", "enum": [ - "BOLETO", - "SOFORT", - "IDEAL", - "BANCONTACT", - "EPS", - "MYBANK", - "SATISPAY", - "BLIK", - "P24", - "GIROPAY", - "PIX", - "QR_CODE_PIX", - "APPLE_PAY", - "GOOGLE_PAY", - "PAYPAL", - "NONE", - "CHIP", - "MANUAL_ENTRY", - "CUSTOMER_ENTRY", - "MAGSTRIPE_FALLBACK", - "MAGSTRIPE", - "DIRECT_DEBIT", - "CONTACTLESS", - "MOTO", - "CONTACTLESS_MAGSTRIPE", - "N/A" + "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", + "paypal", + "na" ] }, "CardType": { @@ -11068,6 +11092,38 @@ "date_of_birth", "address" ] + }, + "EntryModeFilter": { + "description": "Entry mode value accepted by the `entry_modes[]` filter.", + "type": "string", + "enum": [ + "BOLETO", + "SOFORT", + "IDEAL", + "BANCONTACT", + "EPS", + "MYBANK", + "SATISPAY", + "BLIK", + "P24", + "GIROPAY", + "PIX", + "QR_CODE_PIX", + "APPLE_PAY", + "GOOGLE_PAY", + "PAYPAL", + "NONE", + "CHIP", + "MANUAL_ENTRY", + "CUSTOMER_ENTRY", + "MAGSTRIPE_FALLBACK", + "MAGSTRIPE", + "DIRECT_DEBIT", + "CONTACTLESS", + "MOTO", + "CONTACTLESS_MAGSTRIPE", + "N/A" + ] } }, "examples": { From 3317bd09fd6d067a131728512bbf9cea061dea98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Dzivjak?= Date: Tue, 6 Jan 2026 10:05:04 +0100 Subject: [PATCH 2/2] fix: codegen for query param enums --- codegen/pkg/builder/collect.go | 2 +- sumup/checkouts/types.py | 52 ++++++++++----------- sumup/transactions/__init__.py | 2 + sumup/transactions/resource.py | 7 +++ sumup/transactions/types.py | 82 +++++++++++++++++++++++----------- 5 files changed, 92 insertions(+), 53 deletions(-) diff --git a/codegen/pkg/builder/collect.go b/codegen/pkg/builder/collect.go index c346fb7..84f4395 100644 --- a/codegen/pkg/builder/collect.go +++ b/codegen/pkg/builder/collect.go @@ -104,7 +104,7 @@ func (c *SchemaProxyCollection) collectSchemasInResponse(op *v3.Operation) { // Collect the schemas that are referenced in the request parameters of the given operation. func (c *SchemaProxyCollection) collectSchemasInParams(op *v3.Operation) { - if op.RequestBody == nil { + if len(op.Parameters) == 0 { return } diff --git a/sumup/checkouts/types.py b/sumup/checkouts/types.py index 222899d..51b777c 100755 --- a/sumup/checkouts/types.py +++ b/sumup/checkouts/types.py @@ -158,32 +158,32 @@ class TransactionBase(pydantic.BaseModel): EntryMode = typing.Literal[ - "APPLE_PAY", - "BANCONTACT", - "BLIK", - "BOLETO", - "CHIP", - "CONTACTLESS", - "CONTACTLESS_MAGSTRIPE", - "CUSTOMER_ENTRY", - "DIRECT_DEBIT", - "EPS", - "GIROPAY", - "GOOGLE_PAY", - "IDEAL", - "MAGSTRIPE", - "MAGSTRIPE_FALLBACK", - "MANUAL_ENTRY", - "MOTO", - "MYBANK", - "N/A", - "NONE", - "P24", - "PAYPAL", - "PIX", - "QR_CODE_PIX", - "SATISPAY", - "SOFORT", + "apple pay", + "bancontact", + "blik", + "boleto", + "chip", + "contactless", + "contactless magstripe", + "customer entry", + "direct debit", + "eps", + "giropay", + "google pay", + "ideal", + "magstripe", + "magstripe fallback", + "manual entry", + "moto", + "mybank", + "na", + "none", + "p24", + "paypal", + "pix", + "qr code pix", + "satispay", + "sofort", ] diff --git a/sumup/transactions/__init__.py b/sumup/transactions/__init__.py index ccf6f36..a69022c 100755 --- a/sumup/transactions/__init__.py +++ b/sumup/transactions/__init__.py @@ -16,6 +16,7 @@ CardType, Currency, EntryMode, + EntryModeFilter, Error, Event, EventId, @@ -54,6 +55,7 @@ "CardType", "Currency", "EntryMode", + "EntryModeFilter", "Error", "Event", "EventId", diff --git a/sumup/transactions/resource.py b/sumup/transactions/resource.py index 110c16e..df5f4d0 100755 --- a/sumup/transactions/resource.py +++ b/sumup/transactions/resource.py @@ -2,6 +2,7 @@ from .._service import Resource, AsyncResource, HeaderTypes from .._exceptions import APIError from .types import ( + EntryModeFilter, Link, PaymentType, TransactionFull, @@ -60,6 +61,12 @@ class ListTransactionsV21Params(pydantic.BaseModel): changes_since: typing.Optional[datetime.datetime] = None + entry_modes: typing.Optional[list[EntryModeFilter]] = pydantic.Field( + default=None, + serialization_alias="entry_modes[]", + validation_alias=pydantic.AliasChoices("entry_modes[]", "entry_modes"), + ) + limit: typing.Optional[int] = None newest_ref: typing.Optional[str] = None diff --git a/sumup/transactions/types.py b/sumup/transactions/types.py index 450452a..638176a 100755 --- a/sumup/transactions/types.py +++ b/sumup/transactions/types.py @@ -103,32 +103,32 @@ class TransactionBase(pydantic.BaseModel): EntryMode = typing.Literal[ - "APPLE_PAY", - "BANCONTACT", - "BLIK", - "BOLETO", - "CHIP", - "CONTACTLESS", - "CONTACTLESS_MAGSTRIPE", - "CUSTOMER_ENTRY", - "DIRECT_DEBIT", - "EPS", - "GIROPAY", - "GOOGLE_PAY", - "IDEAL", - "MAGSTRIPE", - "MAGSTRIPE_FALLBACK", - "MANUAL_ENTRY", - "MOTO", - "MYBANK", - "N/A", - "NONE", - "P24", - "PAYPAL", - "PIX", - "QR_CODE_PIX", - "SATISPAY", - "SOFORT", + "apple pay", + "bancontact", + "blik", + "boleto", + "chip", + "contactless", + "contactless magstripe", + "customer entry", + "direct debit", + "eps", + "giropay", + "google pay", + "ideal", + "magstripe", + "magstripe fallback", + "manual entry", + "moto", + "mybank", + "na", + "none", + "p24", + "paypal", + "pix", + "qr code pix", + "satispay", + "sofort", ] @@ -844,3 +844,33 @@ class TransactionHistory(pydantic.BaseModel): Email address of the registered user (merchant) to whom the payment is made. Format: email """ + + +EntryModeFilter = typing.Literal[ + "APPLE_PAY", + "BANCONTACT", + "BLIK", + "BOLETO", + "CHIP", + "CONTACTLESS", + "CONTACTLESS_MAGSTRIPE", + "CUSTOMER_ENTRY", + "DIRECT_DEBIT", + "EPS", + "GIROPAY", + "GOOGLE_PAY", + "IDEAL", + "MAGSTRIPE", + "MAGSTRIPE_FALLBACK", + "MANUAL_ENTRY", + "MOTO", + "MYBANK", + "N/A", + "NONE", + "P24", + "PAYPAL", + "PIX", + "QR_CODE_PIX", + "SATISPAY", + "SOFORT", +]