From 4d9d8f4ab603b71657592a235c9518f6b3f55fbf Mon Sep 17 00:00:00 2001 From: appscisumup Date: Thu, 23 Oct 2025 14:40:43 +0000 Subject: [PATCH 1/3] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/openapi.json b/openapi.json index 703c8aa2..08863988 100755 --- a/openapi.json +++ b/openapi.json @@ -5859,7 +5859,7 @@ "post": { "operationId": "CreateReaderCheckout", "summary": "Create a Reader Checkout", - "description": "Create a Checkout for a Reader.\n\nThis process is asynchronous and the actual transaction may take some time to be stared on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise checkout won't be accepted\n* After the checkout is accepted, the system has 60 seconds to start the payment on the target device. During this time, any other checkout for the same device will be rejected.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.24.3 or higher.\n", + "description": "Creates a Checkout for a Reader.\n\nThis process is asynchronous and the actual transaction may take some time to be stared on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise checkout won't be accepted\n* After the checkout is accepted, the system has 60 seconds to start the payment on the target device. During this time, any other checkout for the same device will be rejected.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.24.3 or higher.\n", "parameters": [ { "name": "merchant_code", @@ -6005,6 +6005,9 @@ "tags": [ "Readers" ], + "x-codegen": { + "method_name": "create_checkout" + }, "x-permissions": [ "readers_checkout_create" ], @@ -6016,8 +6019,8 @@ "/v0.1/merchants/{merchant_code}/readers/{reader_id}/terminate": { "post": { "operationId": "CreateReaderTerminate", - "summary": "Create a Reader Terminate action", - "description": "Create a Terminate action for a Reader.\n\nIt stops the current transaction on the target device.\n\nThis process is asynchronous and the actual termination may take some time to be performed on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise terminate won't be accepted\n* The action will succeed only if the device is waiting for cardholder action: e.g: waiting for card, waiting for PIN, etc.\n* There is no confirmation of the termination.\n\nIf a transaction is successfully terminated and `return_url` was provided on Checkout, the transaction status will be sent as `failed` to the provided URL.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.28.0 or higher.\n", + "summary": "Terminate a Reader Checkout", + "description": "Terminate a Reader Checkout stops the current transaction on the target device.\n\nThis process is asynchronous and the actual termination may take some time to be performed on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise terminate won't be accepted\n* The action will succeed only if the device is waiting for cardholder action: e.g: waiting for card, waiting for PIN, etc.\n* There is no confirmation of the termination.\n\nIf a transaction is successfully terminated and `return_url` was provided on Checkout, the transaction status will be sent as `failed` to the provided URL.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.28.0 or higher.\n", "parameters": [ { "name": "merchant_code", @@ -6132,6 +6135,9 @@ "tags": [ "Readers" ], + "x-codegen": { + "method_name": "terminate_checkout" + }, "x-permissions": [ "readers_checkout_create" ], From 452db8490d7786cff98957cba6d75cf0b491a975 Mon Sep 17 00:00:00 2001 From: appscisumup Date: Thu, 23 Oct 2025 14:40:43 +0000 Subject: [PATCH 2/3] chore: synced local 'openapi.yaml' with remote 'specs/openapi.yaml' --- openapi.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index bf575dba..47d1b211 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3855,7 +3855,7 @@ paths: operationId: CreateReaderCheckout summary: Create a Reader Checkout description: | - Create a Checkout for a Reader. + Creates a Checkout for a Reader. This process is asynchronous and the actual transaction may take some time to be stared on the device. @@ -3956,6 +3956,8 @@ paths: - readers.write tags: - Readers + x-codegen: + method_name: create_checkout x-permissions: - readers_checkout_create x-scopes: @@ -3963,11 +3965,9 @@ paths: '/v0.1/merchants/{merchant_code}/readers/{reader_id}/terminate': post: operationId: CreateReaderTerminate - summary: Create a Reader Terminate action + summary: Terminate a Reader Checkout description: | - Create a Terminate action for a Reader. - - It stops the current transaction on the target device. + Terminate a Reader Checkout stops the current transaction on the target device. This process is asynchronous and the actual termination may take some time to be performed on the device. @@ -4052,6 +4052,8 @@ paths: - readers.write tags: - Readers + x-codegen: + method_name: terminate_checkout x-permissions: - readers_checkout_create x-scopes: From 1aca5432a777d3e9de36216917c9aaf2e0c5df01 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 14:41:59 +0000 Subject: [PATCH 3/3] chore: generate code --- sumup/readers/resource.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/sumup/readers/resource.py b/sumup/readers/resource.py index 9535608b..84060131 100755 --- a/sumup/readers/resource.py +++ b/sumup/readers/resource.py @@ -312,7 +312,7 @@ def update( else: raise APIError("Unexpected response", status=resp.status_code, body=resp.text) - def create_reader_checkout( + def create_checkout( self, merchant_code: str, reader_id: str, @@ -322,7 +322,7 @@ def create_reader_checkout( """ Create a Reader Checkout - Create a Checkout for a Reader. + Creates a Checkout for a Reader. This process is asynchronous and the actual transaction may take some time to be stared on the device. @@ -364,15 +364,13 @@ def create_reader_checkout( else: raise APIError("Unexpected response", status=resp.status_code, body=resp.text) - def create_reader_terminate( + def terminate_checkout( self, merchant_code: str, reader_id: str, headers: typing.Optional[HeaderTypes] = None ): """ - Create a Reader Terminate action + Terminate a Reader Checkout - Create a Terminate action for a Reader. - - It stops the current transaction on the target device. + Terminate a Reader Checkout stops the current transaction on the target device. This process is asynchronous and the actual termination may take some time to be performed on the device. @@ -527,7 +525,7 @@ async def update( else: raise APIError("Unexpected response", status=resp.status_code, body=resp.text) - async def create_reader_checkout( + async def create_checkout( self, merchant_code: str, reader_id: str, @@ -537,7 +535,7 @@ async def create_reader_checkout( """ Create a Reader Checkout - Create a Checkout for a Reader. + Creates a Checkout for a Reader. This process is asynchronous and the actual transaction may take some time to be stared on the device. @@ -579,15 +577,13 @@ async def create_reader_checkout( else: raise APIError("Unexpected response", status=resp.status_code, body=resp.text) - async def create_reader_terminate( + async def terminate_checkout( self, merchant_code: str, reader_id: str, headers: typing.Optional[HeaderTypes] = None ): """ - Create a Reader Terminate action - - Create a Terminate action for a Reader. + Terminate a Reader Checkout - It stops the current transaction on the target device. + Terminate a Reader Checkout stops the current transaction on the target device. This process is asynchronous and the actual termination may take some time to be performed on the device.